Class: ApolloDeploySignalSdkRails::AddSuppressionBody

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

Overview

Schema type: AddSuppressionBody

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email:) ⇒ AddSuppressionBody

Returns a new instance of AddSuppressionBody.

Parameters:

  • email (String)


1791
1792
1793
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1791

def initialize(email: )
  @email = email
end

Instance Attribute Details

#emailString

Returns:

  • (String)


1788
1789
1790
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1788

def email
  @email
end

Class Method Details

.from_json(attributes) ⇒ AddSuppressionBody

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



1805
1806
1807
1808
1809
1810
1811
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1805

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

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

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



1796
1797
1798
1799
1800
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1796

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