Class: SSOReady::RotateSCIMDirectoryBearerTokenResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bearer_token: OMIT, additional_properties: nil) ⇒ SSOReady::RotateSCIMDirectoryBearerTokenResponse

Parameters:

  • bearer_token (String) (defaults to: OMIT)

    The new, updated bearer token. Do not log or store this bearer token. It is an authentication token that your customer should securely input into their Identity Provider.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



27
28
29
30
31
32
33
# File 'lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb', line 27

def initialize(bearer_token: OMIT, additional_properties: nil)
  @bearer_token = bearer_token if bearer_token != OMIT
  @additional_properties = additional_properties
  @_field_set = { "bearerToken": bearer_token }.reject do |_k, v|
    v == OMIT
  end
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



14
15
16
# File 'lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb', line 14

def additional_properties
  @additional_properties
end

#bearer_tokenString (readonly)

Returns The new, updated bearer token. Do not log or store this bearer token. It is an authentication token that your customer should securely input into their Identity Provider.

Returns:

  • (String)

    The new, updated bearer token. Do not log or store this bearer token. It is an authentication token that your customer should securely input into their Identity Provider.



12
13
14
# File 'lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb', line 12

def bearer_token
  @bearer_token
end

Class Method Details

.from_json(json_object:) ⇒ SSOReady::RotateSCIMDirectoryBearerTokenResponse

Deserialize a JSON object to an instance of

RotateSCIMDirectoryBearerTokenResponse

Parameters:

  • json_object (String)

Returns:



40
41
42
43
44
45
# File 'lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb', line 40

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  bearer_token = parsed_json["bearerToken"]
  new(bearer_token: bearer_token, 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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


60
61
62
# File 'lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb', line 60

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

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of RotateSCIMDirectoryBearerTokenResponse to a JSON object

Returns:

  • (String)


50
51
52
# File 'lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb', line 50

def to_json(*_args)
  @_field_set&.to_json
end