Class: Ingenico::Connect::SDK::Domain::Refund::RefundCustomer
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Refund::RefundCustomer
- Defined in:
- lib/ingenico/connect/sdk/domain/refund/refund_customer.rb
Instance Attribute Summary collapse
-
#address ⇒ Ingenico::Connect::SDK::Domain::Payment::AddressPersonal
The current value of address.
-
#company_information ⇒ Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation
The current value of company_information.
-
#contact_details ⇒ Ingenico::Connect::SDK::Domain::Definitions::ContactDetailsBase
The current value of contact_details.
-
#fiscal_number ⇒ String
The current value of fiscal_number.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#address ⇒ Ingenico::Connect::SDK::Domain::Payment::AddressPersonal
Returns the current value of address.
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_customer.rb', line 18 def address @address end |
#company_information ⇒ Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation
Returns the current value of company_information.
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_customer.rb', line 18 def company_information @company_information end |
#contact_details ⇒ Ingenico::Connect::SDK::Domain::Definitions::ContactDetailsBase
Returns the current value of contact_details.
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_customer.rb', line 18 def contact_details @contact_details end |
#fiscal_number ⇒ String
Returns the current value of fiscal_number.
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_customer.rb', line 18 def fiscal_number @fiscal_number end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_customer.rb', line 38 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 = Ingenico::Connect::SDK::Domain::Payment::AddressPersonal.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 = Ingenico::Connect::SDK::Domain::Definitions::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 = Ingenico::Connect::SDK::Domain::Definitions::ContactDetailsBase.new_from_hash(hash['contactDetails']) end if hash.has_key? 'fiscalNumber' @fiscal_number = hash['fiscalNumber'] end end |
#to_h ⇒ Hash
29 30 31 32 33 34 35 36 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_customer.rb', line 29 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['fiscalNumber'] = @fiscal_number unless @fiscal_number.nil? hash end |