Class: ActiveMerchant::Shipping::CPPWSMerchantDetailsResponse

Inherits:
Response
  • Object
show all
Includes:
CPPWSErrorResponse
Defined in:
lib/active_shipping/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


858
859
860
861
862
863
864
865
866
# File 'lib/active_shipping/shipping/carriers/canada_post_pws.rb', line 858

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


857
858
859
# File 'lib/active_shipping/shipping/carriers/canada_post_pws.rb', line 857

def contract_number
  @contract_number
end

#customer_numberObject (readonly)

Returns the value of attribute customer_number


857
858
859
# File 'lib/active_shipping/shipping/carriers/canada_post_pws.rb', line 857

def customer_number
  @customer_number
end

#has_default_credit_cardObject (readonly)

Returns the value of attribute has_default_credit_card


857
858
859
# File 'lib/active_shipping/shipping/carriers/canada_post_pws.rb', line 857

def has_default_credit_card
  @has_default_credit_card
end

#passwordObject (readonly)

Returns the value of attribute password


857
858
859
# File 'lib/active_shipping/shipping/carriers/canada_post_pws.rb', line 857

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username


857
858
859
# File 'lib/active_shipping/shipping/carriers/canada_post_pws.rb', line 857

def username
  @username
end