Class: ApolloDeploySignalSdk::ContactPropertyResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::ContactPropertyResponse
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: ContactPropertyResponse
Instance Attribute Summary collapse
- #created_at ⇒ String
- #fallback_value ⇒ String?
- #id ⇒ String
- #key ⇒ String
- #object ⇒ String
- #project_id ⇒ String
- #type ⇒ String
- #updated_at ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ ContactPropertyResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(object: nil, id:, key:, type:, fallback_value:, project_id:, created_at:, updated_at:) ⇒ ContactPropertyResponse
constructor
A new instance of ContactPropertyResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(object: nil, id:, key:, type:, fallback_value:, project_id:, created_at:, updated_at:) ⇒ ContactPropertyResponse
Returns a new instance of ContactPropertyResponse.
2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2376 def initialize(object: nil, id: , key: , type: , fallback_value: , project_id: , created_at: , updated_at: ) @object = object @id = id @key = key @type = type @fallback_value = fallback_value @project_id = project_id @created_at = created_at @updated_at = updated_at end |
Instance Attribute Details
#created_at ⇒ String
2371 2372 2373 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2371 def created_at @created_at end |
#fallback_value ⇒ String?
2367 2368 2369 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2367 def fallback_value @fallback_value end |
#id ⇒ String
2361 2362 2363 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2361 def id @id end |
#key ⇒ String
2363 2364 2365 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2363 def key @key end |
#object ⇒ String
2359 2360 2361 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2359 def object @object end |
#project_id ⇒ String
2369 2370 2371 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2369 def project_id @project_id end |
#type ⇒ String
2365 2366 2367 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2365 def type @type end |
#updated_at ⇒ String
2373 2374 2375 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2373 def updated_at @updated_at end |
Class Method Details
.from_json(attributes) ⇒ ContactPropertyResponse
Create an instance from a parsed JSON hash.
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2404 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( object: attributes.key?("object") ? attributes["object"] : attributes[:object], id: attributes.key?("id") ? attributes["id"] : attributes[:id], 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], project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], updated_at: attributes.key?("updatedAt") ? attributes["updatedAt"] : attributes[:updated_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2388 def to_h { object: @object, id: @id, key: @key, type: @type, fallback_value: @fallback_value, project_id: @project_id, created_at: @created_at, updated_at: @updated_at, }.compact end |