Class: ActiveShipping::CPPWSMerchantDetailsResponse

Inherits:
Response
  • Object
show all
Includes:
CPPWSErrorResponse
Defined in:
lib/active_shipping/carriers/canada_post_pws.rb

Instance Attribute Summary collapse

Attributes included from CPPWSErrorResponse

#error_code

Attributes inherited from Response

#message, #params, #request, #test, #xml

Instance Method Summary collapse

Methods included from CPPWSErrorResponse

#handle_error

Methods inherited from Response

#success?, #test?

Constructor Details

#initialize(success, message, params = {}, options = {}) ⇒ CPPWSMerchantDetailsResponse

Returns a new instance of CPPWSMerchantDetailsResponse.



893
894
895
896
897
898
899
900
901
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 893

def initialize(success, message, params = {}, options = {})
  handle_error(message, options)
  super
  @customer_number = options[:customer_number]
  @contract_number = options[:contract_number]
  @username = options[:username]
  @password = options[:password]
  @has_default_credit_card = options[:has_default_credit_card]
end

Instance Attribute Details

#contract_numberObject (readonly)

Returns the value of attribute contract_number.



892
893
894
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 892

def contract_number
  @contract_number
end

#customer_numberObject (readonly)

Returns the value of attribute customer_number.



892
893
894
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 892

def customer_number
  @customer_number
end

#has_default_credit_cardObject (readonly)

Returns the value of attribute has_default_credit_card.



892
893
894
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 892

def has_default_credit_card
  @has_default_credit_card
end

#passwordObject (readonly)

Returns the value of attribute password.



892
893
894
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 892

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username.



892
893
894
# File 'lib/active_shipping/carriers/canada_post_pws.rb', line 892

def username
  @username
end