Class: GetEnvironmentsResponse401
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetEnvironmentsResponse401
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
10057 10058 10059 10060 10061 10062 |
# File 'lib/schemas.rb', line 10057 def self.from_dynamic!(d) d = Types::Hash[d] new( error: d["error"] ? GetEnvironmentsResponse401Error.from_dynamic!(d["error"]) : nil, ) end |
.from_json!(json) ⇒ Object
10064 10065 10066 |
# File 'lib/schemas.rb', line 10064 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
10068 10069 10070 10071 10072 |
# File 'lib/schemas.rb', line 10068 def to_dynamic { "error" => error&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
10074 10075 10076 |
# File 'lib/schemas.rb', line 10074 def to_json( = nil) JSON.generate(to_dynamic, ) end |