Class: PutMocksMockIDServerResponsesServerResponseIDBody

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



32943
32944
32945
32946
32947
32948
# File 'lib/schemas.rb', line 32943

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    server_response: d["serverResponse"] ? PutMocksMockIDServerResponsesServerResponseIDBodyServerResponse.from_dynamic!(d["serverResponse"]) : nil,
  )
end

.from_json!(json) ⇒ Object



32950
32951
32952
# File 'lib/schemas.rb', line 32950

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

Instance Method Details

#to_dynamicObject



32954
32955
32956
32957
32958
# File 'lib/schemas.rb', line 32954

def to_dynamic
  {
    "serverResponse" => server_response&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



32960
32961
32962
# File 'lib/schemas.rb', line 32960

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