module GogoKit::Client::SellerListing

{GogoKit::Client} methods for getting seller_listings

Public Instance Methods

create_seller_listing(event_id, options = {}) click to toggle source

Creates a listing for an event

@param [Integer] event_id The ID of the event @param [Hash] options Optional options @return [GogoKit::SellerListing] The newly created listing

# File lib/gogokit/client/seller_listing.rb, line 107
def create_seller_listing(event_id, options = {})
  root = get_root
  object_from_response(GogoKit::SellerListing,
                       GogoKit::SellerListingRepresenter,
                       :post,
                       "#{root.links['self'].href}/events/" \
                       "#{event_id}/sellerlistings",
                       options)
end
create_seller_listing_preview(event_id, options = {}) click to toggle source

Creates a preview of a listing for an event

@param [Integer] event_id The ID of the event @param [Hash] options Optional options @return [GogoKit::SellerListing] The preview of a listing for an event

# File lib/gogokit/client/seller_listing.rb, line 77
def create_seller_listing_preview(event_id, options = {})
  root = get_root
  object_from_response(GogoKit::SellerListing,
                       GogoKit::SellerListingRepresenter,
                       :post,
                       "#{root.links['self'].href}/events/" \
                       "#{event_id}/sellerlistingpreview",
                       options)
end
create_seller_listing_update_preview(listing_id, options = {}) click to toggle source

Creates a preview of an update to a listing

@param [Integer] listing_id The ID of the listing @param [Hash] options Optional options @return [GogoKit::SellerListing] The preview of a listing for an event

# File lib/gogokit/client/seller_listing.rb, line 92
def create_seller_listing_update_preview(listing_id, options = {})
  root = get_root
  object_from_response(GogoKit::SellerListing,
                       GogoKit::SellerListingRepresenter,
                       :post,
                       "#{root.links['self'].href}/sellerlistings/" \
                       "#{listing_id}/updatepreview",
                       options)
end
delete_seller_listing(listing_id, options = {}) click to toggle source

Deletes a listing

@param [Integer] listing_id The ID of the listing @param [Hash] options Optional options @return [Hash] object containing response information

# File lib/gogokit/client/seller_listing.rb, line 137
def delete_seller_listing(listing_id, options = {})
  root = get_root
  delete("#{root.links['self'].href}/sellerlistings/#{listing_id}",
         options)
end
get_listing_constraints(listing_id, options = {}) click to toggle source

Retrieves the constraints for updating a listing

@param [Integer] listing_id The ID of the listing @param [Hash] options Optional options @return [GogoKit::ListingConstraints] The constraints for updating a listing

# File lib/gogokit/client/seller_listing.rb, line 62
def get_listing_constraints(listing_id, options = {})
  root = get_root
  object_from_response(GogoKit::ListingConstraints,
                       GogoKit::ListingConstraintsRepresenter,
                       :get,
                       "#{root.links['self'].href}/sellerlistings/" \
                       "#{listing_id}/constraints",
                       options)
end
get_listing_constraints_for_event(event_id, options = {}) click to toggle source

Retrieves the constraints for creating a listing for an event

@param [Integer] event_id The ID of the event @param [Hash] options Optional options @return [GogoKit::ListingConstraints] The constraints for creating a listing for an event

# File lib/gogokit/client/seller_listing.rb, line 46
def get_listing_constraints_for_event(event_id, options = {})
  root = get_root
  object_from_response(GogoKit::ListingConstraints,
                       GogoKit::ListingConstraintsRepresenter,
                       :get,
                       "#{root.links['self'].href}/events/#{event_id}" \
                       '/listingconstraints',
                       options)
end
get_seller_listing(listing_id, options = {}) click to toggle source

Retrieves a listing by ID

@param [Integer] listing_id The ID of the listing to be retrieved @param [Hash] options Optional options @return [GogoKit::SellerListing] The requested listing

# File lib/gogokit/client/seller_listing.rb, line 16
def get_seller_listing(listing_id, options = {})
  root = get_root
  object_from_response(GogoKit::SellerListing,
                       GogoKit::SellerListingRepresenter,
                       :get,
                       "#{root.links['self'].href}/sellerlistings/" \
                       "#{listing_id}",
                       options)
end
get_seller_listings(options = {}) click to toggle source

Retrieves all listings for the authenticated user

@see developer.viagogo.net/#usersellerlistings @param [Hash] options Optional options @return [GogoKit::PagedResource] All listings for the authenticated user

# File lib/gogokit/client/seller_listing.rb, line 31
def get_seller_listings(options = {})
  root = get_root
  object_from_response(GogoKit::PagedResource,
                       GogoKit::SellerListingsRepresenter,
                       :get,
                       "#{root.links['self'].href}/sellerlistings",
                       options)
end
update_seller_listing(listing_id, options = {}) click to toggle source

Updates an existing listing

@param [Integer] listing_id The ID of the listing @param [Hash] options Optional options @return [GogoKit::SellerListing] The updated created listing

# File lib/gogokit/client/seller_listing.rb, line 122
def update_seller_listing(listing_id, options = {})
  root = get_root
  object_from_response(GogoKit::SellerListing,
                       GogoKit::SellerListingRepresenter,
                       :patch,
                       "#{root.links['self'].href}/sellerlistings/" \
                       "#{listing_id}",
                       options)
end