Class: CheckoutSdk::OAuthAccessToken
- Inherits:
-
Object
- Object
- CheckoutSdk::OAuthAccessToken
- Defined in:
- lib/checkout_sdk/oauth_access_token.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #initialize(token, token_type, expiration_date) ⇒ OAuthAccessToken constructor
- #valid? ⇒ TrueClass, FalseClass
Constructor Details
#initialize(token, token_type, expiration_date) ⇒ OAuthAccessToken
19 20 21 22 23 |
# File 'lib/checkout_sdk/oauth_access_token.rb', line 19 def initialize(token, token_type, expiration_date) @token = token @token_type = token_type @expiration_date = expiration_date end |
Instance Attribute Details
#expiration_date ⇒ Time
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/checkout_sdk/oauth_access_token.rb', line 10 class OAuthAccessToken attr_accessor :token, :token_type, :expiration_date # @param [String] token # @param [String] token_type # @param [Time] expiration_date # @return [OAuthAccessToken] def initialize(token, token_type, expiration_date) @token = token @token_type = token_type @expiration_date = expiration_date end # @return [TrueClass, FalseClass] def valid? return false if @token.nil? @expiration_date > Time.now end end |
#token ⇒ String
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/checkout_sdk/oauth_access_token.rb', line 10 class OAuthAccessToken attr_accessor :token, :token_type, :expiration_date # @param [String] token # @param [String] token_type # @param [Time] expiration_date # @return [OAuthAccessToken] def initialize(token, token_type, expiration_date) @token = token @token_type = token_type @expiration_date = expiration_date end # @return [TrueClass, FalseClass] def valid? return false if @token.nil? @expiration_date > Time.now end end |
#token_type ⇒ String
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/checkout_sdk/oauth_access_token.rb', line 10 class OAuthAccessToken attr_accessor :token, :token_type, :expiration_date # @param [String] token # @param [String] token_type # @param [Time] expiration_date # @return [OAuthAccessToken] def initialize(token, token_type, expiration_date) @token = token @token_type = token_type @expiration_date = expiration_date end # @return [TrueClass, FalseClass] def valid? return false if @token.nil? @expiration_date > Time.now end end |
Instance Method Details
#valid? ⇒ TrueClass, FalseClass
26 27 28 29 30 |
# File 'lib/checkout_sdk/oauth_access_token.rb', line 26 def valid? return false if @token.nil? @expiration_date > Time.now end |