Class: ApolloDeploySignalSdkRails::BatchSendResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: BatchSendResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(results:) ⇒ BatchSendResponse

Returns a new instance of BatchSendResponse.

Parameters:



512
513
514
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 512

def initialize(results: )
  @results = results
end

Instance Attribute Details

#resultsArray<BatchSendItemResponse>

Returns:



509
510
511
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 509

def results
  @results
end

Class Method Details

.from_json(attributes) ⇒ BatchSendResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



526
527
528
529
530
531
532
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 526

def self.from_json(attributes)
  return nil unless attributes.is_a?(Hash)

  new(
    results: attributes.key?("results") ? attributes["results"] : attributes[:results],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



517
518
519
520
521
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 517

def to_h
  {
    results: @results,
  }.compact
end