Class: ActiveShipping::StampsShippingResponse

Inherits:
ShippingResponse show all
Includes:
ActiveUtils::PostsData
Defined in:
lib/active_shipping/carriers/stamps.rb

Instance Attribute Summary collapse

Attributes inherited from ShippingResponse

#shipping_id, #tracking_number

Attributes inherited from Response

#message, #params, #request, #test, #xml

Instance Method Summary collapse

Methods inherited from Response

#success?, #test?

Constructor Details

#initialize(success, message, params = {}, options = {}) ⇒ StampsShippingResponse

Returns a new instance of StampsShippingResponse.



846
847
848
849
850
851
852
853
854
# File 'lib/active_shipping/carriers/stamps.rb', line 846

def initialize(success, message, params = {}, options = {})
  super
  @rate              = options[:rate]
  @stamps_tx_id      = options[:stamps_tx_id]
  @label_url         = options[:label_url]
  @image_data        = options[:image_data]
  @available_postage = options[:available_postage]
  @control_total     = options[:control_total]
end

Instance Attribute Details

#available_postageObject (readonly)

Returns the value of attribute available_postage.



844
845
846
# File 'lib/active_shipping/carriers/stamps.rb', line 844

def available_postage
  @available_postage
end

#control_totalObject (readonly)

Returns the value of attribute control_total.



844
845
846
# File 'lib/active_shipping/carriers/stamps.rb', line 844

def control_total
  @control_total
end

#label_urlObject (readonly)

Returns the value of attribute label_url.



844
845
846
# File 'lib/active_shipping/carriers/stamps.rb', line 844

def label_url
  @label_url
end

#rateObject (readonly)

Returns the value of attribute rate.



844
845
846
# File 'lib/active_shipping/carriers/stamps.rb', line 844

def rate
  @rate
end

#stamps_tx_idObject (readonly)

Returns the value of attribute stamps_tx_id.



844
845
846
# File 'lib/active_shipping/carriers/stamps.rb', line 844

def stamps_tx_id
  @stamps_tx_id
end

Instance Method Details

#imageObject



856
857
858
# File 'lib/active_shipping/carriers/stamps.rb', line 856

def image
  @image_data ||= ssl_get(label_url)
end