Class: GustoEmbedded::Models::Shared::Resource

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

Overview

The resource associated with this access token. Null when the token has no associated resource.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(type: nil, uuid: nil) ⇒ Resource

Returns a new instance of Resource.



24
25
26
27
# File 'lib/gusto_embedded/models/shared/resource.rb', line 24

def initialize(type: nil, uuid: nil)
  @type = type
  @uuid = uuid
end

Instance Method Details

#==(other) ⇒ Object



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

def ==(other)
  return false unless other.is_a? self.class
  return false unless @type == other.type
  return false unless @uuid == other.uuid
  true
end