Class: DeleteMocksMockIDUnpublishResponseMock

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



2878
2879
2880
2881
2882
2883
# File 'lib/schemas.rb', line 2878

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

.from_json!(json) ⇒ Object



2885
2886
2887
# File 'lib/schemas.rb', line 2885

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

Instance Method Details

#to_dynamicObject



2889
2890
2891
2892
2893
# File 'lib/schemas.rb', line 2889

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

#to_json(options = nil) ⇒ Object



2895
2896
2897
# File 'lib/schemas.rb', line 2895

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