Class: Shippinglogic::UPS::ShipConfirm::Details
- Inherits:
-
Object
- Object
- Shippinglogic::UPS::ShipConfirm::Details
- Defined in:
- lib/shippinglogic/ups/ship_confirm.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#rate ⇒ Object
Returns the value of attribute rate.
-
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
Instance Method Summary collapse
-
#initialize(response) ⇒ Details
constructor
A new instance of Details.
Constructor Details
#initialize(response) ⇒ Details
Returns a new instance of Details.
11 12 13 14 15 16 17 18 |
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 11 def initialize(response) self.digest = response[:shipment_digest] self.tracking_number = response[:shipment_identification_number] charges = response[:shipment_charges][:total_charges] self.rate = BigDecimal.new(charges[:monetary_value]) self.currency = charges[:currency_code] end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
9 10 11 |
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9 def currency @currency end |
#digest ⇒ Object
Returns the value of attribute digest.
9 10 11 |
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9 def digest @digest end |
#rate ⇒ Object
Returns the value of attribute rate.
9 10 11 |
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9 def rate @rate end |
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
9 10 11 |
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9 def tracking_number @tracking_number end |