Class: Ingenico::Connect::SDK::Domain::Payment::Shipping
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::Shipping
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/shipping.rb
Instance Attribute Summary collapse
-
#address ⇒ Ingenico::Connect::SDK::Domain::Payment::AddressPersonal
The current value of address.
-
#address_indicator ⇒ String
The current value of address_indicator.
-
#comments ⇒ String
The current value of comments.
-
#email_address ⇒ String
The current value of email_address.
-
#first_usage_date ⇒ String
The current value of first_usage_date.
-
#is_first_usage ⇒ true/false
The current value of is_first_usage.
-
#tracking_number ⇒ String
The current value of tracking_number.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#address ⇒ Ingenico::Connect::SDK::Domain::Payment::AddressPersonal
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def address @address end |
#address_indicator ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def address_indicator @address_indicator end |
#comments ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def comments @comments end |
#email_address ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def email_address @email_address end |
#first_usage_date ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def first_usage_date @first_usage_date end |
#is_first_usage ⇒ true/false
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def is_first_usage @is_first_usage end |
#tracking_number ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def tracking_number @tracking_number end |
#type ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 20 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 52 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? 'addressIndicator' @address_indicator = hash['addressIndicator'] end if hash.has_key? 'comments' @comments = hash['comments'] end if hash.has_key? 'emailAddress' @email_address = hash['emailAddress'] end if hash.has_key? 'firstUsageDate' @first_usage_date = hash['firstUsageDate'] end if hash.has_key? 'isFirstUsage' @is_first_usage = hash['isFirstUsage'] end if hash.has_key? 'trackingNumber' @tracking_number = hash['trackingNumber'] end if hash.has_key? 'type' @type = hash['type'] end end |
#to_h ⇒ Hash
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ingenico/connect/sdk/domain/payment/shipping.rb', line 39 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['addressIndicator'] = @address_indicator unless @address_indicator.nil? hash['comments'] = @comments unless @comments.nil? hash['emailAddress'] = @email_address unless @email_address.nil? hash['firstUsageDate'] = @first_usage_date unless @first_usage_date.nil? hash['isFirstUsage'] = @is_first_usage unless @is_first_usage.nil? hash['trackingNumber'] = @tracking_number unless @tracking_number.nil? hash['type'] = @type unless @type.nil? hash end |