Class: ApolloDeploySignalSdk::AddSuppressionBody
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::AddSuppressionBody
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: AddSuppressionBody
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ AddSuppressionBody
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(email:) ⇒ AddSuppressionBody
constructor
A new instance of AddSuppressionBody.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(email:) ⇒ AddSuppressionBody
Returns a new instance of AddSuppressionBody.
1791 1792 1793 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1791 def initialize(email: ) @email = email end |
Instance Attribute Details
#email ⇒ String
1788 1789 1790 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1788 def email @email end |
Class Method Details
.from_json(attributes) ⇒ AddSuppressionBody
Create an instance from a parsed JSON hash.
1805 1806 1807 1808 1809 1810 1811 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1805 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( email: attributes.key?("email") ? attributes["email"] : attributes[:email], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1796 1797 1798 1799 1800 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1796 def to_h { email: @email, }.compact end |