class Beaver::LegalEntitiesRequest

LegalEntitiesRequest Model.

Attributes

additional_representatives[RW]

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

address[RW]

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

controller[RW]

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

custom_data[RW]

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

description[RW]

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

entity_country_info[RW]

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

entity_name[RW]

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

phone[RW]

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

primary_url[RW]

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

rbits[RW]

TODO: Write general description for this method @return [List of EmbeddedRbit]

reference_id[RW]

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

terms_of_service[RW]

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

token[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  if hash['additional_representatives']
    additional_representatives = AdditionalRepresentativesReq.from_hash(hash['additional_representatives'])
  end
  address = AddressLegalEntitiesNullable.from_hash(hash['address']) if
    hash['address']
  controller = ControllerReq.from_hash(hash['controller']) if
    hash['controller']
  custom_data = hash['custom_data']
  description = hash['description']
  if hash['entity_country_info']
    entity_country_info = EntityCountryInfo.from_hash(hash['entity_country_info'])
  end
  entity_name = hash['entity_name']
  phone = PhoneLegalEntitiesNullable.from_hash(hash['phone']) if
    hash['phone']
  primary_url = hash['primary_url']
  # 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
  terms_of_service = TermsOfService.from_hash(hash['terms_of_service']) if
    hash['terms_of_service']
  token = Token.from_hash(hash['token']) if hash['token']
  reference_id = hash['reference_id']

  # Create object from extracted values.
  LegalEntitiesRequest.new(additional_representatives,
                           address,
                           controller,
                           custom_data,
                           description,
                           entity_country_info,
                           entity_name,
                           phone,
                           primary_url,
                           rbits,
                           terms_of_service,
                           token,
                           reference_id)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/legal_entities_request.rb, line 62
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['additional_representatives'] = 'additional_representatives'
  @_hash['address'] = 'address'
  @_hash['controller'] = 'controller'
  @_hash['custom_data'] = 'custom_data'
  @_hash['description'] = 'description'
  @_hash['entity_country_info'] = 'entity_country_info'
  @_hash['entity_name'] = 'entity_name'
  @_hash['phone'] = 'phone'
  @_hash['primary_url'] = 'primary_url'
  @_hash['rbits'] = 'rbits'
  @_hash['terms_of_service'] = 'terms_of_service'
  @_hash['token'] = 'token'
  @_hash['reference_id'] = 'reference_id'
  @_hash
end
new(additional_representatives = nil, address = nil, controller = nil, custom_data = nil, description = nil, entity_country_info = nil, entity_name = nil, phone = nil, primary_url = nil, rbits = nil, terms_of_service = nil, token = nil, reference_id = nil) click to toggle source
# File lib/beaver/models/legal_entities_request.rb, line 80
def initialize(additional_representatives = nil,
               address = nil,
               controller = nil,
               custom_data = nil,
               description = nil,
               entity_country_info = nil,
               entity_name = nil,
               phone = nil,
               primary_url = nil,
               rbits = nil,
               terms_of_service = nil,
               token = nil,
               reference_id = nil)
  @additional_representatives = additional_representatives
  @address = address
  @controller = controller
  @custom_data = custom_data
  @description = description
  @entity_country_info = entity_country_info
  @entity_name = entity_name
  @phone = phone
  @primary_url = primary_url
  @rbits = rbits
  @terms_of_service = terms_of_service
  @token = token
  @reference_id = reference_id
end