Class: PutMocksMockIDServerResponsesServerResponseIDResponseItem
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PutMocksMockIDServerResponsesServerResponseIDResponseItem
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
33223 33224 33225 33226 33227 33228 33229 33230 33231 33232 33233 33234 |
# File 'lib/schemas.rb', line 33223 def self.from_dynamic!(d) d = Types::Hash[d] new( created_at: d["createdAt"], created_by: d["createdBy"], id: d["id"], put_mocks_mock_id_server_responses_server_response_id_response_item_name: d["name"], status_code: d["statusCode"], updated_at: d["updatedAt"], updated_by: d["updatedBy"], ) end |
.from_json!(json) ⇒ Object
33236 33237 33238 |
# File 'lib/schemas.rb', line 33236 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
33240 33241 33242 33243 33244 33245 33246 33247 33248 33249 33250 |
# File 'lib/schemas.rb', line 33240 def to_dynamic { "createdAt" => created_at, "createdBy" => created_by, "id" => id, "name" => put_mocks_mock_id_server_responses_server_response_id_response_item_name, "statusCode" => status_code, "updatedAt" => updated_at, "updatedBy" => updated_by, } end |
#to_json(options = nil) ⇒ Object
33252 33253 33254 |
# File 'lib/schemas.rb', line 33252 def to_json( = nil) JSON.generate(to_dynamic, ) end |