Class: GustoEmbedded::Models::Shared::CreateTokenAuthentication

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/gusto_embedded/models/shared/create_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:, token_type: 'Bearer', expires_in: 7200.0, refresh_token: nil) ⇒ CreateTokenAuthentication

Returns a new instance of CreateTokenAuthentication.



27
28
29
30
31
32
33
# File 'lib/gusto_embedded/models/shared/create_token_authentication.rb', line 27

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

Instance Method Details

#==(other) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/gusto_embedded/models/shared/create_token_authentication.rb', line 36

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 @token_type == other.token_type
  return false unless @expires_in == other.expires_in
  return false unless @refresh_token == other.refresh_token
  true
end