Class: APIResultForUpdateSecretResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- APIResultForUpdateSecretResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1649 1650 1651 1652 1653 1654 1655 1656 |
# File 'lib/schemas.rb', line 1649 def self.from_dynamic!(d) d = Types::Hash[d] new( data: d["data"] ? UpdateSecretResponse.from_dynamic!(d["data"]) : nil, message: d["message"], status: d.fetch("status"), ) end |
.from_json!(json) ⇒ Object
1658 1659 1660 |
# File 'lib/schemas.rb', line 1658 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1662 1663 1664 1665 1666 1667 1668 |
# File 'lib/schemas.rb', line 1662 def to_dynamic { "data" => data&.to_dynamic, "message" => , "status" => status, } end |
#to_json(options = nil) ⇒ Object
1670 1671 1672 |
# File 'lib/schemas.rb', line 1670 def to_json( = nil) JSON.generate(to_dynamic, ) end |