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.



861
862
863
864
865
866
867
868
869
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 861

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.



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

def available_postage
  @available_postage
end

#control_totalObject (readonly)

Returns the value of attribute control_total.



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

def control_total
  @control_total
end

#label_urlObject (readonly)

Returns the value of attribute label_url.



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

def label_url
  @label_url
end

#rateObject (readonly)

Returns the value of attribute rate.



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

def rate
  @rate
end

#stamps_tx_idObject (readonly)

Returns the value of attribute stamps_tx_id.



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

def stamps_tx_id
  @stamps_tx_id
end

Instance Method Details

#imageObject



871
872
873
# File 'lib/active_shipping/shipping/carriers/stamps.rb', line 871

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