Class: PutCollectionsCollectionIDResponse429

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



30888
30889
30890
30891
30892
30893
30894
# File 'lib/schemas.rb', line 30888

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

.from_json!(json) ⇒ Object



30896
30897
30898
# File 'lib/schemas.rb', line 30896

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

Instance Method Details

#to_dynamicObject



30900
30901
30902
30903
30904
30905
# File 'lib/schemas.rb', line 30900

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

#to_json(options = nil) ⇒ Object



30907
30908
30909
# File 'lib/schemas.rb', line 30907

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