Class: ApolloDeploySignalSdkRails::DkimRecordResponse

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

Overview

Schema type: DkimRecordResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, value:, status: nil) ⇒ DkimRecordResponse

Returns a new instance of DkimRecordResponse.

Parameters:

  • name (String)

    , type [String], value [String], status [String, nil]



4411
4412
4413
4414
4415
4416
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4411

def initialize(name: , type: , value: , status: nil)
  @name = name
  @type = type
  @value = value
  @status = status
end

Instance Attribute Details

#nameString

Returns:

  • (String)


4402
4403
4404
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4402

def name
  @name
end

#statusString?

Returns:

  • (String, nil)


4408
4409
4410
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4408

def status
  @status
end

#typeString

Returns:

  • (String)


4404
4405
4406
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4404

def type
  @type
end

#valueString

Returns:

  • (String)


4406
4407
4408
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4406

def value
  @value
end

Class Method Details

.from_json(attributes) ⇒ DkimRecordResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4431

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

  new(
    name: attributes.key?("name") ? attributes["name"] : attributes[:name],
    type: attributes.key?("type") ? attributes["type"] : attributes[:type],
    value: attributes.key?("value") ? attributes["value"] : attributes[:value],
    status: attributes.key?("status") ? attributes["status"] : attributes[:status],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



4419
4420
4421
4422
4423
4424
4425
4426
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4419

def to_h
  {
    name: @name,
    type: @type,
    value: @value,
    status: @status,
  }.compact
end