Class: Shipay::Authenticator
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(client) ⇒ Authenticator
constructor
Initialize Authenticator Class.
-
#token ⇒ String
Return client authentication token.
Constructor Details
#initialize(client) ⇒ Authenticator
Initialize Authenticator Class
62 63 64 65 66 |
# File 'lib/shipay/authenticator.rb', line 62 def initialize(client) @client = client @key = client.key authenticate end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
55 56 57 |
# File 'lib/shipay/authenticator.rb', line 55 def client @client end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
55 56 57 |
# File 'lib/shipay/authenticator.rb', line 55 def key @key end |
Instance Method Details
#token ⇒ String
Return client authentication token
73 74 75 76 |
# File 'lib/shipay/authenticator.rb', line 73 def token refresh_token_if_expired @a_token end |