Class: ProfileOrganizationResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- ProfileOrganizationResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
3139 3140 3141 3142 3143 3144 |
# File 'lib/schemas.rb', line 3139 def self.from_dynamic!(d) d = Types::Hash[d] new( id: d.fetch("id"), ) end |
.from_json!(json) ⇒ Object
3146 3147 3148 |
# File 'lib/schemas.rb', line 3146 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
3150 3151 3152 3153 3154 |
# File 'lib/schemas.rb', line 3150 def to_dynamic { "id" => id, } end |
#to_json(options = nil) ⇒ Object
3156 3157 3158 |
# File 'lib/schemas.rb', line 3156 def to_json( = nil) JSON.generate(to_dynamic, ) end |