Class: Hook0::Generated::InstanceConfigFormbricks
- Inherits:
-
Object
- Object
- Hook0::Generated::InstanceConfigFormbricks
- Defined in:
- lib/hook0/generated/models.rb
Overview
The InstanceConfigFormbricks the API declares.
Instance Attribute Summary collapse
-
#api_host ⇒ Object
readonly
Returns the value of attribute api_host.
-
#environment_id ⇒ Object
readonly
Returns the value of attribute environment_id.
Class Method Summary collapse
-
.from_json(value) ⇒ InstanceConfigFormbricks
Read one out of what the API answered.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Whether that value carries the same members as this one.
-
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
-
#initialize(api_host:, environment_id:) ⇒ InstanceConfigFormbricks
constructor
A new instance of InstanceConfigFormbricks.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(api_host:, environment_id:) ⇒ InstanceConfigFormbricks
Returns a new instance of InstanceConfigFormbricks.
1361 1362 1363 1364 1365 |
# File 'lib/hook0/generated/models.rb', line 1361 def initialize(api_host:, environment_id:) @api_host = api_host @environment_id = environment_id freeze end |
Instance Attribute Details
#api_host ⇒ Object (readonly)
Returns the value of attribute api_host.
1356 1357 1358 |
# File 'lib/hook0/generated/models.rb', line 1356 def api_host @api_host end |
#environment_id ⇒ Object (readonly)
Returns the value of attribute environment_id.
1356 1357 1358 |
# File 'lib/hook0/generated/models.rb', line 1356 def environment_id @environment_id end |
Class Method Details
.from_json(value) ⇒ InstanceConfigFormbricks
Read one out of what the API answered.
1371 1372 1373 1374 1375 1376 1377 |
# File 'lib/hook0/generated/models.rb', line 1371 def self.from_json(value) fields = Runtime.as_fields(value, "InstanceConfigFormbricks") new( api_host: Runtime.read(fields, "api_host", Runtime::TEXT), environment_id: Runtime.read(fields, "environment_id", Runtime::TEXT) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
1393 1394 1395 |
# File 'lib/hook0/generated/models.rb', line 1393 def ==(other) other.is_a?(InstanceConfigFormbricks) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
1401 1402 1403 |
# File 'lib/hook0/generated/models.rb', line 1401 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
1382 1383 1384 1385 1386 1387 |
# File 'lib/hook0/generated/models.rb', line 1382 def to_h out = {} out["api_host"] = @api_host out["environment_id"] = @environment_id out end |