Class: ReactiveShipping::CanadaPost::CanadaPostRateResponse

Inherits:
RateResponse show all
Defined in:
lib/reactive_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.



10
11
12
13
14
# File 'lib/reactive_shipping/carriers/canada_post.rb', line 10

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.



8
9
10
# File 'lib/reactive_shipping/carriers/canada_post.rb', line 8

def boxes
  @boxes
end

#postal_outletsObject (readonly)

Returns the value of attribute postal_outlets.



8
9
10
# File 'lib/reactive_shipping/carriers/canada_post.rb', line 8

def postal_outlets
  @postal_outlets
end