Class: ApolloDeploySignalSdkRails::SuppressionPageResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: SuppressionPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ SuppressionPageResponse

Returns a new instance of SuppressionPageResponse.

Parameters:



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

#dataArray<SuppressionResponse>

Returns:



1754
1755
1756
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1754

def data
  @data
end

#pagePageInfo

Returns:



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.

Parameters:

  • attributes (Hash)

Returns:



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_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    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