Class: ApolloDeploySignalSdkRails::WebhookPageResponse

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

Overview

Schema type: WebhookPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ WebhookPageResponse

Returns a new instance of WebhookPageResponse.

Parameters:



3332
3333
3334
3335
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3332

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

Instance Attribute Details

#dataArray<WebhookResponse>

Returns:



3327
3328
3329
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3327

def data
  @data
end

#pagePageInfo

Returns:



3329
3330
3331
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3329

def page
  @page
end

Class Method Details

.from_json(attributes) ⇒ WebhookPageResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



3348
3349
3350
3351
3352
3353
3354
3355
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3348

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



3338
3339
3340
3341
3342
3343
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3338

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