Class: PostMocksResponse400ErrorDetails

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



24752
24753
24754
24755
24756
24757
# File 'lib/schemas.rb', line 24752

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

.from_json!(json) ⇒ Object



24759
24760
24761
# File 'lib/schemas.rb', line 24759

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

Instance Method Details

#to_dynamicObject



24763
24764
24765
24766
24767
# File 'lib/schemas.rb', line 24763

def to_dynamic
  {
    "param" => param,
  }
end

#to_json(options = nil) ⇒ Object



24769
24770
24771
# File 'lib/schemas.rb', line 24769

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