Class: SeatLayer::Templates
- Defined in:
- lib/seatlayer/resources.rb
Overview
Published SeatLayer catalogue templates.
Instantiation creates an independent draft chart. Publish that returned chart before creating an event from it.
Constant Summary
Constants inherited from Resource
Instance Method Summary collapse
-
#instantiate_template(template_id, fields: {}, idempotency_key: nil) ⇒ Object
Instantiate a public template into a new draft chart.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from SeatLayer::Resource
Instance Method Details
#instantiate_template(template_id, fields: {}, idempotency_key: nil) ⇒ Object
Instantiate a public template into a new draft chart.
fields intentionally defaults to an empty Hash: the API requires a JSON
object even when there are no overrides, and JSON.generate({}) is {}.
141 142 143 144 145 146 |
# File 'lib/seatlayer/resources.rb', line 141 def instantiate_template(template_id, fields: {}, idempotency_key: nil) @client.post( "/v1/templates/#{encode(template_id)}/instantiate", fields, idempotency_key: idempotency_key, retry_policy: :header_replay ) end |