class Beaver::PayoutMethodResp

PayoutMethodResp Model.

Attributes

api_version[RW]

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

create_time[RW]

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

custom_data[RW]

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

id[RW]

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

nickname[RW]

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

owner[RW]

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

path[RW]

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

payout_bank_ca[RW]

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

payout_bank_gb[RW]

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

payout_bank_us[RW]

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

resource[RW]

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

type[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  id = hash['id']
  path = hash['path']
  resource = hash['resource']
  create_time = hash['create_time']
  custom_data = hash['custom_data']
  nickname = hash['nickname']
  owner = OwnerOfItems.from_hash(hash['owner']) if hash['owner']
  payout_bank_ca = PayoutBankCa.from_hash(hash['payout_bank_ca']) if
    hash['payout_bank_ca']
  payout_bank_gb = PayoutBankGb.from_hash(hash['payout_bank_gb']) if
    hash['payout_bank_gb']
  payout_bank_us = PayoutBankUs.from_hash(hash['payout_bank_us']) if
    hash['payout_bank_us']
  type = hash['type']
  api_version = hash['api_version']

  # Create object from extracted values.
  PayoutMethodResp.new(id,
                       path,
                       resource,
                       create_time,
                       custom_data,
                       nickname,
                       owner,
                       payout_bank_ca,
                       payout_bank_gb,
                       payout_bank_us,
                       type,
                       api_version)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/payout_method_resp.rb, line 58
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['create_time'] = 'create_time'
  @_hash['custom_data'] = 'custom_data'
  @_hash['id'] = 'id'
  @_hash['nickname'] = 'nickname'
  @_hash['owner'] = 'owner'
  @_hash['path'] = 'path'
  @_hash['payout_bank_ca'] = 'payout_bank_ca'
  @_hash['payout_bank_gb'] = 'payout_bank_gb'
  @_hash['payout_bank_us'] = 'payout_bank_us'
  @_hash['resource'] = 'resource'
  @_hash['type'] = 'type'
  @_hash['api_version'] = 'api_version'
  @_hash
end
new(id = nil, path = nil, resource = nil, create_time = nil, custom_data = nil, nickname = nil, owner = nil, payout_bank_ca = nil, payout_bank_gb = nil, payout_bank_us = nil, type = nil, api_version = nil) click to toggle source
# File lib/beaver/models/payout_method_resp.rb, line 75
def initialize(id = nil,
               path = nil,
               resource = nil,
               create_time = nil,
               custom_data = nil,
               nickname = nil,
               owner = nil,
               payout_bank_ca = nil,
               payout_bank_gb = nil,
               payout_bank_us = nil,
               type = nil,
               api_version = nil)
  @create_time = create_time
  @custom_data = custom_data
  @id = id
  @nickname = nickname
  @owner = owner
  @path = path
  @payout_bank_ca = payout_bank_ca
  @payout_bank_gb = payout_bank_gb
  @payout_bank_us = payout_bank_us
  @resource = resource
  @type = type
  @api_version = api_version
end