Class: Gusto::Token::TokenGetInfoResponseResourceOwner

Inherits:
Object
  • Object
show all
Defined in:
lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb

Overview

Information about the token owner

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, uuid:, additional_properties: nil) ⇒ Gusto::Token::TokenGetInfoResponseResourceOwner

Parameters:



26
27
28
29
30
31
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 26

def initialize(type:, uuid:, additional_properties: nil)
  @type = type
  @uuid = uuid
  @additional_properties = additional_properties
  @_field_set = { "type": type, "uuid": uuid }
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



15
16
17
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 15

def additional_properties
  @additional_properties
end

#typeGusto::Token::TokenGetInfoResponseResourceOwnerType (readonly)



11
12
13
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 11

def type
  @type
end

#uuidString (readonly)

Returns UUID of resource owner.

Returns:

  • (String)

    UUID of resource owner



13
14
15
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 13

def uuid
  @uuid
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::Token::TokenGetInfoResponseResourceOwner

Parameters:

  • json_object (String)

Returns:



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 36

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  type = parsed_json["type"]
  uuid = parsed_json["uuid"]
  new(
    type: type,
    uuid: uuid,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


59
60
61
62
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 59

def self.validate_raw(obj:)
  obj.type.is_a?(Gusto::Token::TokenGetInfoResponseResourceOwnerType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
  obj.uuid.is_a?(String) != false || raise("Passed value for field obj.uuid is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


50
51
52
# File 'lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb', line 50

def to_json
  @_field_set&.to_json
end