Class: GetMocksMockIDServerResponsesResponseItem
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDServerResponsesResponseItem
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 |
# File 'lib/schemas.rb', line 11711 def self.from_dynamic!(d) d = Types::Hash[d] new( created_at: d["createdAt"], created_by: d["createdBy"], id: d["id"], get_mocks_mock_id_server_responses_response_item_name: d["name"], status_code: d["statusCode"], updated_at: d["updatedAt"], updated_by: d["updatedBy"], ) end |
.from_json!(json) ⇒ Object
11724 11725 11726 |
# File 'lib/schemas.rb', line 11724 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 |
# File 'lib/schemas.rb', line 11728 def to_dynamic { "createdAt" => created_at, "createdBy" => created_by, "id" => id, "name" => get_mocks_mock_id_server_responses_response_item_name, "statusCode" => status_code, "updatedAt" => updated_at, "updatedBy" => updated_by, } end |
#to_json(options = nil) ⇒ Object
11740 11741 11742 |
# File 'lib/schemas.rb', line 11740 def to_json( = nil) JSON.generate(to_dynamic, ) end |