Class: GetNetworkPrivateResponse500Error

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



14072
14073
14074
14075
14076
14077
14078
# File 'lib/schemas.rb', line 14072

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

.from_json!(json) ⇒ Object



14080
14081
14082
# File 'lib/schemas.rb', line 14080

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

Instance Method Details

#to_dynamicObject



14084
14085
14086
14087
14088
14089
# File 'lib/schemas.rb', line 14084

def to_dynamic
  {
    "message" => message,
    "name"    => get_network_private_response500_error_name,
  }
end

#to_json(options = nil) ⇒ Object



14091
14092
14093
# File 'lib/schemas.rb', line 14091

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