Class: ActiveMerchant::Shipping::CanadaPost::CanadaPostRateResponse

Inherits:
RateResponse show all
Defined in:
lib/active_shipping/shipping/carriers/canada_post.rb

Overview

NOTE! A Merchant CPC Id must be assigned to you by Canada Post CPC_DEMO_XML is just a public domain account for testing

Instance Attribute Summary collapse

Attributes inherited from RateResponse

#rates

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 = {}) ⇒ CanadaPostRateResponse

Returns a new instance of CanadaPostRateResponse.



16
17
18
19
20
# File 'lib/active_shipping/shipping/carriers/canada_post.rb', line 16

def initialize(success, message, params = {}, options = {})
  @boxes = options[:boxes]
  @postal_outlets = options[:postal_outlets]
  super
end

Instance Attribute Details

#boxesObject (readonly)

Returns the value of attribute boxes.



14
15
16
# File 'lib/active_shipping/shipping/carriers/canada_post.rb', line 14

def boxes
  @boxes
end

#postal_outletsObject (readonly)

Returns the value of attribute postal_outlets.



14
15
16
# File 'lib/active_shipping/shipping/carriers/canada_post.rb', line 14

def postal_outlets
  @postal_outlets
end