Class: PostNetworkPrivateResponse403Error

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



25999
26000
26001
26002
26003
26004
26005
# File 'lib/schemas.rb', line 25999

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

.from_json!(json) ⇒ Object



26007
26008
26009
# File 'lib/schemas.rb', line 26007

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

Instance Method Details

#to_dynamicObject



26011
26012
26013
26014
26015
26016
# File 'lib/schemas.rb', line 26011

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

#to_json(options = nil) ⇒ Object



26018
26019
26020
# File 'lib/schemas.rb', line 26018

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