Class: Shippinglogic::UPS::ShipConfirm::Details

Inherits:
Object
  • Object
show all
Defined in:
lib/shippinglogic/ups/ship_confirm.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Details) initialize(response)

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

- (Object) currency

Returns the value of attribute currency



9
10
11
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9

def currency
  @currency
end

- (Object) digest

Returns the value of attribute digest



9
10
11
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9

def digest
  @digest
end

- (Object) rate

Returns the value of attribute rate



9
10
11
# File 'lib/shippinglogic/ups/ship_confirm.rb', line 9

def rate
  @rate
end

- (Object) tracking_number

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