Class: StubHubApi::Listing

Inherits:
Base
  • Object
show all
Defined in:
lib/stub_hub_api/listing.rb

Instance Attribute Summary

Attributes inherited from Base

#sandbox, #token

Instance Method Summary collapse

Methods inherited from Base

#delete_query_api, #get_query_api, #initialize, #post_multi_part_query_api, #post_multi_pdfs_json_query_api, #post_query_api, #put_query_api

Constructor Details

This class inherits a constructor from StubHubApi::Base

Instance Method Details

#create(options = {}) ⇒ Object



3
4
5
# File 'lib/stub_hub_api/listing.rb', line 3

def create(options = {})
  post_query_api("/inventory/listings/v2", true, options)
end

#create_with_barcode(options = {}) ⇒ Object



7
8
9
# File 'lib/stub_hub_api/listing.rb', line 7

def create_with_barcode(options = {})
  post_query_api("/inventory/listings/v2/barcodes", true, options)
end

#delete(listing_id) ⇒ Object



11
12
13
# File 'lib/stub_hub_api/listing.rb', line 11

def delete(listing_id)
  delete_query_api("/inventory/listings/v1/#{listing_id}")
end

#show(listing_id, options = {}) ⇒ Object



19
20
21
# File 'lib/stub_hub_api/listing.rb', line 19

def show(listing_id, options = {})
  get_query_api("/inventory/listings/v2/#{listing_id}", options)
end

#update(listing_id, options = {}) ⇒ Object



15
16
17
# File 'lib/stub_hub_api/listing.rb', line 15

def update(listing_id, options = {})
  put_query_api("/inventory/listings/v2/#{listing_id}", true, options)
end