Class: ActiveMerchant::Shipping::StampsShippingResponse

Inherits:
ShippingResponse show all
Includes:
PostsData
Defined in:
lib/active_shipping/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


849
850
851
852
853
854
855
856
857
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 849

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


847
848
849
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 847

def available_postage
  @available_postage
end

#control_totalObject (readonly)

Returns the value of attribute control_total


847
848
849
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 847

def control_total
  @control_total
end

#label_urlObject (readonly)

Returns the value of attribute label_url


847
848
849
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 847

def label_url
  @label_url
end

#rateObject (readonly)

Returns the value of attribute rate


847
848
849
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 847

def rate
  @rate
end

#stamps_tx_idObject (readonly)

Returns the value of attribute stamps_tx_id


847
848
849
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 847

def stamps_tx_id
  @stamps_tx_id
end

Instance Method Details

#imageObject


859
860
861
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 859

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