Class: Worldline::Connect::SDK::V1::Domain::ShippingRiskAssessment
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::ShippingRiskAssessment
- Defined in:
- lib/worldline/connect/sdk/v1/domain/shipping_risk_assessment.rb
Instance Attribute Summary collapse
-
#address ⇒ Worldline::Connect::SDK::V1::Domain::AddressPersonal
The current value of address.
-
#comments ⇒ String
The current value of comments.
-
#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.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping_risk_assessment.rb', line 16 def address @address end |
#comments ⇒ String
Returns the current value of comments.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping_risk_assessment.rb', line 16 def comments @comments end |
#tracking_number ⇒ String
Returns the current value of tracking_number.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping_risk_assessment.rb', line 16 def tracking_number @tracking_number end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping_risk_assessment.rb', line 33 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? 'comments' @comments = hash['comments'] end if hash.has_key? 'trackingNumber' @tracking_number = hash['trackingNumber'] end end |
#to_h ⇒ Hash
25 26 27 28 29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/shipping_risk_assessment.rb', line 25 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['comments'] = @comments unless @comments.nil? hash['trackingNumber'] = @tracking_number unless @tracking_number.nil? hash end |