Class: ApolloDeploySignalSdkRails::UpdateContactPropertyBody

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: UpdateContactPropertyBody

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fallback_value: nil) ⇒ UpdateContactPropertyBody

Returns a new instance of UpdateContactPropertyBody.

Parameters:

  • fallback_value (String, nil) (defaults to: nil)


2499
2500
2501
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2499

def initialize(fallback_value: nil)
  @fallback_value = fallback_value
end

Instance Attribute Details

#fallback_valueString?

Returns:

  • (String, nil)


2496
2497
2498
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2496

def fallback_value
  @fallback_value
end

Class Method Details

.from_json(attributes) ⇒ UpdateContactPropertyBody

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



2513
2514
2515
2516
2517
2518
2519
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2513

def self.from_json(attributes)
  return nil unless attributes.is_a?(Hash)

  new(
    fallback_value: attributes.key?("fallbackValue") ? attributes["fallbackValue"] : attributes[:fallback_value],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



2504
2505
2506
2507
2508
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2504

def to_h
  {
    fallback_value: @fallback_value,
  }.compact
end