Class: Gusto::Token::TokenGetInfoResponseResourceOwner
- Inherits:
-
Object
- Object
- Gusto::Token::TokenGetInfoResponseResourceOwner
- 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
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #type ⇒ Gusto::Token::TokenGetInfoResponseResourceOwnerType readonly
-
#uuid ⇒ String
readonly
UUID of resource owner.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Token::TokenGetInfoResponseResourceOwner
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(type:, uuid:, additional_properties: nil) ⇒ Gusto::Token::TokenGetInfoResponseResourceOwner constructor
- #to_json ⇒ String
Constructor Details
#initialize(type:, uuid:, additional_properties: nil) ⇒ Gusto::Token::TokenGetInfoResponseResourceOwner
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_properties ⇒ OpenStruct (readonly)
Returns 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 |
#type ⇒ Gusto::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 |
#uuid ⇒ String (readonly)
Returns 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
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
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_json ⇒ 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 |