class Beaver::AccountsRequest1

AccountsRequest1 Model.

Attributes

custom_data[RW]

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

description[RW]

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

incoming_payments[RW]

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

industry[RW]

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

name[RW]

A non-empty string that does not contain the word wepay. @return [String]

payout[RW]

A non-empty string that does not contain the word wepay. @return [PayoutReq]

pricing[RW]

The pricing strategy to collect payment fees for each merchant. @return [Pricing]

rbits[RW]

The pricing strategy to collect payment fees for each merchant. @return [List of EmbeddedRbit]

reference_id[RW]

The pricing strategy to collect payment fees for each merchant. @return [String]

statement_description[RW]

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

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  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.
  AccountsRequest1.new(beneficiary_legal_entity_id,
                       custom_data,
                       description,
                       incoming_payments,
                       industry,
                       name,
                       payout,
                       pricing,
                       rbits,
                       reference_id,
                       statement_description)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/accounts_request1.rb, line 55
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['name'] = 'name'
  @_hash['payout'] = 'payout'
  @_hash['pricing'] = 'pricing'
  @_hash['rbits'] = 'rbits'
  @_hash['reference_id'] = 'reference_id'
  @_hash['statement_description'] = 'statement_description'
  @_hash
end
new(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) click to toggle source
# File lib/beaver/models/accounts_request1.rb, line 71
def initialize(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
  @name = name
  @payout = payout
  @pricing = pricing
  @rbits = rbits
  @reference_id = reference_id
  @statement_description = statement_description
end