Exception: SeatLayer::ConflictError

Inherits:
APIError show all
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

Methods inherited from APIError

from_response, #initialize

Constructor Details

This class inherits a constructor from SeatLayer::APIError

Instance Method Details

#conflictsArray<Hash>

Returns per-object conflicts, when the endpoint reports them.

Returns:

  • (Array<Hash>)

    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.

Returns:

  • (Boolean)


82
83
84
# File 'lib/seatlayer/errors.rb', line 82

def sold_out?
  %w[sold_out not_enough_together].include?(body["reason"])
end