Class: GetNetworkPrivateResponse429

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



14040
14041
14042
14043
14044
14045
14046
# File 'lib/schemas.rb', line 14040

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

.from_json!(json) ⇒ Object



14048
14049
14050
# File 'lib/schemas.rb', line 14048

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

Instance Method Details

#to_dynamicObject



14052
14053
14054
14055
14056
14057
# File 'lib/schemas.rb', line 14052

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

#to_json(options = nil) ⇒ Object



14059
14060
14061
# File 'lib/schemas.rb', line 14059

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