Class: SecretGetRequest
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- SecretGetRequest
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1105 1106 1107 1108 1109 1110 |
# File 'lib/schemas.rb', line 1105 def self.from_dynamic!(d) d = Types::Hash[d] new( id: d.fetch("id"), ) end |
.from_json!(json) ⇒ Object
1112 1113 1114 |
# File 'lib/schemas.rb', line 1112 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1116 1117 1118 1119 1120 |
# File 'lib/schemas.rb', line 1116 def to_dynamic { "id" => id, } end |
#to_json(options = nil) ⇒ Object
1122 1123 1124 |
# File 'lib/schemas.rb', line 1122 def to_json( = nil) JSON.generate(to_dynamic, ) end |