Class: PurolatorRuby::EnvironmentCredentials
- Inherits:
-
Object
- Object
- PurolatorRuby::EnvironmentCredentials
- Defined in:
- lib/purolator_ruby/environment_credentials.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#billing_number ⇒ Object
readonly
Returns the value of attribute billing_number.
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#developer_key ⇒ Object
readonly
Returns the value of attribute developer_key.
-
#developer_password ⇒ Object
readonly
Returns the value of attribute developer_password.
-
#wsdl_location ⇒ Object
readonly
Returns the value of attribute wsdl_location.
Instance Method Summary collapse
- #basic_auth ⇒ Object
-
#initialize ⇒ EnvironmentCredentials
constructor
A new instance of EnvironmentCredentials.
- #soap_header ⇒ Object
Constructor Details
#initialize ⇒ EnvironmentCredentials
Returns a new instance of EnvironmentCredentials.
10 11 12 13 14 15 16 17 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 10 def initialize @wsdl_location = ENV.fetch('PLUROLATOR_RUBY_WSDL_LOCATION') @developer_key = ENV.fetch('PLUROLATOR_RUBY_DEVELOPER_KEY') @developer_password = ENV.fetch('PLUROLATOR_RUBY_DEVELOPER_PASSWORD') @client_id = ENV.fetch('PLUROLATOR_RUBY_CLIENT_ID') @account_number = ENV.fetch('PLUROLATOR_RUBY_ACCOUNT_NUMBER') @billing_number = ENV.fetch('PLUROLATOR_RUBY_BILLING_NUMBER') end |
Instance Attribute Details
#account_number ⇒ Object (readonly)
Returns the value of attribute account_number.
3 4 5 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 3 def account_number @account_number end |
#billing_number ⇒ Object (readonly)
Returns the value of attribute billing_number.
3 4 5 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 3 def billing_number @billing_number end |
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
3 4 5 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 3 def client_id @client_id end |
#developer_key ⇒ Object (readonly)
Returns the value of attribute developer_key.
3 4 5 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 3 def developer_key @developer_key end |
#developer_password ⇒ Object (readonly)
Returns the value of attribute developer_password.
3 4 5 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 3 def developer_password @developer_password end |
#wsdl_location ⇒ Object (readonly)
Returns the value of attribute wsdl_location.
3 4 5 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 3 def wsdl_location @wsdl_location end |
Instance Method Details
#basic_auth ⇒ Object
19 20 21 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 19 def basic_auth [@developer_key, @developer_password] end |
#soap_header ⇒ Object
23 24 25 |
# File 'lib/purolator_ruby/environment_credentials.rb', line 23 def soap_header soap_header_v15 end |