Class: ApolloDeploySignalSdk::CreateContactPropertyBody
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::CreateContactPropertyBody
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: CreateContactPropertyBody
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ CreateContactPropertyBody
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(key:, type:, fallback_value: nil) ⇒ CreateContactPropertyBody
constructor
A new instance of CreateContactPropertyBody.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(key:, type:, fallback_value: nil) ⇒ CreateContactPropertyBody
Returns a new instance of CreateContactPropertyBody.
2464 2465 2466 2467 2468 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2464 def initialize(key: , type: , fallback_value: nil) @key = key @type = type @fallback_value = fallback_value end |
Instance Attribute Details
#fallback_value ⇒ String?
2461 2462 2463 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2461 def fallback_value @fallback_value end |
#key ⇒ String
2457 2458 2459 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2457 def key @key end |
#type ⇒ String
2459 2460 2461 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2459 def type @type end |
Class Method Details
.from_json(attributes) ⇒ CreateContactPropertyBody
Create an instance from a parsed JSON hash.
2482 2483 2484 2485 2486 2487 2488 2489 2490 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2482 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( key: attributes.key?("key") ? attributes["key"] : attributes[:key], type: attributes.key?("type") ? attributes["type"] : attributes[:type], fallback_value: attributes.key?("fallbackValue") ? attributes["fallbackValue"] : attributes[:fallback_value], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
2471 2472 2473 2474 2475 2476 2477 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2471 def to_h { key: @key, type: @type, fallback_value: @fallback_value, }.compact end |