class Beaver::AccountResp

AccountResp Model.

Attributes

api_version[RW]

A non-empty ASCII printable string does not contain the word wepay that appears on the merchants’ customers’ credit card statement. @return [String]

balances[RW]

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

beneficiary[RW]

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

create_time[RW]

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

custom_data[RW]

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

description[RW]

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

enhanced_review[RW]

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

id[RW]

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

incoming_payments[RW]

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

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]

owner[RW]

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

path[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 [PayoutResp]

pricing[RW]

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

reference_id[RW]

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

resource[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/account_resp.rb, line 146
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  create_time = hash['create_time']
  id = hash['id']
  owner = OwnerLegalEntities.from_hash(hash['owner']) if hash['owner']
  path = hash['path']
  pricing = Pricing.from_hash(hash['pricing']) if hash['pricing']
  resource = hash['resource']
  api_version = hash['api_version']
  balances = Balances.from_hash(hash['balances']) if hash['balances']
  beneficiary = OwnerLegalEntities.from_hash(hash['beneficiary']) if
    hash['beneficiary']
  custom_data = hash['custom_data']
  description = hash['description']
  enhanced_review = hash['enhanced_review']
  if hash['incoming_payments']
    incoming_payments = IncomingPaymentsResp.from_hash(hash['incoming_payments'])
  end
  industry = Industry.from_hash(hash['industry']) if hash['industry']
  name = hash['name']
  payout = PayoutResp.from_hash(hash['payout']) if hash['payout']
  reference_id = hash['reference_id']
  statement_description = hash['statement_description']

  # Create object from extracted values.
  AccountResp.new(create_time,
                  id,
                  owner,
                  path,
                  pricing,
                  resource,
                  api_version,
                  balances,
                  beneficiary,
                  custom_data,
                  description,
                  enhanced_review,
                  incoming_payments,
                  industry,
                  name,
                  payout,
                  reference_id,
                  statement_description)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/account_resp.rb, line 84
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['balances'] = 'balances'
  @_hash['beneficiary'] = 'beneficiary'
  @_hash['create_time'] = 'create_time'
  @_hash['custom_data'] = 'custom_data'
  @_hash['description'] = 'description'
  @_hash['enhanced_review'] = 'enhanced_review'
  @_hash['id'] = 'id'
  @_hash['incoming_payments'] = 'incoming_payments'
  @_hash['industry'] = 'industry'
  @_hash['name'] = 'name'
  @_hash['owner'] = 'owner'
  @_hash['path'] = 'path'
  @_hash['payout'] = 'payout'
  @_hash['pricing'] = 'pricing'
  @_hash['reference_id'] = 'reference_id'
  @_hash['resource'] = 'resource'
  @_hash['statement_description'] = 'statement_description'
  @_hash['api_version'] = 'api_version'
  @_hash
end
new(create_time = nil, id = nil, owner = nil, path = nil, pricing = nil, resource = nil, api_version = nil, balances = nil, beneficiary = nil, custom_data = nil, description = nil, enhanced_review = nil, incoming_payments = nil, industry = nil, name = nil, payout = nil, reference_id = nil, statement_description = nil) click to toggle source
# File lib/beaver/models/account_resp.rb, line 107
def initialize(create_time = nil,
               id = nil,
               owner = nil,
               path = nil,
               pricing = nil,
               resource = nil,
               api_version = nil,
               balances = nil,
               beneficiary = nil,
               custom_data = nil,
               description = nil,
               enhanced_review = nil,
               incoming_payments = nil,
               industry = nil,
               name = nil,
               payout = nil,
               reference_id = nil,
               statement_description = nil)
  @balances = balances
  @beneficiary = beneficiary
  @create_time = create_time
  @custom_data = custom_data
  @description = description
  @enhanced_review = enhanced_review
  @id = id
  @incoming_payments = incoming_payments
  @industry = industry
  @name = name
  @owner = owner
  @path = path
  @payout = payout
  @pricing = pricing
  @reference_id = reference_id
  @resource = resource
  @statement_description = statement_description
  @api_version = api_version
end