class Beaver::RbitsRequest

RbitsRequest Model.

Attributes

address[RW]

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

associated_resource[RW]

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

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]

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]

industry_code[RW]

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

mfa[RW]

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

partner_service[RW]

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

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]

source[RW]

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

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_request.rb, line 137
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  if hash['associated_resource']
    associated_resource = AssociatedResource.from_hash(hash['associated_resource'])
  end
  receive_time = hash['receive_time']
  source = hash['source']
  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

  # Create object from extracted values.
  RbitsRequest.new(associated_resource,
                   receive_time,
                   source,
                   type,
                   address,
                   auto_billing,
                   business_description,
                   business_name,
                   external_account,
                   fundraising_event,
                   fundraising_update,
                   industry_code,
                   partner_service,
                   person,
                   phone,
                   mfa,
                   transaction_details)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/rbits_request.rb, line 78
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['address'] = 'address'
  @_hash['associated_resource'] = 'associated_resource'
  @_hash['auto_billing'] = 'auto_billing'
  @_hash['business_description'] = 'business_description'
  @_hash['business_name'] = 'business_name'
  @_hash['external_account'] = 'external_account'
  @_hash['fundraising_event'] = 'fundraising_event'
  @_hash['fundraising_update'] = 'fundraising_update'
  @_hash['industry_code'] = 'industry_code'
  @_hash['partner_service'] = 'partner_service'
  @_hash['person'] = 'person'
  @_hash['phone'] = 'phone'
  @_hash['mfa'] = 'mfa'
  @_hash['receive_time'] = 'receive_time'
  @_hash['source'] = 'source'
  @_hash['transaction_details'] = 'transaction_details'
  @_hash['type'] = 'type'
  @_hash
end
new(associated_resource = nil, receive_time = nil, source = 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) click to toggle source
# File lib/beaver/models/rbits_request.rb, line 100
def initialize(associated_resource = nil,
               receive_time = nil,
               source = 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)
  @address = address
  @associated_resource = associated_resource
  @auto_billing = auto_billing
  @business_description = business_description
  @business_name = business_name
  @external_account = external_account
  @fundraising_event = fundraising_event
  @fundraising_update = fundraising_update
  @industry_code = industry_code
  @partner_service = partner_service
  @person = person
  @phone = phone
  @mfa = mfa
  @receive_time = receive_time
  @source = source
  @transaction_details = transaction_details
  @type = type
end