Class: TestPack1::ClientConfiguration
- Defined in:
- lib/test_pack_1/models/client_configuration.rb
Overview
General configuration data.
Instance Attribute Summary collapse
-
#tag ⇒ String
Your internal customer tag.
-
#title ⇒ String
The title of your Greenbyte Platform website.
-
#url_api ⇒ String
Your URL to access the Greenbyte Platform API.
-
#url_web ⇒ String
Your URL to access the Greenbyte Platform website.
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.
Instance Method Summary collapse
-
#initialize(title = nil, tag = nil, url_web = nil, url_api = nil) ⇒ ClientConfiguration
constructor
A new instance of ClientConfiguration.
Methods inherited from BaseModel
Constructor Details
#initialize(title = nil, tag = nil, url_web = nil, url_api = nil) ⇒ ClientConfiguration
Returns a new instance of ClientConfiguration.
35 36 37 38 39 40 41 42 43 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 35 def initialize(title = nil, tag = nil, url_web = nil, url_api = nil) @title = title @tag = tag @url_web = url_web @url_api = url_api end |
Instance Attribute Details
#tag ⇒ String
Your internal customer tag.
15 16 17 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 15 def tag @tag end |
#title ⇒ String
The title of your Greenbyte Platform website.
11 12 13 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 11 def title @title end |
#url_api ⇒ String
Your URL to access the Greenbyte Platform API.
23 24 25 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 23 def url_api @url_api end |
#url_web ⇒ String
Your URL to access the Greenbyte Platform website.
19 20 21 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 19 def url_web @url_web end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. title = hash['title'] tag = hash['tag'] url_web = hash['urlWeb'] url_api = hash['urlApi'] # Create object from extracted values. ClientConfiguration.new(title, tag, url_web, url_api) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 33 |
# File 'lib/test_pack_1/models/client_configuration.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['title'] = 'title' @_hash['tag'] = 'tag' @_hash['url_web'] = 'urlWeb' @_hash['url_api'] = 'urlApi' @_hash end |