From 1a1fed7e7daaee9984ebae60240e4e40836ebefa Mon Sep 17 00:00:00 2001 From: Kenneth Gallego Date: Mon, 4 Nov 2024 13:50:08 +0100 Subject: [PATCH] Add products endpoint --- lib/beyond_api/concerns/connection.rb | 22 +- .../services/product_management/product.rb | 252 +++++++ .../product_management/product_spec.rb | 99 +++ .../adds_tags_to_multiple_products.yml | 617 ++++++++++++++++ .../deletes_multiple_products.yml | 620 ++++++++++++++++ .../removes_tags_from_multiple_products.yml | 670 ++++++++++++++++++ ...dates_visibility_for_multiple_products.yml | 616 ++++++++++++++++ .../_delete_product/deletes_the_product.yml | 367 ++++++++++ .../_update_product/updates_the_product.yml | 510 +++++++++++++ 9 files changed, 3769 insertions(+), 4 deletions(-) create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_add_tags_to_products/adds_tags_to_multiple_products.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_delete_multiple_products/deletes_multiple_products.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_remove_tags_from_products/removes_tags_from_multiple_products.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_update_products_visibility/updates_visibility_for_multiple_products.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_delete_product/deletes_the_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_update_product/updates_the_product.yml diff --git a/lib/beyond_api/concerns/connection.rb b/lib/beyond_api/concerns/connection.rb index 7581096..c80fe6d 100644 --- a/lib/beyond_api/concerns/connection.rb +++ b/lib/beyond_api/concerns/connection.rb @@ -12,7 +12,16 @@ def get(path, params = {}) def put(path, body = {}, params = {}) handle_request do - agent.put(path, body) do |request| + agent.put(path) do |request| + request.params = parse_request(params) + request.body = parse_request(body) + end + end + end + + def patch(path, body = {}, params = {}) + handle_request do + agent.patch(path) do |request| request.params = parse_request(params) request.body = parse_request(body) end @@ -21,15 +30,20 @@ def put(path, body = {}, params = {}) def post(path, body = {}, params = {}) handle_request do - agent.post(path, body) do |request| + agent.post(path) do |request| request.params = parse_request(params) request.body = parse_request(body) end end end - def delete(path, params = {}) - handle_request { agent.delete(path, parse_request(params)) } + def delete(path, params = {}, body = {}) + handle_request do + agent.delete(path) do |request| + request.params = parse_request(params) + request.body = parse_request(body) if body.any? + end + end end def upload_file(path, file_path, content_type, params = {}) diff --git a/lib/beyond_api/services/product_management/product.rb b/lib/beyond_api/services/product_management/product.rb index a30b427..c307520 100644 --- a/lib/beyond_api/services/product_management/product.rb +++ b/lib/beyond_api/services/product_management/product.rb @@ -116,6 +116,258 @@ def create(body) def find(id) get("products/#{id}") end + + # List products including variation products in a paged manner. + # + # @see https://developer.epages.com/beyond-docs/#list_products + # + # @option params [Boolean] :paginated + # @option params [Integer] :size the page size + # @option params [Integer] :page the page number + # + # @return [Hash] + # + # @example + # @client.all_with_variations(size: 20, page: 1) + def all_with_variations(params = {}) + fetch_all_pages('products', params) + end + + # Create a variation product. + # + # @see https://developer.epages.com/beyond-docs/#create_variation_product + # + # @param body [Hash] the request body containing variation product details + # + # @return [Hash] + # + # @example + # variation_product_data = { + # sales_price: { + # tax_model: 'GROSS', + # currency: 'EUR', + # amount: 29.99 + # }, + # list_price: { + # tax_model: 'GROSS', + # currency: 'EUR', + # amount: 39.99 + # }, + # manufacturer_price: { + # tax_model: 'GROSS', + # currency: 'EUR', + # amount: 40.99 + # }, + # tags: ['Shirt', 'Summer', 'Sale'], + # product_identifiers: [], + # visible: true, + # tax_class: 'REGULAR', + # shipping_weight: { + # value: 100.0, + # display_unit: 'GRAMS' + # }, + # max_order_quantity: nil, + # shipping_dimension: { + # length: 2000, + # width: 750, + # height: 500 + # }, + # ref_price: nil, + # shipping_period: { + # min: 3, + # max: 5, + # display_unit: 'DAYS' + # }, + # pickup_period: { + # min: 1, + # max: 3, + # display_unit: 'DAYS' + # }, + # name: 'Tony Highfinger, Poloshirt, Men', + # description: '100% cotton, regular fit, needs cold washing (max. 30°C), Fair Trade certified.', + # manufacturer: 'Tony Highfinger', + # essential_features: nil, + # custom_text: nil, + # variation_attributes: [ + # { + # display_name: 'size', + # values: ['S', 'M', 'L', 'XL'] + # }, + # { + # display_name: 'color', + # values: ['Black', 'White', 'Grey'] + # } + # ], + # product_labels: [ + # { + # type: 'NEW', + # active_from: '2024-10-29T12:52:02.121878416', + # active_until: '2024-11-26T12:52:02.121878416' + # } + # ] + # } + # @client.create(variation_product_data) + def create_variation(body) + post('products', body) + end + + # Retrieve the details of a variation product. + # + # @see https://developer.epages.com/beyond-docs/#show_variation_product_details + # + # @param id [String] the variation product UUID + # + # @return [Hash] + # + # @example + # @client.find_variation('097ed6ba-0a39-4c75-936f-7e334ed4f110') + def find_variation(id) + get("products/#{id}") + end + + # Update a product partially. + # + # @see https://developer.epages.com/beyond-docs/#update_product_partially + # + # @param id [String] the product UUID + # @param body [Hash] the request body containing fields to update + # + # @return [Hash] + # + # @example + # update_data = { + # name: 'Castillo de Alba Rioja (2013)', + # description: 'Spain\nRioja', + # manufacturer: 'Mantecillia' + # } + # @client.update_product('da296052-1bc2-439a-9eb9-bf7782f55e81', update_data) + def update_product(id, body) + patch("products/#{id}", body) + end + + # Update multiple products partially (Currently, this endpoint can only be used to update the visible property). + # + # @see https://developer.epages.com/beyond-docs/#update_multiple_products_partially + # + # @param ids [Array] the IDs of the products to update + # @param visible [Boolean] visibility status to apply to all products + # + # @return [Hash] + # + # @example + # @client.update_products_visibility(['a32ef424-ecc4-4bfc-815b-4f15bb3cffa1', 'a98292eb-0c64-459b-b28d-e229013b86b7'], true) + def update_products_visibility(ids, visible) + body = { + ids:, + details: { + visible: + } + } + patch('products/batch', body) + end + + # Update a variation product partially. + # + # @see https://developer.epages.com/beyond-docs/#update_variation_product_partially + # + # @param id [String] the UUID of the variation product + # @param body [Hash] the request body with fields to update + # + # @return [Hash] + # + # @example + # variation_update_data = { + # name: 'Rioja Castillo de Puerto (2013)', + # description: 'Spain\nRioja Tempranillo', + # variationAttributes: [ + # { + # displayName: 'Width', + # values: ['100', '150'], + # variationImagesDifferentiator: false + # } + # ], + # manufacturer: 'Grape Vineyard', + # salesPrice: { + # taxModel: 'GROSS', + # currency: 'EUR', + # amount: 8.7 + # } + # } + # @client.update_variation_product('e0c285ad-d728-475a-974e-cd5360ceeb4f', variation_update_data) + def update_variation_product(id, body) + patch("products/#{id}", body) + end + + # Delete a product or variation product. + # + # @see https://developer.epages.com/beyond-docs/#delete_product + # + # @param id [String] the UUID of the product to delete + # + # @return [nil] + # + # @example + # @client.delete_product('4f8c204e-b56e-4e10-93b5-24ac56df2db0') + def delete_product(id) + delete("products/#{id}") + end + + # Delete multiple products or variation products. + # + # @see https://developer.epages.com/beyond-docs/#delete_multiple_products + # + # @param ids [Array] the IDs of the products to delete + # + # @return [nil] + # + # @example + # @client.delete_multiple_products(['e6f1d2ef-df46-4d99-bbca-550971b51c17', 'b9fcf3d7-4e76-4818-9f48-2ce43929d35b']) + def delete_multiple_products(ids) + body = { ids: } + delete('products/batch', {}, body) + end + + # Add tags to multiple products. + # + # @see https://developer.epages.com/beyond-docs/#add_tags_to_products + # + # @param ids [Array] the IDs of the products to tag + # @param tags [Array] the tags to assign + # + # @return [nil] + # + # @example + # @client.add_tags_to_products(['4982d1fc-8822-4e0a-bc2d-d4d3cdbaf0f4', '63a94256-55b2-4564-b24d-ba65e27d4e07'], ['Sale', 'Wine', 'Bestseller']) + def add_tags_to_products(ids, tags) + body = { + ids:, + details: { + tags: + } + } + post('products/batch/tags', body) + end + + # Remove tags from multiple products. + # + # @see https://developer.epages.com/beyond-docs/#remove_tags_from_products + # + # @param ids [Array] the IDs of the products from which to remove tags + # @param tags [Array] the tags to remove + # + # @return [nil] + # + # @example + # @client.remove_tags_from_products(['af834a09-67a2-4397-bad8-262793504b70', 'd0c1ca27-0a5a-48d0-b215-14c7a713c4ab'], ['Sale', 'Wine', 'Bestseller']) + def remove_tags_from_products(ids, tags) + body = { + ids:, + details: { + tags: + } + } + delete('products/batch/tags', {}, body) + end end end end diff --git a/spec/beyond_api/services/product_management/product_spec.rb b/spec/beyond_api/services/product_management/product_spec.rb index b6b6fe7..0280e73 100644 --- a/spec/beyond_api/services/product_management/product_spec.rb +++ b/spec/beyond_api/services/product_management/product_spec.rb @@ -34,5 +34,104 @@ expect(response[:name]).to eq('Team42 Product') end end + + describe '.update_product' do + it 'updates the product' do + update_data = { name: 'Updated Team42 Product' } + response = client.update_product(@product[:id], update_data) + + expect(response).not_to be nil + expect(response[:name]).to eq('Updated Team42 Product') + end + end + + describe '.delete_product' do + it 'deletes the product' do + response = client.delete_product(@product[:id]) + expect(response).to eq({}) + end + end + + after(:each) do + client.delete_product(@product[:id]) + rescue StandardError + BeyondApi::Error + # Cleanup after each test + end + end + + describe '.update_products_visibility' do + it 'updates visibility for multiple products' do + products = [client.create(build(:product_data)), client.create(build(:product_data))] + ids = products.map { |p| p[:id] } + + response = client.update_products_visibility(ids, false) + + expect(response).not_to be nil + expect(response.dig(:details, :visible)).to be nil + ensure + # Cleanup in case of test failure + products.each do |p| + client.delete_product(p[:id]) + rescue StandardError + BeyondApi::Error + end + end + end + + describe '.delete_multiple_products' do + it 'deletes multiple products' do + products = [client.create(build(:product_data)), client.create(build(:product_data))] + ids = products.map { |p| p[:id] } + + response = client.delete_multiple_products(ids) + + expect(response).to eq({}) + ensure + # Cleanup in case of test failure + products.each do |p| + client.delete_product(p[:id]) + rescue StandardError + BeyondApi::Error + end + end + end + + describe '.add_tags_to_products' do + it 'adds tags to multiple products' do + products = [client.create(build(:product_data)), client.create(build(:product_data))] + ids = products.map { |p| p[:id] } + tags = ['New Tag', 'Seasonal'] + + response = client.add_tags_to_products(ids, tags) + + expect(response).not_to be nil + expect(response).to eq({}) + ensure + products.each do |p| + client.delete_product(p[:id]) + rescue StandardError + BeyondApi::Error + end + end + end + + describe '.remove_tags_from_products' do + it 'removes tags from multiple products' do + products = [client.create(build(:product_data)), client.create(build(:product_data))] + ids = products.map { |p| p[:id] } + tags = ['New Tag', 'Seasonal'] + + client.add_tags_to_products(ids, tags) + response = client.remove_tags_from_products(ids, tags) + + expect(response).not_to be nil + ensure + products.each do |p| + client.delete_product(p[:id]) + rescue StandardError + BeyondApi::Error + end + end end end diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_add_tags_to_products/adds_tags_to_multiple_products.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_add_tags_to_products/adds_tags_to_multiple_products.yml new file mode 100644 index 0000000..4d32ea4 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_add_tags_to_products/adds_tags_to_multiple_products.yml @@ -0,0 +1,617 @@ +--- +http_interactions: +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/oauth/token?grant_type=client_credentials + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Basic + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:57 GMT + Content-Type: + - application/json;charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Cache-Control: + - no-store + Pragma: + - no-cache + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Strict-Transport-Security: + - max-age=31536000 ; includeSubDomains + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.102' + X-B3-Traceid: + - 4dd52376bfeedff2dc46a95fab403be3 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "access_token" : "", + "token_type" : "bearer", + "expires_in" : 3599, + "scope" : "orde:r prat:dcur pypr:cur prod:urdc lcnt:u pymt:ur loca:urcd sctg:m shat:cdru rfpr:ur prad:rcd shpz:dcur shad:u ordr:cur shop:u shim:cd cust:urcd clpr:cr legl:ur prda:ru rtpr:rc oset:ur shpr:rcu cset:ru ordp:r catg:cdur nltg:m", + "tenantId" : 8542, + "iat" : 1730724357, + "jti" : "RKQhHSd8T4qiwDkQ42RIVK2cOe4=" + } + recorded_at: Mon, 04 Nov 2024 12:45:57 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:58 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.123' + X-B3-Traceid: + - 759ddcfa6591d174c124c28e05ffa9bc + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "67f02739-2597-43e9-b2e5-76d9af218260", + "lastModifiedAt" : "2024-11-04T12:45:57.968594976", + "sku" : "1197", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:57 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:58 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.110' + X-B3-Traceid: + - fcf28c7ef8a7ff4587e6c4f0383921cf + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "2d322e81-b81e-4a16-8bed-f01618c5edb6", + "lastModifiedAt" : "2024-11-04T12:45:58.210878495", + "sku" : "1198", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:58 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/batch/tags + body: + encoding: UTF-8 + string: '{"ids":["67f02739-2597-43e9-b2e5-76d9af218260","2d322e81-b81e-4a16-8bed-f01618c5edb6"],"details":{"tags":["New + Tag","Seasonal"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:58 GMT + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.040' + X-B3-Traceid: + - 6351d1a0d7dae106e45eef991f2f4394 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:58 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/67f02739-2597-43e9-b2e5-76d9af218260 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:58 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.089' + X-B3-Traceid: + - c2b4bb98ba26cae4debed1f23102f467 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:58 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/2d322e81-b81e-4a16-8bed-f01618c5edb6 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:58 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.131' + X-B3-Traceid: + - e3b23fa7a0535c0537c3b4b7389b20e8 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:58 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_delete_multiple_products/deletes_multiple_products.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_delete_multiple_products/deletes_multiple_products.yml new file mode 100644 index 0000000..8c386fe --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_delete_multiple_products/deletes_multiple_products.yml @@ -0,0 +1,620 @@ +--- +http_interactions: +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/oauth/token?grant_type=client_credentials + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Basic + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:56 GMT + Content-Type: + - application/json;charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Cache-Control: + - no-store + Pragma: + - no-cache + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Strict-Transport-Security: + - max-age=31536000 ; includeSubDomains + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.098' + X-B3-Traceid: + - 32bb4ec1ae3eb691f3cd4a9256173646 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "access_token" : "", + "token_type" : "bearer", + "expires_in" : 3599, + "scope" : "orde:r prat:dcur pypr:cur prod:urdc lcnt:u pymt:ur loca:urcd sctg:m shat:cdru rfpr:ur prad:rcd shpz:dcur shad:u ordr:cur shop:u shim:cd cust:urcd clpr:cr legl:ur prda:ru rtpr:rc oset:ur shpr:rcu cset:ru ordp:r catg:cdur nltg:m", + "tenantId" : 8542, + "iat" : 1730724356, + "jti" : "ahI5YdMeHPJF1tdh/bATl831trQ=" + } + recorded_at: Mon, 04 Nov 2024 12:45:56 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:56 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.167' + X-B3-Traceid: + - 973e7ebcea7b4cdc724fae62a4d099fb + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "4b633a98-0c45-43a9-8a82-c89dec3e1523", + "lastModifiedAt" : "2024-11-04T12:45:56.781864828", + "sku" : "1195", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:56 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:57 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.138' + X-B3-Traceid: + - afae64f6f2ee4e7d37cfd7e9d3100905 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "e118b0cd-6423-4f72-84a6-304a4c6a6d49", + "lastModifiedAt" : "2024-11-04T12:45:57.056080212", + "sku" : "1196", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:57 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/batch + body: + encoding: UTF-8 + string: '{"ids":["4b633a98-0c45-43a9-8a82-c89dec3e1523","e118b0cd-6423-4f72-84a6-304a4c6a6d49"]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:57 GMT + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.020' + X-B3-Traceid: + - 60bcd9b363c6d3c6cc64eec03f677cfc + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:57 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/4b633a98-0c45-43a9-8a82-c89dec3e1523 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 404 + message: Not Found + headers: + Date: + - Mon, 04 Nov 2024 12:45:57 GMT + Content-Length: + - '0' + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.011' + X-B3-Traceid: + - 0d1db758d48ea72d05e74ebf98319c20 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:57 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/e118b0cd-6423-4f72-84a6-304a4c6a6d49 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 404 + message: Not Found + headers: + Date: + - Mon, 04 Nov 2024 12:45:57 GMT + Content-Length: + - '0' + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.022' + X-B3-Traceid: + - d895ca66044fa13991c8c0edca660270 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:57 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_remove_tags_from_products/removes_tags_from_multiple_products.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_remove_tags_from_products/removes_tags_from_multiple_products.yml new file mode 100644 index 0000000..8434d16 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_remove_tags_from_products/removes_tags_from_multiple_products.yml @@ -0,0 +1,670 @@ +--- +http_interactions: +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/oauth/token?grant_type=client_credentials + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Basic + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:59 GMT + Content-Type: + - application/json;charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Cache-Control: + - no-store + Pragma: + - no-cache + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Strict-Transport-Security: + - max-age=31536000 ; includeSubDomains + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.099' + X-B3-Traceid: + - 6765085179f8e18ca574668656e8600a + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "access_token" : "", + "token_type" : "bearer", + "expires_in" : 3599, + "scope" : "orde:r prat:dcur pypr:cur prod:urdc lcnt:u pymt:ur loca:urcd sctg:m shat:cdru rfpr:ur prad:rcd shpz:dcur shad:u ordr:cur shop:u shim:cd cust:urcd clpr:cr legl:ur prda:ru rtpr:rc oset:ur shpr:rcu cset:ru ordp:r catg:cdur nltg:m", + "tenantId" : 8542, + "iat" : 1730724359, + "jti" : "bpV71cIrpQx3J3546rU7gkJtazo=" + } + recorded_at: Mon, 04 Nov 2024 12:45:59 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:59 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.140' + X-B3-Traceid: + - f1f8cd0763a01c4f92391b4a67ed8ad3 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "7f2b40a6-13a0-480b-93b6-78b43f8fc36a", + "lastModifiedAt" : "2024-11-04T12:45:59.362710269", + "sku" : "1199", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:59 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:59 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.128' + X-B3-Traceid: + - f82148629703500d2d33f0e56de3afb8 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "cf0d4e41-2613-4f2d-b65d-f5406d16da59", + "lastModifiedAt" : "2024-11-04T12:45:59.622677048", + "sku" : "1200", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:59 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/batch/tags + body: + encoding: UTF-8 + string: '{"ids":["7f2b40a6-13a0-480b-93b6-78b43f8fc36a","cf0d4e41-2613-4f2d-b65d-f5406d16da59"],"details":{"tags":["New + Tag","Seasonal"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:59 GMT + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.042' + X-B3-Traceid: + - 8c3be16803f66416f4ab0e0df7070066 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:59 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/batch/tags + body: + encoding: UTF-8 + string: '{"ids":["7f2b40a6-13a0-480b-93b6-78b43f8fc36a","cf0d4e41-2613-4f2d-b65d-f5406d16da59"],"details":{"tags":["New + Tag","Seasonal"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:59 GMT + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.031' + X-B3-Traceid: + - 645c9e936c813e9980859943cfaf3b17 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:59 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/7f2b40a6-13a0-480b-93b6-78b43f8fc36a + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:46:00 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.082' + X-B3-Traceid: + - 2843d8eb0e92de997e989396639ff504 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:46:00 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/cf0d4e41-2613-4f2d-b65d-f5406d16da59 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:46:00 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.099' + X-B3-Traceid: + - be4bcf9473e54e605cbad63da3216916 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:46:00 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_update_products_visibility/updates_visibility_for_multiple_products.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_update_products_visibility/updates_visibility_for_multiple_products.yml new file mode 100644 index 0000000..efb888a --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/_update_products_visibility/updates_visibility_for_multiple_products.yml @@ -0,0 +1,616 @@ +--- +http_interactions: +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/oauth/token?grant_type=client_credentials + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Basic + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:55 GMT + Content-Type: + - application/json;charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Cache-Control: + - no-store + Pragma: + - no-cache + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Strict-Transport-Security: + - max-age=31536000 ; includeSubDomains + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.087' + X-B3-Traceid: + - eddd6d5e44e1d93faf34650157851733 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "access_token" : "", + "token_type" : "bearer", + "expires_in" : 3599, + "scope" : "orde:r prat:dcur pypr:cur prod:urdc lcnt:u pymt:ur loca:urcd sctg:m shat:cdru rfpr:ur prad:rcd shpz:dcur shad:u ordr:cur shop:u shim:cd cust:urcd clpr:cr legl:ur prda:ru rtpr:rc oset:ur shpr:rcu cset:ru ordp:r catg:cdur nltg:m", + "tenantId" : 8542, + "iat" : 1730724355, + "jti" : "5h/OjySGA7E4OcFh8tT6o3yRxrQ=" + } + recorded_at: Mon, 04 Nov 2024 12:45:55 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:55 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.130' + X-B3-Traceid: + - 1d4ba94f0905817f2ad2363f3e674b8f + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "a9dffdee-eef1-4f89-87c2-0d279a2b48bd", + "lastModifiedAt" : "2024-11-04T12:45:55.391215555", + "sku" : "1193", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:55 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:55 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.118' + X-B3-Traceid: + - a748da38a24b243d53e399a6430c5be9 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "132e2c2c-d18b-42ec-a172-18c1a8e73173", + "lastModifiedAt" : "2024-11-04T12:45:55.647217533", + "sku" : "1194", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:55 GMT +- request: + method: patch + uri: https://team42-beyond-api.beyondshop.cloud/api/products/batch + body: + encoding: UTF-8 + string: '{"ids":["a9dffdee-eef1-4f89-87c2-0d279a2b48bd","132e2c2c-d18b-42ec-a172-18c1a8e73173"],"details":{"visible":false}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:55 GMT + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.027' + X-B3-Traceid: + - a914d084ec43da3e0d0fd40255ae0c32 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:55 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/a9dffdee-eef1-4f89-87c2-0d279a2b48bd + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:56 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.104' + X-B3-Traceid: + - 66ebb6ecf86cfc01ca831c89b9b79a0b + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:56 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/132e2c2c-d18b-42ec-a172-18c1a8e73173 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:56 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.089' + X-B3-Traceid: + - '09ab9b31781d1014cb9f729c477f710b' + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:56 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_delete_product/deletes_the_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_delete_product/deletes_the_product.yml new file mode 100644 index 0000000..9b71eb7 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_delete_product/deletes_the_product.yml @@ -0,0 +1,367 @@ +--- +http_interactions: +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/oauth/token?grant_type=client_credentials + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Basic + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:54 GMT + Content-Type: + - application/json;charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Cache-Control: + - no-store + Pragma: + - no-cache + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Strict-Transport-Security: + - max-age=31536000 ; includeSubDomains + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.071' + X-B3-Traceid: + - 4d5140291c74ed270537c31c555577b2 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "access_token" : "", + "token_type" : "bearer", + "expires_in" : 3599, + "scope" : "orde:r prat:dcur pypr:cur prod:urdc lcnt:u pymt:ur loca:urcd sctg:m shat:cdru rfpr:ur prad:rcd shpz:dcur shad:u ordr:cur shop:u shim:cd cust:urcd clpr:cr legl:ur prda:ru rtpr:rc oset:ur shpr:rcu cset:ru ordp:r catg:cdur nltg:m", + "tenantId" : 8542, + "iat" : 1730724354, + "jti" : "cEK9Idq5zltw4yM+D6hc2X4/oLo=" + } + recorded_at: Mon, 04 Nov 2024 12:45:54 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:54 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136 + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.115' + X-B3-Traceid: + - 812b3000c5149820280f4e06af2204c8 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "cb283d2e-c904-4de6-b321-cfa569ae8136", + "lastModifiedAt" : "2024-11-04T12:45:54.527929152", + "sku" : "1192", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:54 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:54 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.104' + X-B3-Traceid: + - a4dac80bb3ac11d1b65501f588eb1286 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:54 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/cb283d2e-c904-4de6-b321-cfa569ae8136 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 404 + message: Not Found + headers: + Date: + - Mon, 04 Nov 2024 12:45:54 GMT + Content-Length: + - '0' + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.013' + X-B3-Traceid: + - c49e433536a2c92b66e59929798e5b46 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:54 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_update_product/updates_the_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_update_product/updates_the_product.yml new file mode 100644 index 0000000..ab7fdcd --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Product/with_product/_update_product/updates_the_product.yml @@ -0,0 +1,510 @@ +--- +http_interactions: +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/oauth/token?grant_type=client_credentials + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Basic + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:53 GMT + Content-Type: + - application/json;charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Cache-Control: + - no-store + Pragma: + - no-cache + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Strict-Transport-Security: + - max-age=31536000 ; includeSubDomains + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.082' + X-B3-Traceid: + - ef979ae75e659f614aee569168d3628f + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "access_token" : "", + "token_type" : "bearer", + "expires_in" : 3599, + "scope" : "orde:r prat:dcur pypr:cur prod:urdc lcnt:u pymt:ur loca:urcd sctg:m shat:cdru rfpr:ur prad:rcd shpz:dcur shad:u ordr:cur shop:u shim:cd cust:urcd clpr:cr legl:ur prda:ru rtpr:rc oset:ur shpr:rcu cset:ru ordp:r catg:cdur nltg:m", + "tenantId" : 8542, + "iat" : 1730724353, + "jti" : "Me04sq14bJR+Cp+Rn/abTYs915o=" + } + recorded_at: Mon, 04 Nov 2024 12:45:53 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products + body: + encoding: UTF-8 + string: '{"name":"Team42 Product","description":"Spain\nRioja Tempranillo","manufacturer":"Grape + Vineyard","essentialFeatures":"Dry. 12% alcohol. Best vine variety.","tags":["Bestseller","Red + Wine","Sale"],"productIdentifiers":[{"type":"EAN","value":"9780134308135"}],"salesPrice":{"taxModel":"GROSS","amount":8.7,"currency":"GBP"},"listPrice":{"taxModel":"GROSS","amount":10.95,"currency":"GBP"},"manufacturerPrice":{"taxModel":"GROSS","amount":11.95,"currency":"GBP"},"visible":true,"taxClass":"REGULAR","shippingWeight":{"value":1175.0,"displayUnit":"GRAMS"},"maxOrderQuantity":6,"shippingDimension":{"length":1500,"width":1000,"height":2000},"refPrice":{"refQuantity":1,"unit":"LITER","quantity":0.75,"price":{"taxModel":"GROSS","amount":11.6,"currency":"GBP"}},"shippingPeriod":{"min":2,"max":4,"displayUnit":"WEEKS"},"pickupPeriod":{"min":1,"max":2,"displayUnit":"WEEKS"},"productLabels":[{"type":"NEW","activeFrom":"2024-08-13T11:31:30.210787732","activeUntil":"2024-09-10T11:31:30.210787732"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 201 + message: Created + headers: + Date: + - Mon, 04 Nov 2024 12:45:53 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.120' + X-B3-Traceid: + - aa2c00955a3198053e4d6727d04443fa + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca", + "lastModifiedAt" : "2024-11-04T12:45:53.608905276", + "sku" : "1191", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Bestseller", "Red Wine", "Sale" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.210787732", + "activeUntil" : "2024-09-10T11:31:30.210787732" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:53 GMT +- request: + method: patch + uri: https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca + body: + encoding: UTF-8 + string: '{"name":"Updated Team42 Product"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 04 Nov 2024 12:45:53 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.131' + X-B3-Traceid: + - 7701c746677cc96d480c272ceff07309 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca", + "lastModifiedAt" : "2024-11-04T12:45:53.884504244", + "sku" : "1191", + "salesPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "taxRate" : 0.2 + } + }, + "tags" : [ "Sale", "Bestseller", "Red Wine" ], + "productIdentifiers" : [ { + "type" : "EAN", + "value" : "9780134308135" + } ], + "visible" : true, + "taxClass" : "REGULAR", + "shippingWeight" : { + "value" : 1175.0, + "displayUnit" : "GRAMS" + }, + "maxOrderQuantity" : 6, + "shippingDimension" : { + "length" : 1500, + "width" : 1000, + "height" : 2000 + }, + "refPrice" : { + "refQuantity" : 1, + "unit" : "LITER", + "quantity" : 0.75, + "price" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "derivedPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "taxRate" : 0.2 + } + } + }, + "shippingPeriod" : { + "min" : 2, + "max" : 4, + "displayUnit" : "WEEKS" + }, + "pickupPeriod" : { + "min" : 1, + "max" : 2, + "displayUnit" : "WEEKS" + }, + "name" : "Updated Team42 Product", + "description" : "Spain\nRioja Tempranillo", + "manufacturer" : "Grape Vineyard", + "essentialFeatures" : "Dry. 12% alcohol. Best vine variety.", + "variationAttributes" : [ ], + "customText" : null, + "productLabels" : [ { + "type" : "NEW", + "activeFrom" : "2024-08-13T11:31:30.211", + "activeUntil" : "2024-09-10T11:31:30.211" + } ], + "isVariationProduct" : false, + "_embedded" : { + "availability" : { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca/additional-descriptions" + } + } + } + recorded_at: Mon, 04 Nov 2024 12:45:53 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/028e5d9f-5f31-4f7c-a0b9-aa993f3d63ca + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Faraday v2.10.1 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 204 + message: No Content + headers: + Date: + - Mon, 04 Nov 2024 12:45:54 GMT + Connection: + - keep-alive + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - 1; mode=block + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - DENY + Server: + - epages-beyond + X-Request-Time: + - '0.085' + X-B3-Traceid: + - 88088e3a5ab58bb9e5dde0a87c93deb1 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Mon, 04 Nov 2024 12:45:54 GMT +recorded_with: VCR 6.2.0