class Beaver::GBP

GBP Model.

Attributes

next_payout_time[RW]

TODO: Write general description for this method @return [Integer]

payout_method_id[RW]

TODO: Write general description for this method @return [String]

period[RW]

TODO: Write general description for this method @return [PeriodEnum]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/beaver/models/gbp.rb, line 39
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  next_payout_time = hash['next_payout_time']
  payout_method_id = hash['payout_method_id']
  period = hash['period']

  # Create object from extracted values.
  GBP.new(next_payout_time,
          payout_method_id,
          period)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/gbp.rb, line 22
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['next_payout_time'] = 'next_payout_time'
  @_hash['payout_method_id'] = 'payout_method_id'
  @_hash['period'] = 'period'
  @_hash
end
new(next_payout_time = nil, payout_method_id = nil, period = nil) click to toggle source
# File lib/beaver/models/gbp.rb, line 30
def initialize(next_payout_time = nil,
               payout_method_id = nil,
               period = nil)
  @next_payout_time = next_payout_time
  @payout_method_id = payout_method_id
  @period = period
end