Class: SSOReady::CreateSetupURLResponse
- Inherits:
-
Object
- Object
- SSOReady::CreateSetupURLResponse
- Defined in:
- lib/ssoready/types/create_setup_url_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#url ⇒ String
readonly
The one-time, short-lived self-serve setup URL.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ SSOReady::CreateSetupURLResponse
Deserialize a JSON object to an instance of CreateSetupURLResponse.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(url: OMIT, additional_properties: nil) ⇒ SSOReady::CreateSetupURLResponse constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of CreateSetupURLResponse to a JSON object.
Constructor Details
#initialize(url: OMIT, additional_properties: nil) ⇒ SSOReady::CreateSetupURLResponse
27 28 29 30 31 32 33 |
# File 'lib/ssoready/types/create_setup_url_response.rb', line 27 def initialize(url: OMIT, additional_properties: nil) @url = url if url != OMIT @additional_properties = additional_properties @_field_set = { "url": url }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
14 15 16 |
# File 'lib/ssoready/types/create_setup_url_response.rb', line 14 def additional_properties @additional_properties end |
#url ⇒ String (readonly)
Returns The one-time, short-lived self-serve setup URL. Do not log or store this URL. Because this URL is one-time, loading it yourself means your customer will not be able to load it after you.
12 13 14 |
# File 'lib/ssoready/types/create_setup_url_response.rb', line 12 def url @url end |
Class Method Details
.from_json(json_object:) ⇒ SSOReady::CreateSetupURLResponse
Deserialize a JSON object to an instance of CreateSetupURLResponse
39 40 41 42 43 44 |
# File 'lib/ssoready/types/create_setup_url_response.rb', line 39 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) url = parsed_json["url"] new(url: url, additional_properties: struct) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
59 60 61 |
# File 'lib/ssoready/types/create_setup_url_response.rb', line 59 def self.validate_raw(obj:) obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of CreateSetupURLResponse to a JSON object
49 50 51 |
# File 'lib/ssoready/types/create_setup_url_response.rb', line 49 def to_json(*_args) @_field_set&.to_json end |