Class: CanadaPost::Credentials
- Inherits:
-
Object
- Object
- CanadaPost::Credentials
- Includes:
- Helpers
- Defined in:
- lib/canada_post/credentials.rb
Instance Attribute Summary collapse
-
#customer_number ⇒ Object
readonly
Returns the value of attribute customer_number.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize(options = {}) ⇒ Credentials
Returns a new instance of Credentials.
7 8 9 10 11 12 13 |
# File 'lib/canada_post/credentials.rb', line 7 def initialize(={}) requires!(, :username, :password, :customer_number, :mode) @username = [:username] @password = [:password] @customer_number = [:customer_number] @mode = [:mode] || 'development' end |
Instance Attribute Details
#customer_number ⇒ Object (readonly)
Returns the value of attribute customer_number.
5 6 7 |
# File 'lib/canada_post/credentials.rb', line 5 def customer_number @customer_number end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
5 6 7 |
# File 'lib/canada_post/credentials.rb', line 5 def mode @mode end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
5 6 7 |
# File 'lib/canada_post/credentials.rb', line 5 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/canada_post/credentials.rb', line 5 def username @username end |