Class: ApolloDeploySignalSdkRails::CancelResponse

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

Overview

Schema type: CancelResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cancelled: nil) ⇒ CancelResponse

Returns a new instance of CancelResponse.

Parameters:

  • cancelled (Boolean) (defaults to: nil)


541
542
543
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 541

def initialize(cancelled: nil)
  @cancelled = cancelled
end

Instance Attribute Details

#cancelledBoolean

Returns:

  • (Boolean)


538
539
540
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 538

def cancelled
  @cancelled
end

Class Method Details

.from_json(attributes) ⇒ CancelResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



555
556
557
558
559
560
561
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 555

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



546
547
548
549
550
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 546

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