Class: UniversalAuthLoginClass
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- UniversalAuthLoginClass
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
755 756 757 758 759 760 761 |
# File 'lib/schemas.rb', line 755 def self.from_dynamic!(d) d = Types::Hash[d] new( client_id: d.fetch("clientId"), client_secret: d.fetch("clientSecret"), ) end |
.from_json!(json) ⇒ Object
763 764 765 |
# File 'lib/schemas.rb', line 763 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
767 768 769 770 771 772 |
# File 'lib/schemas.rb', line 767 def to_dynamic { "clientId" => client_id, "clientSecret" => client_secret, } end |
#to_json(options = nil) ⇒ Object
774 775 776 |
# File 'lib/schemas.rb', line 774 def to_json( = nil) JSON.generate(to_dynamic, ) end |