Class: ApolloDeploySignalSdkRails::AddToSegmentBody
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::AddToSegmentBody
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: AddToSegmentBody
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ AddToSegmentBody
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(segment_id:) ⇒ AddToSegmentBody
constructor
A new instance of AddToSegmentBody.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(segment_id:) ⇒ AddToSegmentBody
Returns a new instance of AddToSegmentBody.
2895 2896 2897 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2895 def initialize(segment_id: ) @segment_id = segment_id end |
Instance Attribute Details
#segment_id ⇒ String
2892 2893 2894 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2892 def segment_id @segment_id end |
Class Method Details
.from_json(attributes) ⇒ AddToSegmentBody
Create an instance from a parsed JSON hash.
2909 2910 2911 2912 2913 2914 2915 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2909 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( segment_id: attributes.key?("segmentId") ? attributes["segmentId"] : attributes[:segment_id], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
2900 2901 2902 2903 2904 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2900 def to_h { segment_id: @segment_id, }.compact end |