Class: ApolloDeploySignalSdkRails::DkimRecordResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::DkimRecordResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: DkimRecordResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ DkimRecordResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(name:, type:, value:, status: nil) ⇒ DkimRecordResponse
constructor
A new instance of DkimRecordResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(name:, type:, value:, status: nil) ⇒ DkimRecordResponse
Returns a new instance of DkimRecordResponse.
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
#name ⇒ String
4402 4403 4404 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4402 def name @name end |
#status ⇒ String?
4408 4409 4410 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4408 def status @status end |
#type ⇒ String
4404 4405 4406 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4404 def type @type end |
#value ⇒ 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.
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_h ⇒ Hash
Returns 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 |