Class: ChannelAdvisor::AuthHandler
- Inherits:
-
SOAP::Header::SimpleHandler
- Object
- SOAP::Header::SimpleHandler
- ChannelAdvisor::AuthHandler
- Defined in:
- lib/channel_advisor/auth_handler.rb
Constant Summary collapse
- API_CREDENTIALS =
XSD::QName.new('http://api.channeladvisor.com/webservices/', 'APICredentials')
- DEVELOPER_KEY =
XSD::QName.new('http://api.channeladvisor.com/webservices/', 'DeveloperKey')
- PASSWORD =
XSD::QName.new('http://api.channeladvisor.com/webservices/', 'Password')
Instance Attribute Summary collapse
-
#developer_key ⇒ Object
Returns the value of attribute developer_key.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(developer_key = nil, password = nil) ⇒ AuthHandler
constructor
A new instance of AuthHandler.
- #on_simple_outbound ⇒ Object
Constructor Details
#initialize(developer_key = nil, password = nil) ⇒ AuthHandler
Returns a new instance of AuthHandler.
11 12 13 14 15 |
# File 'lib/channel_advisor/auth_handler.rb', line 11 def initialize(developer_key = nil, password = nil) super(API_CREDENTIALS) @developer_key = developer_key || configatron.channel_advisor.developer_key @password = password || configatron.channel_advisor.password end |
Instance Attribute Details
#developer_key ⇒ Object
Returns the value of attribute developer_key.
9 10 11 |
# File 'lib/channel_advisor/auth_handler.rb', line 9 def developer_key @developer_key end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/channel_advisor/auth_handler.rb', line 9 def password @password end |
Instance Method Details
#on_simple_outbound ⇒ Object
17 18 19 |
# File 'lib/channel_advisor/auth_handler.rb', line 17 def on_simple_outbound {PASSWORD => @password, DEVELOPER_KEY => @developer_key} end |