Class: ApolloDeploySignalSdkRails::ApiKeyUsageResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ApiKeyUsageResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ApiKeyUsageResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ ApiKeyUsageResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(data:, page:) ⇒ ApiKeyUsageResponse
constructor
A new instance of ApiKeyUsageResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(data:, page:) ⇒ ApiKeyUsageResponse
Returns a new instance of ApiKeyUsageResponse.
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
#data ⇒ Array<ApiKeyUsageRecord>
3898 3899 3900 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3898 def data @data end |
#page ⇒ UsagePage
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.
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_h ⇒ Hash
Returns 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 |