Class: ApolloDeploySignalSdkRails::UpdateTopicsBody
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::UpdateTopicsBody
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: UpdateTopicsBody
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ UpdateTopicsBody
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(topics:) ⇒ UpdateTopicsBody
constructor
A new instance of UpdateTopicsBody.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(topics:) ⇒ UpdateTopicsBody
Returns a new instance of UpdateTopicsBody.
2924 2925 2926 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2924 def initialize(topics: ) @topics = topics end |
Instance Attribute Details
#topics ⇒ Array<TopicSubscriptionBody>
2921 2922 2923 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2921 def topics @topics end |
Class Method Details
.from_json(attributes) ⇒ UpdateTopicsBody
Create an instance from a parsed JSON hash.
2938 2939 2940 2941 2942 2943 2944 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2938 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( topics: attributes.key?("topics") ? attributes["topics"] : attributes[:topics], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
2929 2930 2931 2932 2933 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2929 def to_h { topics: @topics, }.compact end |