Class: ApolloDeploySignalSdkRails::CursorPage
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::CursorPage
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: CursorPage
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ CursorPage
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(data:, cursor:) ⇒ CursorPage
constructor
A new instance of CursorPage.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(data:, cursor:) ⇒ CursorPage
Returns a new instance of CursorPage.
2105 2106 2107 2108 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2105 def initialize(data: , cursor: ) @data = data @cursor = cursor end |
Instance Attribute Details
#cursor ⇒ CursorInfo
2102 2103 2104 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2102 def cursor @cursor end |
#data ⇒ Array<SegmentContactResponse>
2100 2101 2102 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2100 def data @data end |
Class Method Details
.from_json(attributes) ⇒ CursorPage
Create an instance from a parsed JSON hash.
2121 2122 2123 2124 2125 2126 2127 2128 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2121 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( data: attributes.key?("data") ? attributes["data"] : attributes[:data], cursor: attributes.key?("cursor") ? attributes["cursor"] : attributes[:cursor], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
2111 2112 2113 2114 2115 2116 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2111 def to_h { data: @data, cursor: @cursor, }.compact end |