Class: ApolloDeploySignalSdk::SuppressionImportRowSerializable
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::SuppressionImportRowSerializable
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: SuppressionImportRowSerializable
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ SuppressionImportRowSerializable
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(email:, reason: nil) ⇒ SuppressionImportRowSerializable
constructor
A new instance of SuppressionImportRowSerializable.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(email:, reason: nil) ⇒ SuppressionImportRowSerializable
Returns a new instance of SuppressionImportRowSerializable.
1822 1823 1824 1825 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1822 def initialize(email: , reason: nil) @email = email @reason = reason end |
Instance Attribute Details
#email ⇒ String
1817 1818 1819 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1817 def email @email end |
#reason ⇒ String?
1819 1820 1821 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1819 def reason @reason end |
Class Method Details
.from_json(attributes) ⇒ SuppressionImportRowSerializable
Create an instance from a parsed JSON hash.
1838 1839 1840 1841 1842 1843 1844 1845 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1838 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( email: attributes.key?("email") ? attributes["email"] : attributes[:email], reason: attributes.key?("reason") ? attributes["reason"] : attributes[:reason], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1828 1829 1830 1831 1832 1833 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 1828 def to_h { email: @email, reason: @reason, }.compact end |