Class: ApolloDeploySignalSdkRails::ContactPropertyPageResponse

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

Overview

Schema type: ContactPropertyPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ ContactPropertyPageResponse

Returns a new instance of ContactPropertyPageResponse.

Parameters:



2428
2429
2430
2431
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2428

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

Instance Attribute Details

#dataArray<ContactPropertyResponse>

Returns:



2423
2424
2425
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2423

def data
  @data
end

#pagePageInfo

Returns:



2425
2426
2427
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2425

def page
  @page
end

Class Method Details

.from_json(attributes) ⇒ ContactPropertyPageResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



2444
2445
2446
2447
2448
2449
2450
2451
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2444

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



2434
2435
2436
2437
2438
2439
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2434

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