Class: Worldline::Connect::SDK::V1::Domain::CustomerBase
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CustomerBase
- Defined in:
- lib/worldline/connect/sdk/v1/domain/customer_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#company_information ⇒ Worldline::Connect::SDK::V1::Domain::CompanyInformation
The current value of company_information.
-
#merchant_customer_id ⇒ String
The current value of merchant_customer_id.
-
#vat_number ⇒ Object
deprecated
Deprecated.
Use companyInformation.vatNumber instead
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#company_information ⇒ Worldline::Connect::SDK::V1::Domain::CompanyInformation
Returns the current value of company_information.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_base.rb', line 16 def company_information @company_information end |
#merchant_customer_id ⇒ String
Returns the current value of merchant_customer_id.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_base.rb', line 16 def merchant_customer_id @merchant_customer_id end |
#vat_number ⇒ Object
Deprecated.
Use companyInformation.vatNumber instead
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_base.rb', line 16 def vat_number @vat_number end |
Instance Method Details
#from_hash(hash) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_base.rb', line 34 def from_hash(hash) super if hash.has_key? 'companyInformation' raise TypeError, "value '%s' is not a Hash" % [hash['companyInformation']] unless hash['companyInformation'].is_a? Hash @company_information = Worldline::Connect::SDK::V1::Domain::CompanyInformation.new_from_hash(hash['companyInformation']) end if hash.has_key? 'merchantCustomerId' @merchant_customer_id = hash['merchantCustomerId'] end if hash.has_key? 'vatNumber' @vat_number = hash['vatNumber'] end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_base.rb', line 26 def to_h hash = super hash['companyInformation'] = @company_information.to_h unless @company_information.nil? hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil? hash['vatNumber'] = @vat_number unless @vat_number.nil? hash end |