Class: Worldline::Connect::SDK::V1::Domain::CapturePaymentShipping
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CapturePaymentShipping
- Defined in:
- lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb
Instance Attribute Summary collapse
-
#address ⇒ Worldline::Connect::SDK::V1::Domain::AddressPersonal
The current value of address.
-
#email_address ⇒ String
The current value of email_address.
-
#shipped_from_zip ⇒ String
The current value of shipped_from_zip.
-
#tracking_number ⇒ String
The current value of tracking_number.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#address ⇒ Worldline::Connect::SDK::V1::Domain::AddressPersonal
Returns the current value of address.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb', line 17 def address @address end |
#email_address ⇒ String
Returns the current value of email_address.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb', line 17 def email_address @email_address end |
#shipped_from_zip ⇒ String
Returns the current value of shipped_from_zip.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb', line 17 def shipped_from_zip @shipped_from_zip end |
#tracking_number ⇒ String
Returns the current value of tracking_number.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb', line 17 def tracking_number @tracking_number end |
Instance Method Details
#from_hash(hash) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb', line 37 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::AddressPersonal.new_from_hash(hash['address']) end if hash.has_key? 'emailAddress' @email_address = hash['emailAddress'] end if hash.has_key? 'shippedFromZip' @shipped_from_zip = hash['shippedFromZip'] end if hash.has_key? 'trackingNumber' @tracking_number = hash['trackingNumber'] end end |
#to_h ⇒ Hash
28 29 30 31 32 33 34 35 |
# File 'lib/worldline/connect/sdk/v1/domain/capture_payment_shipping.rb', line 28 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['emailAddress'] = @email_address unless @email_address.nil? hash['shippedFromZip'] = @shipped_from_zip unless @shipped_from_zip.nil? hash['trackingNumber'] = @tracking_number unless @tracking_number.nil? hash end |