class Beaver::LegalEntity
LegalEntity
Model.
Attributes
TODO: Write general description for this method @return [AdditionalRepresentativesReq]
TODO: Write general description for this method @return [AddressLegalEntitiesNullable]
TODO: Write general description for this method @return [ControllerReq]
TODO: Write general description for this method @return [CountryCodeEnum]
TODO: Write general description for this method @return [Object]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [EntityCountryInfo]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [PhoneLegalEntitiesNullable]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [List of EmbeddedRbit]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [TermsOfService]
TODO: Write general description for this method @return [Token]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/legal_entity.rb, line 116 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. country = hash['country'] 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. LegalEntity.new(country, additional_representatives, address, controller, custom_data, description, entity_country_info, entity_name, phone, primary_url, rbits, terms_of_service, token, reference_id) end
A mapping from model property names to API property names.
# File lib/beaver/models/legal_entity.rb, line 66 def self.names @_hash = {} if @_hash.nil? @_hash['additional_representatives'] = 'additional_representatives' @_hash['address'] = 'address' @_hash['controller'] = 'controller' @_hash['country'] = 'country' @_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
# File lib/beaver/models/legal_entity.rb, line 85 def initialize(country = nil, 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 @country = country @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