Class: GetMocksMockIDCallLogsResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMocksMockIDCallLogsResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
10827 10828 10829 10830 10831 10832 10833 |
# File 'lib/schemas.rb', line 10827 def self.from_dynamic!(d) d = Types::Hash[d] new( call_logs: d["call-logs"]&.map { |x| GetMocksMockIDCallLogsResponseCallLogsItem.from_dynamic!(x) }, get_mocks_mock_id_call_logs_response_meta: d["meta"] ? GetMocksMockIDCallLogsResponseMeta.from_dynamic!(d["meta"]) : nil, ) end |
.from_json!(json) ⇒ Object
10835 10836 10837 |
# File 'lib/schemas.rb', line 10835 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
10839 10840 10841 10842 10843 10844 |
# File 'lib/schemas.rb', line 10839 def to_dynamic { "call-logs" => call_logs&.map { |x| x.to_dynamic }, "meta" => &.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
10846 10847 10848 |
# File 'lib/schemas.rb', line 10846 def to_json( = nil) JSON.generate(to_dynamic, ) end |