Class: ApolloDeploySignalSdkRails::ContactPageResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ContactPageResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ContactPageResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ ContactPageResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(data:, page:) ⇒ ContactPageResponse
constructor
A new instance of ContactPageResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(data:, page:) ⇒ ContactPageResponse
Returns a new instance of ContactPageResponse.
2658 2659 2660 2661 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2658 def initialize(data: , page: ) @data = data @page = page end |
Instance Attribute Details
#data ⇒ Array<ContactResponse>
2653 2654 2655 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2653 def data @data end |
#page ⇒ PageInfo
2655 2656 2657 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2655 def page @page end |
Class Method Details
.from_json(attributes) ⇒ ContactPageResponse
Create an instance from a parsed JSON hash.
2674 2675 2676 2677 2678 2679 2680 2681 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2674 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.
2664 2665 2666 2667 2668 2669 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2664 def to_h { data: @data, page: @page, }.compact end |