Class: Ingenico::Connect::SDK::Domain::Mandates::CreateMandateBase
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Mandates::CreateMandateBase
- Defined in:
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#alias ⇒ Object
String.
- #customer ⇒ Object
-
#customer_reference ⇒ Object
String.
-
#language ⇒ Object
String.
-
#recurrence_type ⇒ Object
String.
-
#signature_type ⇒ Object
String.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#alias ⇒ Object
String
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 15 def alias @alias end |
#customer ⇒ Object
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 18 def customer @customer end |
#customer_reference ⇒ Object
String
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 21 def customer_reference @customer_reference end |
#language ⇒ Object
String
24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 24 def language @language end |
#recurrence_type ⇒ Object
String
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 27 def recurrence_type @recurrence_type end |
#signature_type ⇒ Object
String
30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 30 def signature_type @signature_type 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 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 43 def from_hash(hash) super if hash.has_key?('alias') @alias = hash['alias'] end if hash.has_key?('customer') if !(hash['customer'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['customer']] end @customer = Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer.new_from_hash(hash['customer']) end if hash.has_key?('customerReference') @customer_reference = hash['customerReference'] end if hash.has_key?('language') @language = hash['language'] end if hash.has_key?('recurrenceType') @recurrence_type = hash['recurrenceType'] end if hash.has_key?('signatureType') @signature_type = hash['signatureType'] end end |
#to_h ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb', line 32 def to_h hash = super add_to_hash(hash, 'alias', @alias) add_to_hash(hash, 'customer', @customer) add_to_hash(hash, 'customerReference', @customer_reference) add_to_hash(hash, 'language', @language) add_to_hash(hash, 'recurrenceType', @recurrence_type) add_to_hash(hash, 'signatureType', @signature_type) hash end |