Class: Worldline::Connect::SDK::V1::Domain::Shipping
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::Shipping
- Defined in:
- lib/worldline/connect/sdk/v1/domain/shipping.rb
Instance Attribute Summary collapse
-
#address ⇒ Worldline::Connect::SDK::V1::Domain::AddressPersonal
The current value of address.
-
#address_indicator ⇒ String
The current value of address_indicator.
-
#carrier ⇒ String
The current value of carrier.
-
#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.
-
#instructions ⇒ String
The current value of instructions.
-
#is_first_usage ⇒ true/false
The current value of is_first_usage.
-
#shipped_from_zip ⇒ String
The current value of shipped_from_zip.
-
#tracking_number ⇒ String
The current value of tracking_number.
-
#type ⇒ String
The current value of type.
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.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def address @address end |
#address_indicator ⇒ String
Returns the current value of address_indicator.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def address_indicator @address_indicator end |
#carrier ⇒ String
Returns the current value of carrier.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def carrier @carrier end |
#comments ⇒ String
Returns the current value of comments.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def comments @comments end |
#email_address ⇒ String
Returns the current value of email_address.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def email_address @email_address end |
#first_usage_date ⇒ String
Returns the current value of first_usage_date.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def first_usage_date @first_usage_date end |
#instructions ⇒ String
Returns the current value of instructions.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def instructions @instructions end |
#is_first_usage ⇒ true/false
Returns the current value of is_first_usage.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def is_first_usage @is_first_usage end |
#shipped_from_zip ⇒ String
Returns the current value of shipped_from_zip.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def shipped_from_zip @shipped_from_zip end |
#tracking_number ⇒ String
Returns the current value of tracking_number.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def tracking_number @tracking_number end |
#type ⇒ String
Returns the current value of type.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 24 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 65 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? 'addressIndicator' @address_indicator = hash['addressIndicator'] end if hash.has_key? 'carrier' @carrier = hash['carrier'] 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? 'instructions' @instructions = hash['instructions'] end if hash.has_key? 'isFirstUsage' @is_first_usage = hash['isFirstUsage'] end if hash.has_key? 'shippedFromZip' @shipped_from_zip = hash['shippedFromZip'] end if hash.has_key? 'trackingNumber' @tracking_number = hash['trackingNumber'] end if hash.has_key? 'type' @type = hash['type'] end end |
#to_h ⇒ Hash
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping.rb', line 49 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['addressIndicator'] = @address_indicator unless @address_indicator.nil? hash['carrier'] = @carrier unless @carrier.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['instructions'] = @instructions unless @instructions.nil? hash['isFirstUsage'] = @is_first_usage unless @is_first_usage.nil? hash['shippedFromZip'] = @shipped_from_zip unless @shipped_from_zip.nil? hash['trackingNumber'] = @tracking_number unless @tracking_number.nil? hash['type'] = @type unless @type.nil? hash end |