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
3515 3516 3517 3518 3519 3520 |
# File 'lib/schemas.rb', line 3515 def self.from_dynamic!(d) d = Types::Hash[d] new( api_key: d.fetch("apiKey"), ) end |
.from_json!(json) ⇒ Object
3522 3523 3524 |
# File 'lib/schemas.rb', line 3522 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
3526 3527 3528 3529 3530 |
# File 'lib/schemas.rb', line 3526 def to_dynamic { "apiKey" => api_key, } end |
#to_json(options = nil) ⇒ Object
3532 3533 3534 |
# File 'lib/schemas.rb', line 3532 def to_json( = nil) JSON.generate(to_dynamic, ) end |