Class: ActiveShipping::CPPWSRegisterResponse
- Includes:
- CPPWSErrorResponse
- Defined in:
- lib/active_shipping/carriers/canada_post_pws.rb
Instance Attribute Summary collapse
-
#token_id ⇒ Object
readonly
Returns the value of attribute token_id.
Attributes included from CPPWSErrorResponse
Attributes inherited from Response
#message, #params, #request, #test, #xml
Instance Method Summary collapse
-
#initialize(success, message, params = {}, options = {}) ⇒ CPPWSRegisterResponse
constructor
A new instance of CPPWSRegisterResponse.
- #redirect_url(customer_id, return_url) ⇒ Object
Methods included from CPPWSErrorResponse
Methods inherited from Response
Constructor Details
#initialize(success, message, params = {}, options = {}) ⇒ CPPWSRegisterResponse
Returns a new instance of CPPWSRegisterResponse.
879 880 881 882 883 |
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 879 def initialize(success, , params = {}, = {}) handle_error(, ) super @token_id = [:token_id] end |
Instance Attribute Details
#token_id ⇒ Object (readonly)
Returns the value of attribute token_id.
878 879 880 |
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 878 def token_id @token_id end |
Instance Method Details
#redirect_url(customer_id, return_url) ⇒ Object
885 886 887 |
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 885 def redirect_url(customer_id, return_url) "http://www.canadapost.ca/cpotools/apps/drc/merchant?return-url=#{CGI.escape(return_url)}&token-id=#{token_id}&platform-id=#{customer_id}" end |