Class: ProjectCreateRequest
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- ProjectCreateRequest
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
828 829 830 831 832 833 834 |
# File 'lib/schemas.rb', line 828 def self.from_dynamic!(d) d = Types::Hash[d] new( project_create_request_name: d.fetch("name"), organization_id: d.fetch("organizationId"), ) end |
.from_json!(json) ⇒ Object
836 837 838 |
# File 'lib/schemas.rb', line 836 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
840 841 842 843 844 845 |
# File 'lib/schemas.rb', line 840 def to_dynamic { "name" => project_create_request_name, "organizationId" => organization_id, } end |
#to_json(options = nil) ⇒ Object
847 848 849 |
# File 'lib/schemas.rb', line 847 def to_json( = nil) JSON.generate(to_dynamic, ) end |