Class: ApolloDeploySignalSdk::ContactPageResponse

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

Overview

Schema type: ContactPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ ContactPageResponse

Returns a new instance of ContactPageResponse.

Parameters:



2658
2659
2660
2661
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2658

def initialize(data: , page: )
  @data = data
  @page = page
end

Instance Attribute Details

#dataArray<ContactResponse>

Returns:



2653
2654
2655
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2653

def data
  @data
end

#pagePageInfo

Returns:



2655
2656
2657
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2655

def page
  @page
end

Class Method Details

.from_json(attributes) ⇒ ContactPageResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



2674
2675
2676
2677
2678
2679
2680
2681
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2674

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



2664
2665
2666
2667
2668
2669
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2664

def to_h
  {
    data: @data,
    page: @page,
  }.compact
end