Class: ResponseForSecretsDeleteResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- ResponseForSecretsDeleteResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
2219 2220 2221 2222 2223 2224 2225 2226 |
# File 'lib/schemas.rb', line 2219 def self.from_dynamic!(d) d = Types::Hash[d] new( data: d["data"] ? SecretsDeleteResponse.from_dynamic!(d["data"]) : nil, error_message: d["errorMessage"], success: d.fetch("success"), ) end |
.from_json!(json) ⇒ Object
2228 2229 2230 |
# File 'lib/schemas.rb', line 2228 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
2232 2233 2234 2235 2236 2237 2238 |
# File 'lib/schemas.rb', line 2232 def to_dynamic { "data" => data&.to_dynamic, "errorMessage" => , "success" => success, } end |
#to_json(options = nil) ⇒ Object
2240 2241 2242 |
# File 'lib/schemas.rb', line 2240 def to_json( = nil) JSON.generate(to_dynamic, ) end |