Class: UserAPIKeyResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- UserAPIKeyResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
3464 3465 3466 3467 3468 3469 |
# File 'lib/schemas.rb', line 3464 def self.from_dynamic!(d) d = Types::Hash[d] new( api_key: d.fetch("apiKey"), ) end |
.from_json!(json) ⇒ Object
3471 3472 3473 |
# File 'lib/schemas.rb', line 3471 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
3475 3476 3477 3478 3479 |
# File 'lib/schemas.rb', line 3475 def to_dynamic { "apiKey" => api_key, } end |
#to_json(options = nil) ⇒ Object
3481 3482 3483 |
# File 'lib/schemas.rb', line 3481 def to_json( = nil) JSON.generate(to_dynamic, ) end |