class Beaver::PayoutMethodReq
PayoutMethodReq
Model.
Attributes
custom_data[RW]
TODO: Write general description for this method @return [Object]
legal_entity_id[RW]
TODO: Write general description for this method @return [String]
nickname[RW]
TODO: Write general description for this method @return [String]
payout_bank_ca[RW]
TODO: Write general description for this method @return [PayoutBankCa1]
payout_bank_gb[RW]
TODO: Write general description for this method @return [PayoutBankGb1]
payout_bank_us[RW]
TODO: Write general description for this method @return [PayoutBankUs1]
rbits[RW]
TODO: Write general description for this method @return [List of EmbeddedRbit]
token[RW]
TODO: Write general description for this method @return [Token]
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_req.rb, line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. legal_entity_id = hash['legal_entity_id'] nickname = hash['nickname'] type = hash['type'] custom_data = hash['custom_data'] payout_bank_ca = PayoutBankCa1.from_hash(hash['payout_bank_ca']) if hash['payout_bank_ca'] payout_bank_gb = PayoutBankGb1.from_hash(hash['payout_bank_gb']) if hash['payout_bank_gb'] payout_bank_us = PayoutBankUs1.from_hash(hash['payout_bank_us']) if hash['payout_bank_us'] # Parameter is an array, so we need to iterate through it rbits = nil unless hash['rbits'].nil? rbits = [] hash['rbits'].each do |structure| rbits << (EmbeddedRbit.from_hash(structure) if structure) end end token = Token.from_hash(hash['token']) if hash['token'] # Create object from extracted values. PayoutMethodReq.new(legal_entity_id, nickname, type, custom_data, payout_bank_ca, payout_bank_gb, payout_bank_us, rbits, token) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/payout_method_req.rb, line 46 def self.names @_hash = {} if @_hash.nil? @_hash['custom_data'] = 'custom_data' @_hash['legal_entity_id'] = 'legal_entity_id' @_hash['nickname'] = 'nickname' @_hash['payout_bank_ca'] = 'payout_bank_ca' @_hash['payout_bank_gb'] = 'payout_bank_gb' @_hash['payout_bank_us'] = 'payout_bank_us' @_hash['rbits'] = 'rbits' @_hash['token'] = 'token' @_hash['type'] = 'type' @_hash end
new(legal_entity_id = nil, nickname = nil, type = nil, custom_data = nil, payout_bank_ca = nil, payout_bank_gb = nil, payout_bank_us = nil, rbits = nil, token = nil)
click to toggle source
# File lib/beaver/models/payout_method_req.rb, line 60 def initialize(legal_entity_id = nil, nickname = nil, type = nil, custom_data = nil, payout_bank_ca = nil, payout_bank_gb = nil, payout_bank_us = nil, rbits = nil, token = nil) @custom_data = custom_data @legal_entity_id = legal_entity_id @nickname = nickname @payout_bank_ca = payout_bank_ca @payout_bank_gb = payout_bank_gb @payout_bank_us = payout_bank_us @rbits = rbits @token = token @type = type end