Exception: SeatLayer::ConflictError
- Defined in:
- lib/seatlayer/errors.rb
Overview
409 — the seats moved under you.
Normal in ticketing, not exceptional: two buyers wanted the same seat and one lost.
Instance Attribute Summary
Attributes inherited from APIError
#body, #code, #request_id, #status
Instance Method Summary collapse
-
#conflicts ⇒ Array<Hash>
Per-object conflicts, when the endpoint reports them.
-
#sold_out? ⇒ Boolean
Best-available could not find enough free inventory.
Methods inherited from APIError
Constructor Details
This class inherits a constructor from SeatLayer::APIError
Instance Method Details
#conflicts ⇒ Array<Hash>
Returns per-object conflicts, when the endpoint reports them.
76 77 78 79 |
# File 'lib/seatlayer/errors.rb', line 76 def conflicts value = body["conflicts"] value.is_a?(Array) ? value.grep(Hash) : [] end |
#sold_out? ⇒ Boolean
Best-available could not find enough free inventory.
82 83 84 |
# File 'lib/seatlayer/errors.rb', line 82 def sold_out? %w[sold_out not_enough_together].include?(body["reason"]) end |