Class: GustoEmbedded::Models::Shared::RefreshTokenAuthentication

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/gusto_embedded/models/shared/refresh_token_authentication.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(access_token:, created_at:, refresh_token: nil, scope: nil, token_type: 'Bearer', expires_in: 7200.0) ⇒ RefreshTokenAuthentication

Returns a new instance of RefreshTokenAuthentication.



29
30
31
32
33
34
35
36
# File 'lib/gusto_embedded/models/shared/refresh_token_authentication.rb', line 29

def initialize(access_token:, created_at:, refresh_token: nil, scope: nil, token_type: 'Bearer', expires_in: 7200.0)
  @access_token = access_token
  @created_at = created_at
  @refresh_token = refresh_token
  @scope = scope
  @token_type = token_type
  @expires_in = expires_in
end

Instance Method Details

#==(other) ⇒ Object



39
40
41
42
43
44
45
46
47
48
# File 'lib/gusto_embedded/models/shared/refresh_token_authentication.rb', line 39

def ==(other)
  return false unless other.is_a? self.class
  return false unless @access_token == other.access_token
  return false unless @created_at == other.created_at
  return false unless @refresh_token == other.refresh_token
  return false unless @scope == other.scope
  return false unless @token_type == other.token_type
  return false unless @expires_in == other.expires_in
  true
end