Class: GetMocksMockIDCallLogsResponse429

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



11035
11036
11037
11038
11039
11040
11041
# File 'lib/schemas.rb', line 11035

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error:   d["error"],
    message: d["message"],
  )
end

.from_json!(json) ⇒ Object



11043
11044
11045
# File 'lib/schemas.rb', line 11043

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



11047
11048
11049
11050
11051
11052
# File 'lib/schemas.rb', line 11047

def to_dynamic
  {
    "error"   => error,
    "message" => message,
  }
end

#to_json(options = nil) ⇒ Object



11054
11055
11056
# File 'lib/schemas.rb', line 11054

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end