Class: Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer
- Defined in:
- lib/ingenico/connect/sdk/domain/payout/payout_customer.rb
Overview
Class PayoutCustomer
Instance Attribute Summary collapse
- #address ⇒ Object
- #company_information ⇒ Object
- #contact_details ⇒ Object
-
#merchant_customer_id ⇒ Object
String.
- #name ⇒ Object
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#address ⇒ Object
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 19 def address @address end |
#company_information ⇒ Object
22 23 24 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 22 def company_information @company_information end |
#contact_details ⇒ Object
25 26 27 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 25 def contact_details @contact_details end |
#merchant_customer_id ⇒ Object
String
28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 28 def merchant_customer_id @merchant_customer_id end |
#name ⇒ Object
31 32 33 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 31 def name @name end |
Instance Method Details
#from_hash(hash) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 43 def from_hash(hash) super if hash.has_key?('address') if !(hash['address'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['address']] end @address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['address']) end if hash.has_key?('companyInformation') if !(hash['companyInformation'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['companyInformation']] end @company_information = Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation.new_from_hash(hash['companyInformation']) end if hash.has_key?('contactDetails') if !(hash['contactDetails'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] end @contact_details = Ingenico::Connect::SDK::Domain::Definitions::ContactDetailsBase.new_from_hash(hash['contactDetails']) end if hash.has_key?('merchantCustomerId') @merchant_customer_id = hash['merchantCustomerId'] end if hash.has_key?('name') if !(hash['name'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['name']] end @name = Ingenico::Connect::SDK::Domain::Payment::PersonalName.new_from_hash(hash['name']) end end |
#to_h ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/payout/payout_customer.rb', line 33 def to_h hash = super add_to_hash(hash, 'address', @address) add_to_hash(hash, 'companyInformation', @company_information) add_to_hash(hash, 'contactDetails', @contact_details) add_to_hash(hash, 'merchantCustomerId', @merchant_customer_id) add_to_hash(hash, 'name', @name) hash end |