class Beaver::AccountsRequest
AccountsRequest
Model.
Attributes
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Object]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [IncomingPaymentsReq]
TODO: Write general description for this method @return [Industry]
TODO: Write general description for this method @return [String]
A non-empty string that does not contain the word wepay. @return [String]
A non-empty string that does not contain the word wepay. @return [PayoutReq]
The pricing strategy to collect payment fees for each merchant. @return [Pricing]
The pricing strategy to collect payment fees for each merchant. @return [List of EmbeddedRbit]
The pricing strategy to collect payment fees for each merchant. @return [String]
A non-empty ASCII printable string does not contain the word wepay that appears on the merchants’ customers’ credit card statement. @return [String]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/accounts_request.rb, line 103 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. legal_entity_id = hash['legal_entity_id'] beneficiary_legal_entity_id = hash['beneficiary_legal_entity_id'] custom_data = hash['custom_data'] description = hash['description'] if hash['incoming_payments'] incoming_payments = IncomingPaymentsReq.from_hash(hash['incoming_payments']) end industry = Industry.from_hash(hash['industry']) if hash['industry'] name = hash['name'] payout = PayoutReq.from_hash(hash['payout']) if hash['payout'] pricing = Pricing.from_hash(hash['pricing']) if hash['pricing'] # 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 reference_id = hash['reference_id'] statement_description = hash['statement_description'] # Create object from extracted values. AccountsRequest.new(legal_entity_id, beneficiary_legal_entity_id, custom_data, description, incoming_payments, industry, name, payout, pricing, rbits, reference_id, statement_description) end
A mapping from model property names to API property names.
# File lib/beaver/models/accounts_request.rb, line 59 def self.names @_hash = {} if @_hash.nil? @_hash['beneficiary_legal_entity_id'] = 'beneficiary_legal_entity_id' @_hash['custom_data'] = 'custom_data' @_hash['description'] = 'description' @_hash['incoming_payments'] = 'incoming_payments' @_hash['industry'] = 'industry' @_hash['legal_entity_id'] = 'legal_entity_id' @_hash['name'] = 'name' @_hash['payout'] = 'payout' @_hash['pricing'] = 'pricing' @_hash['rbits'] = 'rbits' @_hash['reference_id'] = 'reference_id' @_hash['statement_description'] = 'statement_description' @_hash end
# File lib/beaver/models/accounts_request.rb, line 76 def initialize(legal_entity_id = nil, beneficiary_legal_entity_id = nil, custom_data = nil, description = nil, incoming_payments = nil, industry = nil, name = nil, payout = nil, pricing = nil, rbits = nil, reference_id = nil, statement_description = nil) @beneficiary_legal_entity_id = beneficiary_legal_entity_id @custom_data = custom_data @description = description @incoming_payments = incoming_payments @industry = industry @legal_entity_id = legal_entity_id @name = name @payout = payout @pricing = pricing @rbits = rbits @reference_id = reference_id @statement_description = statement_description end