Class: NewStoreApi::IdentityProviderConfig

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/new_store_api/models/identity_provider_config.rb

Overview

Identity Provider configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(client_id = SKIP, directory_id = SKIP, entity_id = SKIP, logout_uri = SKIP, redirect_uri = SKIP) ⇒ IdentityProviderConfig

Returns a new instance of IdentityProviderConfig.



59
60
61
62
63
64
65
66
# File 'lib/new_store_api/models/identity_provider_config.rb', line 59

def initialize(client_id = SKIP, directory_id = SKIP, entity_id = SKIP,
               logout_uri = SKIP, redirect_uri = SKIP)
  @client_id = client_id unless client_id == SKIP
  @directory_id = directory_id unless directory_id == SKIP
  @entity_id = entity_id unless entity_id == SKIP
  @logout_uri = logout_uri unless logout_uri == SKIP
  @redirect_uri = redirect_uri unless redirect_uri == SKIP
end

Instance Attribute Details

#client_idString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/new_store_api/models/identity_provider_config.rb', line 14

def client_id
  @client_id
end

#directory_idString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/new_store_api/models/identity_provider_config.rb', line 18

def directory_id
  @directory_id
end

#entity_idString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/new_store_api/models/identity_provider_config.rb', line 22

def entity_id
  @entity_id
end

#logout_uriString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/new_store_api/models/identity_provider_config.rb', line 26

def logout_uri
  @logout_uri
end

#redirect_uriString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/new_store_api/models/identity_provider_config.rb', line 30

def redirect_uri
  @redirect_uri
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/new_store_api/models/identity_provider_config.rb', line 69

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  client_id = hash.key?('client_id') ? hash['client_id'] : SKIP
  directory_id = hash.key?('directory_id') ? hash['directory_id'] : SKIP
  entity_id = hash.key?('entity_id') ? hash['entity_id'] : SKIP
  logout_uri = hash.key?('logout_uri') ? hash['logout_uri'] : SKIP
  redirect_uri = hash.key?('redirect_uri') ? hash['redirect_uri'] : SKIP

  # Create object from extracted values.
  IdentityProviderConfig.new(client_id,
                             directory_id,
                             entity_id,
                             logout_uri,
                             redirect_uri)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/new_store_api/models/identity_provider_config.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['client_id'] = 'client_id'
  @_hash['directory_id'] = 'directory_id'
  @_hash['entity_id'] = 'entity_id'
  @_hash['logout_uri'] = 'logout_uri'
  @_hash['redirect_uri'] = 'redirect_uri'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/new_store_api/models/identity_provider_config.rb', line 55

def self.nullables
  []
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/new_store_api/models/identity_provider_config.rb', line 44

def self.optionals
  %w[
    client_id
    directory_id
    entity_id
    logout_uri
    redirect_uri
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



95
96
97
98
99
100
# File 'lib/new_store_api/models/identity_provider_config.rb', line 95

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} client_id: #{@client_id.inspect}, directory_id: #{@directory_id.inspect},"\
  " entity_id: #{@entity_id.inspect}, logout_uri: #{@logout_uri.inspect}, redirect_uri:"\
  " #{@redirect_uri.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



88
89
90
91
92
# File 'lib/new_store_api/models/identity_provider_config.rb', line 88

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} client_id: #{@client_id}, directory_id: #{@directory_id}, entity_id:"\
  " #{@entity_id}, logout_uri: #{@logout_uri}, redirect_uri: #{@redirect_uri}>"
end