Class: Betsy::ShopListing
- Inherits:
-
Object
- Object
- Betsy::ShopListing
- Includes:
- Model
- Defined in:
- lib/betsy/shop_listing.rb
Class Method Summary collapse
- .create_draft_listing(shop_id, options = {}) ⇒ Object
- .delete_listing(listing_id, options = {}) ⇒ Object
- .delete_listing_property(shop_id, listing_id, property_id, options = {}) ⇒ Object
- .find_all_active_listings_by_shop(shop_id, options = {}) ⇒ Object
- .find_all_listings_active(options = {}) ⇒ Object
- .get_featured_listings_by_shop(shop_id, options = {}) ⇒ Object
- .get_listing(listing_id, options = {}) ⇒ Object
- .get_listing_properties(shop_id, listing_id) ⇒ Object
-
.get_listing_property ⇒ Object
STILL IN DEVELOPMENT AS OF 8/28/2021.
- .get_listings_by_listing_ids(options = {}) ⇒ Object
- .get_listings_by_shop(shop_id, options = {}) ⇒ Object
- .get_listings_by_shop_receipt(shop_id, receipt_id, options = {}) ⇒ Object
- .get_listings_by_shop_section_id(shop_id, options = {}) ⇒ Object
- .update_listing(shop_id, listing_id, options = {}) ⇒ Object
- .update_listing_property(shop_id, listing_id, property_id, options = {}) ⇒ Object
Methods included from Model
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, = {}) make_request(:post, "/v3/application/shops/#{shop_id}/listings", ) end |
.delete_listing(listing_id, options = {}) ⇒ Object
72 73 74 |
# File 'lib/betsy/shop_listing.rb', line 72 def self.delete_listing(listing_id, = {}) make_request(:delete, "/v3/application/listings/#{listing_id}", ) 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, = {}) make_request(:delete, "/v3/application/shops/#{shop_id}/listings/#{listing_id}/properties/#{property_id}", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/listings/active", ) end |
.find_all_listings_active(options = {}) ⇒ Object
80 81 82 |
# File 'lib/betsy/shop_listing.rb', line 80 def self.find_all_listings_active( = {}) make_request(:get, "/v3/application/listings/active", ) end |
.get_featured_listings_by_shop(shop_id, options = {}) ⇒ Object
92 93 94 |
# File 'lib/betsy/shop_listing.rb', line 92 def self.get_featured_listings_by_shop(shop_id, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/listings/featured", ) end |
.get_listing(listing_id, options = {}) ⇒ Object
76 77 78 |
# File 'lib/betsy/shop_listing.rb', line 76 def self.get_listing(listing_id, = {}) make_request(:get, "/v3/application/listings/#{listing_id}", ) 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_property ⇒ Object
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( = {}) make_request(:get, "/v3/application/listings/batch", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/listings", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/receipts/#{receipt_id}/listings", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/shop-sections/listings", ) 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, = {}) make_request(:put, "/v3/application/shops/#{shop_id}/listings/#{listing_id}", ) 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, = {}) make_request(:put, "/v3/application/shops/#{shop_id}/listings/#{listing_id}/properties/#{property_id}", ) end |