Class: Worldline::Connect::SDK::V1::Domain::PayoutCustomer
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::PayoutCustomer
- Defined in:
- lib/worldline/connect/sdk/v1/domain/payout_customer.rb
Instance Attribute Summary collapse
-
#address ⇒ Worldline::Connect::SDK::V1::Domain::Address
The current value of address.
-
#company_information ⇒ Worldline::Connect::SDK::V1::Domain::CompanyInformation
The current value of company_information.
-
#contact_details ⇒ Worldline::Connect::SDK::V1::Domain::ContactDetailsBase
The current value of contact_details.
-
#merchant_customer_id ⇒ String
The current value of merchant_customer_id.
-
#name ⇒ Worldline::Connect::SDK::V1::Domain::PersonalName
The current value of name.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#address ⇒ Worldline::Connect::SDK::V1::Domain::Address
Returns the current value of address.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 21 def address @address end |
#company_information ⇒ Worldline::Connect::SDK::V1::Domain::CompanyInformation
Returns the current value of company_information.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 21 def company_information @company_information end |
#contact_details ⇒ Worldline::Connect::SDK::V1::Domain::ContactDetailsBase
Returns the current value of contact_details.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 21 def contact_details @contact_details end |
#merchant_customer_id ⇒ String
Returns the current value of merchant_customer_id.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 21 def merchant_customer_id @merchant_customer_id end |
#name ⇒ Worldline::Connect::SDK::V1::Domain::PersonalName
Returns the current value of name.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 21 def name @name end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 44 def from_hash(hash) super if hash.has_key? 'address' raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash @address = Worldline::Connect::SDK::V1::Domain::Address.new_from_hash(hash['address']) end 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? 'contactDetails' raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash @contact_details = Worldline::Connect::SDK::V1::Domain::ContactDetailsBase.new_from_hash(hash['contactDetails']) end if hash.has_key? 'merchantCustomerId' @merchant_customer_id = hash['merchantCustomerId'] end if hash.has_key? 'name' raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash @name = Worldline::Connect::SDK::V1::Domain::PersonalName.new_from_hash(hash['name']) end end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/connect/sdk/v1/domain/payout_customer.rb', line 34 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['companyInformation'] = @company_information.to_h unless @company_information.nil? hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil? hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil? hash['name'] = @name.to_h unless @name.nil? hash end |