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
67 68 69 |
# File 'lib/betsy/shop_listing.rb', line 67 def self.create_draft_listing(shop_id, = {}) make_request(:post, "/v3/application/shops/#{shop_id}/listings", ) end |
.delete_listing(listing_id, options = {}) ⇒ Object
75 76 77 |
# File 'lib/betsy/shop_listing.rb', line 75 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
99 100 101 |
# File 'lib/betsy/shop_listing.rb', line 99 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
87 88 89 |
# File 'lib/betsy/shop_listing.rb', line 87 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
83 84 85 |
# File 'lib/betsy/shop_listing.rb', line 83 def self.find_all_listings_active( = {}) make_request(:get, "/v3/application/listings/active", ) end |
.get_featured_listings_by_shop(shop_id, options = {}) ⇒ Object
95 96 97 |
# File 'lib/betsy/shop_listing.rb', line 95 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
79 80 81 |
# File 'lib/betsy/shop_listing.rb', line 79 def self.get_listing(listing_id, = {}) make_request(:get, "/v3/application/listings/#{listing_id}", ) 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_property ⇒ Object
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( = {}) make_request(:get, "/v3/application/listings/batch", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/listings", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/receipts/#{receipt_id}/listings", ) 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, = {}) make_request(:get, "/v3/application/shops/#{shop_id}/shop-sections/listings", ) 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, = {}) make_request(:put, "/v3/application/shops/#{shop_id}/listings/#{listing_id}", ) 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, = {}) make_request(:put, "/v3/application/shops/#{shop_id}/listings/#{listing_id}/properties/#{property_id}", ) end |