Class: ApolloDeploySignalSdk::BatchSendItemResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::BatchSendItemResponse
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: BatchSendItemResponse
Instance Attribute Summary collapse
- #created_at ⇒ String?
- #error ⇒ String?
- #id ⇒ String?
- #index ⇒ Integer
- #message_id ⇒ String?
- #scheduled_at ⇒ String?
- #status ⇒ String?
Class Method Summary collapse
-
.from_json(attributes) ⇒ BatchSendItemResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(index:, id: nil, message_id: nil, status: nil, created_at: nil, scheduled_at: nil, error: nil) ⇒ BatchSendItemResponse
constructor
A new instance of BatchSendItemResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(index:, id: nil, message_id: nil, status: nil, created_at: nil, scheduled_at: nil, error: nil) ⇒ BatchSendItemResponse
Returns a new instance of BatchSendItemResponse.
258 259 260 261 262 263 264 265 266 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 258 def initialize(index: , id: nil, message_id: nil, status: nil, created_at: nil, scheduled_at: nil, error: nil) @index = index @id = id @message_id = @status = status @created_at = created_at @scheduled_at = scheduled_at @error = error end |
Instance Attribute Details
#created_at ⇒ String?
251 252 253 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 251 def created_at @created_at end |
#error ⇒ String?
255 256 257 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 255 def error @error end |
#id ⇒ String?
245 246 247 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 245 def id @id end |
#index ⇒ Integer
243 244 245 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 243 def index @index end |
#message_id ⇒ String?
247 248 249 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 247 def @message_id end |
#scheduled_at ⇒ String?
253 254 255 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 253 def scheduled_at @scheduled_at end |
#status ⇒ String?
249 250 251 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 249 def status @status end |
Class Method Details
.from_json(attributes) ⇒ BatchSendItemResponse
Create an instance from a parsed JSON hash.
284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 284 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( index: attributes.key?("index") ? attributes["index"] : attributes[:index], id: attributes.key?("id") ? attributes["id"] : attributes[:id], message_id: attributes.key?("messageId") ? attributes["messageId"] : attributes[:message_id], status: attributes.key?("status") ? attributes["status"] : attributes[:status], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], scheduled_at: attributes.key?("scheduledAt") ? attributes["scheduledAt"] : attributes[:scheduled_at], error: attributes.key?("error") ? attributes["error"] : attributes[:error], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 269 def to_h { index: @index, id: @id, message_id: @message_id, status: @status, created_at: @created_at, scheduled_at: @scheduled_at, error: @error, }.compact end |