Class: ApolloDeploySignalSdkRails::SuppressionPageResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::SuppressionPageResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: SuppressionPageResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ SuppressionPageResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(data:, page:) ⇒ SuppressionPageResponse
constructor
A new instance of SuppressionPageResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(data:, page:) ⇒ SuppressionPageResponse
Returns a new instance of SuppressionPageResponse.
1759 1760 1761 1762 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1759 def initialize(data: , page: ) @data = data @page = page end |
Instance Attribute Details
#data ⇒ Array<SuppressionResponse>
1754 1755 1756 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1754 def data @data end |
#page ⇒ PageInfo
1756 1757 1758 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1756 def page @page end |
Class Method Details
.from_json(attributes) ⇒ SuppressionPageResponse
Create an instance from a parsed JSON hash.
1775 1776 1777 1778 1779 1780 1781 1782 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1775 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( data: attributes.key?("data") ? attributes["data"] : attributes[:data], page: attributes.key?("page") ? attributes["page"] : attributes[:page], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1765 1766 1767 1768 1769 1770 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1765 def to_h { data: @data, page: @page, }.compact end |