Class: Betsy::ShopListing

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/betsy/shop_listing.rb

Class Method Summary collapse

Methods included from Model

included, #initialize

Class Method Details

.create_draft_listing(shop_id, options = {}) ⇒ Object



67
68
69
# File 'lib/betsy/shop_listing.rb', line 67

def self.create_draft_listing(shop_id, options = {})
  make_request(:post, "/v3/application/shops/#{shop_id}/listings", options)
end

.delete_listing(listing_id, options = {}) ⇒ Object



75
76
77
# File 'lib/betsy/shop_listing.rb', line 75

def self.delete_listing(listing_id, options = {})
  make_request(:delete, "/v3/application/listings/#{listing_id}", options)
end

.delete_listing_property(shop_id, listing_id, property_id, options = {}) ⇒ Object



99
100
101
# File 'lib/betsy/shop_listing.rb', line 99

def self.delete_listing_property(shop_id, listing_id, property_id, options = {})
  make_request(:delete, "/v3/application/shops/#{shop_id}/listings/#{listing_id}/properties/#{property_id}", options)
end

.find_all_active_listings_by_shop(shop_id, options = {}) ⇒ Object



87
88
89
# File 'lib/betsy/shop_listing.rb', line 87

def self.find_all_active_listings_by_shop(shop_id, options = {})
  make_request(:get, "/v3/application/shops/#{shop_id}/listings/active", options)
end

.find_all_listings_active(options = {}) ⇒ Object



83
84
85
# File 'lib/betsy/shop_listing.rb', line 83

def self.find_all_listings_active(options = {})
  make_request(:get, "/v3/application/listings/active", options)
end


95
96
97
# File 'lib/betsy/shop_listing.rb', line 95

def self.get_featured_listings_by_shop(shop_id, options = {})
  make_request(:get, "/v3/application/shops/#{shop_id}/listings/featured", options)
end

.get_listing(listing_id, options = {}) ⇒ Object



79
80
81
# File 'lib/betsy/shop_listing.rb', line 79

def self.get_listing(listing_id, options = {})
  make_request(:get, "/v3/application/listings/#{listing_id}", options)
end

.get_listing_properties(shop_id, listing_id) ⇒ Object



111
112
113
# File 'lib/betsy/shop_listing.rb', line 111

def self.get_listing_properties(shop_id, listing_id)
  make_request(:get, "/v3/application/shops/#{shop_id}/listings/#{listing_id}/properties")
end

.get_listing_propertyObject

STILL IN DEVELOPMENT AS OF 8/28/2021



108
109
# File 'lib/betsy/shop_listing.rb', line 108

def self.get_listing_property
end

.get_listings_by_listing_ids(options = {}) ⇒ Object



91
92
93
# File 'lib/betsy/shop_listing.rb', line 91

def self.get_listings_by_listing_ids(options = {})
  make_request(:get, "/v3/application/listings/batch", options)
end

.get_listings_by_shop(shop_id, options = {}) ⇒ Object



71
72
73
# File 'lib/betsy/shop_listing.rb', line 71

def self.get_listings_by_shop(shop_id, options = {})
  make_request(:get, "/v3/application/shops/#{shop_id}/listings", options)
end

.get_listings_by_shop_receipt(shop_id, receipt_id, options = {}) ⇒ Object



119
120
121
# File 'lib/betsy/shop_listing.rb', line 119

def self.get_listings_by_shop_receipt(shop_id, receipt_id, options = {})
  make_request(:get, "/v3/application/shops/#{shop_id}/receipts/#{receipt_id}/listings", options)
end

.get_listings_by_shop_section_id(shop_id, options = {}) ⇒ Object



123
124
125
# File 'lib/betsy/shop_listing.rb', line 123

def self.get_listings_by_shop_section_id(shop_id, options = {})
  make_request(:get, "/v3/application/shops/#{shop_id}/shop-sections/listings", options)
end

.update_listing(shop_id, listing_id, options = {}) ⇒ Object



115
116
117
# File 'lib/betsy/shop_listing.rb', line 115

def self.update_listing(shop_id, listing_id, options = {})
  make_request(:put, "/v3/application/shops/#{shop_id}/listings/#{listing_id}", options)
end

.update_listing_property(shop_id, listing_id, property_id, options = {}) ⇒ Object



103
104
105
# File 'lib/betsy/shop_listing.rb', line 103

def self.update_listing_property(shop_id, listing_id, property_id, options = {})
  make_request(:put, "/v3/application/shops/#{shop_id}/listings/#{listing_id}/properties/#{property_id}", options)
end