Class: ApolloDeploySignalSdkRails::SuppressionResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::SuppressionResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: SuppressionResponse
Instance Attribute Summary collapse
- #contact_id ⇒ String?
- #created_at ⇒ String
- #email ⇒ String
- #id ⇒ String
- #project_id ⇒ String
- #reason ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ SuppressionResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, project_id:, email:, reason:, created_at:, contact_id: nil) ⇒ SuppressionResponse
constructor
A new instance of SuppressionResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, project_id:, email:, reason:, created_at:, contact_id: nil) ⇒ SuppressionResponse
Returns a new instance of SuppressionResponse.
1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1659 def initialize(id: , project_id: , email: , reason: , created_at: , contact_id: nil) @id = id @project_id = project_id @email = email @reason = reason @created_at = created_at @contact_id = contact_id end |
Instance Attribute Details
#contact_id ⇒ String?
1656 1657 1658 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1656 def contact_id @contact_id end |
#created_at ⇒ String
1654 1655 1656 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1654 def created_at @created_at end |
#email ⇒ String
1650 1651 1652 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1650 def email @email end |
#id ⇒ String
1646 1647 1648 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1646 def id @id end |
#project_id ⇒ String
1648 1649 1650 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1648 def project_id @project_id end |
#reason ⇒ String
1652 1653 1654 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1652 def reason @reason end |
Class Method Details
.from_json(attributes) ⇒ SuppressionResponse
Create an instance from a parsed JSON hash.
1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1683 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id], email: attributes.key?("email") ? attributes["email"] : attributes[:email], reason: attributes.key?("reason") ? attributes["reason"] : attributes[:reason], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], contact_id: attributes.key?("contactId") ? attributes["contactId"] : attributes[:contact_id], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1669 def to_h { id: @id, project_id: @project_id, email: @email, reason: @reason, created_at: @created_at, contact_id: @contact_id, }.compact end |