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



64
65
66
# File 'lib/betsy/shop_listing.rb', line 64

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



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

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



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

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



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

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



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

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


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

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



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

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



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

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



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

def self.get_listing_property
end

.get_listings_by_listing_ids(options = {}) ⇒ Object



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

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



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

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



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

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



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

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



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

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



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

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