Class: ApolloDeploySignalSdkRails::RecordValidationBody
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::RecordValidationBody
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: RecordValidationBody
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ RecordValidationBody
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(status:, reason: nil) ⇒ RecordValidationBody
constructor
A new instance of RecordValidationBody.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(status:, reason: nil) ⇒ RecordValidationBody
Returns a new instance of RecordValidationBody.
3131 3132 3133 3134 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3131 def initialize(status: , reason: nil) @status = status @reason = reason end |
Instance Attribute Details
#reason ⇒ String?
3128 3129 3130 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3128 def reason @reason end |
#status ⇒ EmailValidationStatusInput
3126 3127 3128 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3126 def status @status end |
Class Method Details
.from_json(attributes) ⇒ RecordValidationBody
Create an instance from a parsed JSON hash.
3147 3148 3149 3150 3151 3152 3153 3154 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3147 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( status: attributes.key?("status") ? attributes["status"] : attributes[:status], reason: attributes.key?("reason") ? attributes["reason"] : attributes[:reason], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
3137 3138 3139 3140 3141 3142 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3137 def to_h { status: @status, reason: @reason, }.compact end |