Class: Gusto::Token::TokenGetInfoResponseResource
- Inherits:
-
Object
- Object
- Gusto::Token::TokenGetInfoResponseResource
- Defined in:
- lib/fern_gusto/token/types/token_get_info_response_resource.rb
Overview
Information about the token resource.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#type ⇒ String
readonly
Type of object.
-
#uuid ⇒ String
readonly
UUID of object.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(type:, uuid:, additional_properties: nil) ⇒ Gusto::Token::TokenGetInfoResponseResource constructor
- #to_json ⇒ String
Constructor Details
#initialize(type:, uuid:, additional_properties: nil) ⇒ Gusto::Token::TokenGetInfoResponseResource
25 26 27 28 29 30 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 25 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.
14 15 16 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 14 def additional_properties @additional_properties end |
#type ⇒ String (readonly)
Returns Type of object.
10 11 12 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 10 def type @type end |
#uuid ⇒ String (readonly)
Returns UUID of object.
12 13 14 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 12 def uuid @uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Token::TokenGetInfoResponseResource
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 35 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
58 59 60 61 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 58 def self.validate_raw(obj:) obj.type.is_a?(String) != 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
49 50 51 |
# File 'lib/fern_gusto/token/types/token_get_info_response_resource.rb', line 49 def to_json @_field_set&.to_json end |