Class: NewStoreApi::GetClientResponse
- Defined in:
- lib/new_store_api/models/get_client_response.rb
Overview
Returns API client for the tenant.
Instance Attribute Summary collapse
-
#access_token_ttl ⇒ Integer
access token validity in seconds.
-
#description ⇒ String
access token validity in seconds.
-
#name ⇒ String
access token validity in seconds.
-
#scopes ⇒ Array[String]
access token validity in seconds.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(description = nil, name = nil, scopes = nil, access_token_ttl = SKIP) ⇒ GetClientResponse
constructor
A new instance of GetClientResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(description = nil, name = nil, scopes = nil, access_token_ttl = SKIP) ⇒ GetClientResponse
Returns a new instance of GetClientResponse.
50 51 52 53 54 55 56 |
# File 'lib/new_store_api/models/get_client_response.rb', line 50 def initialize(description = nil, name = nil, scopes = nil, access_token_ttl = SKIP) @access_token_ttl = access_token_ttl unless access_token_ttl == SKIP @description = description @name = name @scopes = scopes end |
Instance Attribute Details
#access_token_ttl ⇒ Integer
access token validity in seconds
14 15 16 |
# File 'lib/new_store_api/models/get_client_response.rb', line 14 def access_token_ttl @access_token_ttl end |
#description ⇒ String
access token validity in seconds
18 19 20 |
# File 'lib/new_store_api/models/get_client_response.rb', line 18 def description @description end |
#name ⇒ String
access token validity in seconds
22 23 24 |
# File 'lib/new_store_api/models/get_client_response.rb', line 22 def name @name end |
#scopes ⇒ Array[String]
access token validity in seconds
26 27 28 |
# File 'lib/new_store_api/models/get_client_response.rb', line 26 def scopes @scopes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/new_store_api/models/get_client_response.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : nil name = hash.key?('name') ? hash['name'] : nil scopes = hash.key?('scopes') ? hash['scopes'] : nil access_token_ttl = hash.key?('access_token_ttl') ? hash['access_token_ttl'] : SKIP # Create object from extracted values. GetClientResponse.new(description, name, scopes, access_token_ttl) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/new_store_api/models/get_client_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['access_token_ttl'] = 'access_token_ttl' @_hash['description'] = 'description' @_hash['name'] = 'name' @_hash['scopes'] = 'scopes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/new_store_api/models/get_client_response.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 |
# File 'lib/new_store_api/models/get_client_response.rb', line 39 def self.optionals %w[ access_token_ttl ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
84 85 86 87 88 |
# File 'lib/new_store_api/models/get_client_response.rb', line 84 def inspect class_name = self.class.name.split('::').last "<#{class_name} access_token_ttl: #{@access_token_ttl.inspect}, description:"\ " #{@description.inspect}, name: #{@name.inspect}, scopes: #{@scopes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
77 78 79 80 81 |
# File 'lib/new_store_api/models/get_client_response.rb', line 77 def to_s class_name = self.class.name.split('::').last "<#{class_name} access_token_ttl: #{@access_token_ttl}, description: #{@description}, name:"\ " #{@name}, scopes: #{@scopes}>" end |