Class: OnlinePayments::SDK::Domain::ShippingDetail
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::ShippingDetail
- Defined in:
- lib/onlinepayments/sdk/domain/shipping_detail.rb
Instance Attribute Summary collapse
-
#shipping_cost ⇒ Integer
The current value of shipping_cost.
-
#shipping_cost_tax ⇒ Integer
The current value of shipping_cost_tax.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#shipping_cost ⇒ Integer
Returns the current value of shipping_cost.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/shipping_detail.rb', line 11 def shipping_cost @shipping_cost end |
#shipping_cost_tax ⇒ Integer
Returns the current value of shipping_cost_tax.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/shipping_detail.rb', line 11 def shipping_cost_tax @shipping_cost_tax end |
Instance Method Details
#from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/onlinepayments/sdk/domain/shipping_detail.rb', line 25 def from_hash(hash) super if hash.has_key? 'shippingCost' @shipping_cost = hash['shippingCost'] end if hash.has_key? 'shippingCostTax' @shipping_cost_tax = hash['shippingCostTax'] end end |
#to_h ⇒ Hash
18 19 20 21 22 23 |
# File 'lib/onlinepayments/sdk/domain/shipping_detail.rb', line 18 def to_h hash = super hash['shippingCost'] = @shipping_cost unless @shipping_cost.nil? hash['shippingCostTax'] = @shipping_cost_tax unless @shipping_cost_tax.nil? hash end |