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