Class: PostWebhooksBodyWebhook
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostWebhooksBodyWebhook
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
27406 27407 27408 27409 27410 27411 27412 |
# File 'lib/schemas.rb', line 27406 def self.from_dynamic!(d) d = Types::Hash[d] new( collection: d["collection"], post_webhooks_body_webhook_name: d["name"], ) end |
.from_json!(json) ⇒ Object
27414 27415 27416 |
# File 'lib/schemas.rb', line 27414 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
27418 27419 27420 27421 27422 27423 |
# File 'lib/schemas.rb', line 27418 def to_dynamic { "collection" => collection, "name" => post_webhooks_body_webhook_name, } end |
#to_json(options = nil) ⇒ Object
27425 27426 27427 |
# File 'lib/schemas.rb', line 27425 def to_json( = nil) JSON.generate(to_dynamic, ) end |