class Beaver::RbitsResponse

RbitsResponse Model.

Attributes

address[RW]

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

api_version[RW]

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

auto_billing[RW]

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

business_description[RW]

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

business_name[RW]

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

create_time[RW]

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

external_account[RW]

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

fundraising_event[RW]

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

fundraising_update[RW]

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

id[RW]

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

industry_code[RW]

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

mfa[RW]

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

owner[RW]

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

partner_service[RW]

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

path[RW]

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

person[RW]

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

phone[RW]

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

receive_time[RW]

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

resource[RW]

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

source[RW]

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

state[RW]

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

transaction_details[RW]

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

type[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  create_time = hash['create_time']
  id = hash['id']
  owner = Owner16.from_hash(hash['owner']) if hash['owner']
  path = hash['path']
  receive_time = hash['receive_time']
  resource = hash['resource']
  source = hash['source']
  state = hash['state']
  type = hash['type']
  address = AddressRbit.from_hash(hash['address']) if hash['address']
  auto_billing = AutoBilling.from_hash(hash['auto_billing']) if
    hash['auto_billing']
  if hash['business_description']
    business_description = BusinessDescription.from_hash(hash['business_description'])
  end
  business_name = BusinessName.from_hash(hash['business_name']) if
    hash['business_name']
  external_account = ExternalAccount.from_hash(hash['external_account']) if
    hash['external_account']
  if hash['fundraising_event']
    fundraising_event = FundraisingEvent.from_hash(hash['fundraising_event'])
  end
  if hash['fundraising_update']
    fundraising_update = FundraisingUpdate.from_hash(hash['fundraising_update'])
  end
  industry_code = IndustryCode.from_hash(hash['industry_code']) if
    hash['industry_code']
  partner_service = PartnerServiceRbit.from_hash(hash['partner_service']) if
    hash['partner_service']
  person = PersonRbit.from_hash(hash['person']) if hash['person']
  phone = PhoneRbit.from_hash(hash['phone']) if hash['phone']
  mfa = MfaRbit.from_hash(hash['mfa']) if hash['mfa']
  if hash['transaction_details']
    transaction_details = TransactionDetails.from_hash(hash['transaction_details'])
  end
  api_version = hash['api_version']

  # Create object from extracted values.
  RbitsResponse.new(create_time,
                    id,
                    owner,
                    path,
                    receive_time,
                    resource,
                    source,
                    state,
                    type,
                    address,
                    auto_billing,
                    business_description,
                    business_name,
                    external_account,
                    fundraising_event,
                    fundraising_update,
                    industry_code,
                    partner_service,
                    person,
                    phone,
                    mfa,
                    transaction_details,
                    api_version)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/rbits_response.rb, line 102
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['address'] = 'address'
  @_hash['auto_billing'] = 'auto_billing'
  @_hash['business_description'] = 'business_description'
  @_hash['business_name'] = 'business_name'
  @_hash['create_time'] = 'create_time'
  @_hash['external_account'] = 'external_account'
  @_hash['fundraising_event'] = 'fundraising_event'
  @_hash['fundraising_update'] = 'fundraising_update'
  @_hash['id'] = 'id'
  @_hash['industry_code'] = 'industry_code'
  @_hash['owner'] = 'owner'
  @_hash['partner_service'] = 'partner_service'
  @_hash['path'] = 'path'
  @_hash['person'] = 'person'
  @_hash['phone'] = 'phone'
  @_hash['mfa'] = 'mfa'
  @_hash['receive_time'] = 'receive_time'
  @_hash['resource'] = 'resource'
  @_hash['source'] = 'source'
  @_hash['state'] = 'state'
  @_hash['transaction_details'] = 'transaction_details'
  @_hash['type'] = 'type'
  @_hash['api_version'] = 'api_version'
  @_hash
end
new(create_time = nil, id = nil, owner = nil, path = nil, receive_time = nil, resource = nil, source = nil, state = nil, type = nil, address = nil, auto_billing = nil, business_description = nil, business_name = nil, external_account = nil, fundraising_event = nil, fundraising_update = nil, industry_code = nil, partner_service = nil, person = nil, phone = nil, mfa = nil, transaction_details = nil, api_version = nil) click to toggle source
# File lib/beaver/models/rbits_response.rb, line 130
def initialize(create_time = nil,
               id = nil,
               owner = nil,
               path = nil,
               receive_time = nil,
               resource = nil,
               source = nil,
               state = nil,
               type = nil,
               address = nil,
               auto_billing = nil,
               business_description = nil,
               business_name = nil,
               external_account = nil,
               fundraising_event = nil,
               fundraising_update = nil,
               industry_code = nil,
               partner_service = nil,
               person = nil,
               phone = nil,
               mfa = nil,
               transaction_details = nil,
               api_version = nil)
  @address = address
  @auto_billing = auto_billing
  @business_description = business_description
  @business_name = business_name
  @create_time = create_time
  @external_account = external_account
  @fundraising_event = fundraising_event
  @fundraising_update = fundraising_update
  @id = id
  @industry_code = industry_code
  @owner = owner
  @partner_service = partner_service
  @path = path
  @person = person
  @phone = phone
  @mfa = mfa
  @receive_time = receive_time
  @resource = resource
  @source = source
  @state = state
  @transaction_details = transaction_details
  @type = type
  @api_version = api_version
end