Class: ApolloDeploySignalSdk::EmailPageResponse

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

Overview

Schema type: EmailPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ EmailPageResponse

Returns a new instance of EmailPageResponse.

Parameters:



4192
4193
4194
4195
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4192

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

Instance Attribute Details

#dataArray<EmailDetailResponse>

Returns:



4187
4188
4189
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4187

def data
  @data
end

#pagePageInfo

Returns:



4189
4190
4191
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4189

def page
  @page
end

Class Method Details

.from_json(attributes) ⇒ EmailPageResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



4208
4209
4210
4211
4212
4213
4214
4215
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4208

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



4198
4199
4200
4201
4202
4203
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4198

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