Class: Seatsio::TicketBuyersClient
- Inherits:
-
Object
- Object
- Seatsio::TicketBuyersClient
- Defined in:
- lib/seatsio/ticket_buyers.rb
Instance Method Summary collapse
- #add(ticket_buyer_id_or_ids) ⇒ Object
-
#initialize(http_client) ⇒ TicketBuyersClient
constructor
A new instance of TicketBuyersClient.
- #list_all ⇒ Object
- #remove(ticket_buyer_id_or_ids) ⇒ Object
Constructor Details
#initialize(http_client) ⇒ TicketBuyersClient
Returns a new instance of TicketBuyersClient.
7 8 9 |
# File 'lib/seatsio/ticket_buyers.rb', line 7 def initialize(http_client) @http_client = http_client end |
Instance Method Details
#add(ticket_buyer_id_or_ids) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/seatsio/ticket_buyers.rb', line 11 def add(ticket_buyer_id_or_ids) request = {} request['ids'] = Array(ticket_buyer_id_or_ids).compact response = @http_client.post("ticket-buyers", request) AddTicketBuyerIdsResult.new(response) end |
#list_all ⇒ Object
25 26 27 |
# File 'lib/seatsio/ticket_buyers.rb', line 25 def list_all Pagination::Cursor.new(String, 'ticket-buyers', @http_client) end |
#remove(ticket_buyer_id_or_ids) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/seatsio/ticket_buyers.rb', line 18 def remove(ticket_buyer_id_or_ids) request = {} request['ids'] = Array(ticket_buyer_id_or_ids).compact response = @http_client.delete("ticket-buyers", request) RemoveTicketBuyerIdsResult.new(response) end |