Class: ApolloDeploySignalSdkRails::ApiKeyUsageResponse

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

Overview

Schema type: ApiKeyUsageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ ApiKeyUsageResponse

Returns a new instance of ApiKeyUsageResponse.

Parameters:



3903
3904
3905
3906
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3903

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

Instance Attribute Details

#dataArray<ApiKeyUsageRecord>

Returns:



3898
3899
3900
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3898

def data
  @data
end

#pageUsagePage

Returns:



3900
3901
3902
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3900

def page
  @page
end

Class Method Details

.from_json(attributes) ⇒ ApiKeyUsageResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



3919
3920
3921
3922
3923
3924
3925
3926
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3919

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



3909
3910
3911
3912
3913
3914
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3909

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