Class: ApolloDeploySignalSdkRails::BulkCancelResponse

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

Overview

Schema type: BulkCancelResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cancelled:) ⇒ BulkCancelResponse

Returns a new instance of BulkCancelResponse.

Parameters:

  • cancelled (Integer)


570
571
572
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 570

def initialize(cancelled: )
  @cancelled = cancelled
end

Instance Attribute Details

#cancelledInteger

Returns:

  • (Integer)


567
568
569
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 567

def cancelled
  @cancelled
end

Class Method Details

.from_json(attributes) ⇒ BulkCancelResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



584
585
586
587
588
589
590
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 584

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

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

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



575
576
577
578
579
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 575

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