From c2ce7688ec303d483744d42226220dcc50654df0 Mon Sep 17 00:00:00 2001 From: k4th Date: Tue, 29 Oct 2024 15:40:11 +0100 Subject: [PATCH] Add product availability endpoints --- .../product_management/availability.rb | 112 ++++ .../product_management/availability_spec.rb | 88 +++ .../returns_the_availability_of_a_product.yml | 452 +++++++++++++++ .../disables_purchasability_for_a_product.yml | 454 +++++++++++++++ .../enables_purchasability_for_a_product.yml | 454 +++++++++++++++ ...justs_the_available_stock_of_a_product.yml | 542 ++++++++++++++++++ ...isables_stock_management_for_a_product.yml | 536 +++++++++++++++++ ...enables_stock_management_for_a_product.yml | 460 +++++++++++++++ ...updates_the_reserve_stock_of_a_product.yml | 542 ++++++++++++++++++ 9 files changed, 3640 insertions(+) create mode 100644 lib/beyond_api/services/product_management/availability.rb create mode 100644 spec/beyond_api/services/product_management/availability_spec.rb create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_availability/returns_the_availability_of_a_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_disable_purchasability/disables_purchasability_for_a_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_enable_purchasability/enables_purchasability_for_a_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_adjust_stock_level/adjusts_the_available_stock_of_a_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_disable_stock_management/disables_stock_management_for_a_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_enable_stock_management/enables_stock_management_for_a_product.yml create mode 100644 spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_update_reserve_stock/updates_the_reserve_stock_of_a_product.yml diff --git a/lib/beyond_api/services/product_management/availability.rb b/lib/beyond_api/services/product_management/availability.rb new file mode 100644 index 0000000..daa1950 --- /dev/null +++ b/lib/beyond_api/services/product_management/availability.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +module BeyondApi + module ProductManagement + # @example How to instantiate a client + # @client = BeyondApi::ProductManagement::Availability.new(api_url: 'https://example.com/api', access_token: 'your_token') + class Availability < BaseService + # Retrieve the the availability of a product. + # + # @see https://developer.epages.com/beyond-docs/#show_product_availability_details + # + # @param id [String] the product UUID + # + # @return [Hash] + # + # @example + # @client.availability('10edc7ed-2513-4228-adcd-54b32aae9300') + def availability(id) + get("products/#{id}/availability") + end + + # Enable stock management for a product or variation product. + # + # @see https://developer.epages.com/beyond-docs/#enable_stock_management + # + # @param id [String] the product UUID + # @param initial_available_stock [Integer] the number of products available in stock + # @param stock_threshold [Integer] the inventory level that indicates that the product needs to be reordered + # + # @return [Hash] + # + # @example + # @client.enable_stock_management('b5545f71-0895-46e2-bc2b-b40adc8d1b3e', 100, 2) + def enable_stock_management(id, initial_available_stock, stock_threshold) + post("products/#{id}/availability/enable-stock-management", + { initial_available_stock:, stock_threshold: }) + end + + # Disable stock management for a product or variation product. + # + # @see https://developer.epages.com/beyond-docs/#disable_stock_management + # + # @param id [String] the product UUID + # + # @return [Hash] + # + # @example + # @client.disable_stock_management('0305a6f7-8c71-4420-80e0-7509636d8f19') + def disable_stock_management(id) + post("products/#{id}/availability/disable-stock-management") + end + + # Adjust the available stock of a product. + # + # @see https://developer.epages.com/beyond-docs/#adjust_stock_level + # + # @param id [String] the product UUID + # @param relative_amount [Integer] the relative amount to change the number of products available in stock by + # + # @return [Hash] + # + # @example + # @client.adjust_stock_level('5ab890e6-55ec-43d0-a9ba-c1d28bbe08e0', -1) + def adjust_stock_level(id, relative_amount) + post("products/#{id}/availability/adjust-available-stock", relative_amount:) + end + + # Update this reserve stock by changing the stockThreshold value of a product or variation product. + # + # @see https://developer.epages.com/beyond-docs/#update_reserve_stock + # + # @param id [String] the product UUID + # @param stock_threshold [Integer] the inventory level that indicates that the product needs to be reordered + # + # @return [Hash] + # + # @example + # @client.update_reserve_stock('341a50d4-580c-4c69-8529-48880d44709f', -1) + def update_reserve_stock(id, stock_threshold) + put("products/#{id}/availability/update-stock-threshold", stock_threshold:) + end + + # Enable purchasability for a product. + # + # @see https://developer.epages.com/beyond-docs/#enable_purchasability + # + # @param id [String] the product UUID + # + # @return [Hash] + # + # @example + # @client.enable_purchasability('30c41901-f2b0-4598-be9f-9f50fbed989c') + def enable_purchasability(id) + post("products/#{id}/availability/enable-purchasability") + end + + # Disable purchasability for a product. + # + # @see https://developer.epages.com/beyond-docs/#disable_purchasability + # + # @param id [String] the product UUID + # + # @return [Hash] + # + # @example + # @client.disable_purchasability('5723118a-7e52-4c73-8f4d-3cc044342064') + def disable_purchasability(id) + post("products/#{id}/availability/disable-purchasability") + end + end + end +end diff --git a/spec/beyond_api/services/product_management/availability_spec.rb b/spec/beyond_api/services/product_management/availability_spec.rb new file mode 100644 index 0000000..a631240 --- /dev/null +++ b/spec/beyond_api/services/product_management/availability_spec.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +RSpec.describe BeyondApi::ProductManagement::Availability, vcr: true do + let(:client) { described_class.new(api_url: ENV.fetch('API_URL', nil), access_token: beyond_access_token) } + + before do + @product_client = BeyondApi::ProductManagement::Product.new(api_url: ENV.fetch('API_URL', nil), + access_token: beyond_access_token) + @product = @product_client.create(build(:product_data)) + end + + describe '.availability' do + it 'returns the availability of a product' do + response = client.availability(@product[:id]) + + expect(response).not_to be nil + expect(response).to include( + :availability_state, + :available_stock, + :stock_threshold, + :purchasable, + :links + ) + end + end + + describe '.enable_purchasability' do + it 'enables purchasability for a product' do + response = client.enable_purchasability(@product[:id]) + + expect(response).not_to be nil + end + end + + describe '.disable_purchasability' do + it 'disables purchasability for a product' do + response = client.disable_purchasability(@product[:id]) + + expect(response).not_to be nil + end + end + + context 'with stock management' do + before do + @availability = client.enable_stock_management(@product[:id], 100, 2) + end + + describe '.enable_stock_management' do + it 'enables stock management for a product' do + expect(@availability).not_to be nil + expect(@availability[:available_stock]).to eq(100) + expect(@availability[:stock_threshold]).to eq(2) + end + end + + describe '.disable_stock_management' do + it 'disables stock management for a product' do + response = client.disable_stock_management(@product[:id]) + + expect(response).not_to be nil + expect(response[:available_stock]).to eq(nil) + expect(response[:stock_threshold]).to eq(nil) + end + end + + describe '.adjust_stock_level' do + it 'adjusts the available stock of a product' do + response = client.adjust_stock_level(@product[:id], 10) + + expect(response).not_to be nil + expect(response[:available_stock]).to eq(110) + end + end + + describe '.update_reserve_stock' do + it 'updates the reserve stock of a product' do + response = client.update_reserve_stock(@product[:id], 3) + + expect(response).not_to be nil + expect(response[:stock_threshold]).to eq(3) + end + end + end + + after do + @product_client.delete(@product[:id]) + end +end diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_availability/returns_the_availability_of_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_availability/returns_the_availability_of_a_product.yml new file mode 100644 index 0000000..fd6c924 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_availability/returns_the_availability_of_a_product.yml @@ -0,0 +1,452 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:37 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.104' + X-B3-Traceid: + - 3ffe1e43b6ec57e4433547553d7f18a9 + 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" : 1730212777, + "jti" : "QB8eWd12VGsMNAgZlNoINweoiyA=" + } + recorded_at: Tue, 29 Oct 2024 14:39:37 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: + - Tue, 29 Oct 2024 14:39:38 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d + 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.217' + X-B3-Traceid: + - db0d37d6669e2974e88e6c5cd34df6e9 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "1306d575-988a-4986-9ede-03570655cc8d", + "lastModifiedAt" : "2024-10-29T14:39:38.124793451", + "sku" : "1120", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/1306d575-988a-4986-9ede-03570655cc8d/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:38 GMT +- 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: + - Tue, 29 Oct 2024 14:39:38 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.143' + X-B3-Traceid: + - 399513c910bef81a840c600226609b16 + 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" : 1730212778, + "jti" : "iEGVkxidmZ+Ro5E7XOc/2/KP09c=" + } + recorded_at: Tue, 29 Oct 2024 14:39:38 GMT +- request: + method: get + uri: https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/availability + 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: 200 + message: OK + headers: + Date: + - Tue, 29 Oct 2024 14:39:38 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.026' + X-B3-Traceid: + - 0fcfd53ea597b21e7e6f71241e64a888 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/availability/disable-purchasability" + }, + "enable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d/availability/enable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:38 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/1306d575-988a-4986-9ede-03570655cc8d + 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: + - Tue, 29 Oct 2024 14:39:38 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.173' + X-B3-Traceid: + - d143613fc35673b26165421a26e2612d + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:38 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_disable_purchasability/disables_purchasability_for_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_disable_purchasability/disables_purchasability_for_a_product.yml new file mode 100644 index 0000000..cd73991 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_disable_purchasability/disables_purchasability_for_a_product.yml @@ -0,0 +1,454 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:40 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.118' + X-B3-Traceid: + - cb4a96ff7ef33563ed1df000876d9eee + 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" : 1730212780, + "jti" : "to8IntIC9uK5qTo6W59N9PKn/8A=" + } + recorded_at: Tue, 29 Oct 2024 14:39:40 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: + - Tue, 29 Oct 2024 14:39:40 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7 + 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.418' + X-B3-Traceid: + - d9401668fca60e1577ecca451929a3f5 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "aceae342-719e-449b-9ca6-9f7cf019bac7", + "lastModifiedAt" : "2024-10-29T14:39:40.44838634", + "sku" : "1122", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/aceae342-719e-449b-9ca6-9f7cf019bac7/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:40 GMT +- 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: + - Tue, 29 Oct 2024 14:39:40 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.095' + X-B3-Traceid: + - 407ee5bf5b197168ab2ef1e7ce0a89ba + 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" : 1730212780, + "jti" : "Ux+G698TXLFEG46pWuGAbHUyE/Y=" + } + recorded_at: Tue, 29 Oct 2024 14:39:40 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/availability/disable-purchasability + body: + encoding: UTF-8 + 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: 200 + message: OK + headers: + Date: + - Tue, 29 Oct 2024 14:39:41 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/availability + 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.070' + X-B3-Traceid: + - e8e06b1763dbf74f5bea161f18e673f0 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : false, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/availability" + }, + "enable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/availability/enable-purchasability" + }, + "enable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7/availability/enable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:41 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/aceae342-719e-449b-9ca6-9f7cf019bac7 + 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: + - Tue, 29 Oct 2024 14:39:41 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.129' + X-B3-Traceid: + - 70c3e8688c1f768d688981d07b97ad0e + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:41 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_enable_purchasability/enables_purchasability_for_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_enable_purchasability/enables_purchasability_for_a_product.yml new file mode 100644 index 0000000..91fd3dc --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/_enable_purchasability/enables_purchasability_for_a_product.yml @@ -0,0 +1,454 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:39 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.094' + X-B3-Traceid: + - c7892d9eb9408ccc9e79fdcf4381da50 + 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" : 1730212778, + "jti" : "yaupe6emya1bjrwAQmrh1HRta8A=" + } + recorded_at: Tue, 29 Oct 2024 14:39:38 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: + - Tue, 29 Oct 2024 14:39:39 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba + 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.171' + X-B3-Traceid: + - 40ea5bc29b26210cd5a734fd7c559e1f + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "9fa0b743-a006-46ca-8726-b53991f6f6ba", + "lastModifiedAt" : "2024-10-29T14:39:39.201177379", + "sku" : "1121", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:39 GMT +- 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: + - Tue, 29 Oct 2024 14:39:39 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.083' + X-B3-Traceid: + - 8b9512341f572951967870b244963ccf + 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" : 1730212779, + "jti" : "Y48BP043ZLWcaQmgzo1n9GhwhH0=" + } + recorded_at: Tue, 29 Oct 2024 14:39:39 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability/enable-purchasability + body: + encoding: UTF-8 + 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: 200 + message: OK + headers: + Date: + - Tue, 29 Oct 2024 14:39:39 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability + 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.045' + X-B3-Traceid: + - '09dfd9a1e0dabd31172f3e359f8a59f1' + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability/disable-purchasability" + }, + "enable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba/availability/enable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:39 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/9fa0b743-a006-46ca-8726-b53991f6f6ba + 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: + - Tue, 29 Oct 2024 14:39:39 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.257' + X-B3-Traceid: + - b9f7478bec62e4e3ccf3d70f76e05b1f + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:39 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_adjust_stock_level/adjusts_the_available_stock_of_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_adjust_stock_level/adjusts_the_available_stock_of_a_product.yml new file mode 100644 index 0000000..fa76dff --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_adjust_stock_level/adjusts_the_available_stock_of_a_product.yml @@ -0,0 +1,542 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:43 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.110' + X-B3-Traceid: + - 4dff7ffc72651598db44ba4deb8f3087 + 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" : 1730212783, + "jti" : "oP+8hiDLkbv3x4fYNA+ITKZ53wo=" + } + recorded_at: Tue, 29 Oct 2024 14:39:43 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: + - Tue, 29 Oct 2024 14:39:44 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c + 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.164' + X-B3-Traceid: + - 15810d7b1ec9e9ef0ac6dbf3e3b416ac + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "7229e7be-3f52-4bc5-af55-262e260aa70c", + "lastModifiedAt" : "2024-10-29T14:39:44.005681826", + "sku" : "1125", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/7229e7be-3f52-4bc5-af55-262e260aa70c/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:44 GMT +- 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: + - Tue, 29 Oct 2024 14:39:44 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.085' + X-B3-Traceid: + - ac802dd8102e3e4e594e8ff3a1e92797 + 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" : 1730212784, + "jti" : "RM1BfaP+ODqAueBzhDvWLmupzBI=" + } + recorded_at: Tue, 29 Oct 2024 14:39:44 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/enable-stock-management + body: + encoding: UTF-8 + string: '{"initialAvailableStock":100,"stockThreshold":2}' + 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: + - Tue, 29 Oct 2024 14:39:44 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability + 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.072' + X-B3-Traceid: + - 9dd81b2d47525fdce9f554c87ce9b78f + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : 100, + "stockThreshold" : 2, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/disable-purchasability" + }, + "adjust-available-stock" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/adjust-available-stock" + }, + "update-stock-threshold" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/update-stock-threshold" + }, + "disable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/disable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:44 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/adjust-available-stock + body: + encoding: UTF-8 + string: '{"relativeAmount":10}' + 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: + - Tue, 29 Oct 2024 14:39:44 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability + 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.046' + X-B3-Traceid: + - 89cf22b189051da0198ba0ed6d170133 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : 110, + "stockThreshold" : 2, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/disable-purchasability" + }, + "adjust-available-stock" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/adjust-available-stock" + }, + "update-stock-threshold" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/update-stock-threshold" + }, + "disable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c/availability/disable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:44 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/7229e7be-3f52-4bc5-af55-262e260aa70c + 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: + - Tue, 29 Oct 2024 14:39:44 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.112' + X-B3-Traceid: + - 84a524c0b2ecad1981ae5d2a211a191f + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:44 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_disable_stock_management/disables_stock_management_for_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_disable_stock_management/disables_stock_management_for_a_product.yml new file mode 100644 index 0000000..fd6ee79 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_disable_stock_management/disables_stock_management_for_a_product.yml @@ -0,0 +1,536 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:42 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.103' + X-B3-Traceid: + - dd1bc211c75e43ba4505ab1da77b0ee6 + 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" : 1730212782, + "jti" : "nGRb9ZUBAZ4Y0o6W0RJonxEiQl8=" + } + recorded_at: Tue, 29 Oct 2024 14:39:42 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: + - Tue, 29 Oct 2024 14:39:42 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58 + 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.250' + X-B3-Traceid: + - 07b2d4f9590c127ab1b000e362e0f03c + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "af68f558-b478-4cf3-8b99-f1c2232c8c58", + "lastModifiedAt" : "2024-10-29T14:39:42.835554058", + "sku" : "1124", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:42 GMT +- 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: + - Tue, 29 Oct 2024 14:39:43 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.090' + X-B3-Traceid: + - 8089cffe8e84a0f4e6b5523a77cac6d1 + 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" : 1730212783, + "jti" : "1nLgCDpUQMUEH2NF6rq+J7S3bZQ=" + } + recorded_at: Tue, 29 Oct 2024 14:39:43 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/enable-stock-management + body: + encoding: UTF-8 + string: '{"initialAvailableStock":100,"stockThreshold":2}' + 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: + - Tue, 29 Oct 2024 14:39:43 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability + 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.044' + X-B3-Traceid: + - a250809ecc0b1fc07a44157f681ed522 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : 100, + "stockThreshold" : 2, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/disable-purchasability" + }, + "adjust-available-stock" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/adjust-available-stock" + }, + "update-stock-threshold" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/update-stock-threshold" + }, + "disable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/disable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:43 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/disable-stock-management + body: + encoding: UTF-8 + 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: 200 + message: OK + headers: + Date: + - Tue, 29 Oct 2024 14:39:43 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability + 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.059' + X-B3-Traceid: + - 38523bb92f030cf9300a63c44b3319fc + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : null, + "stockThreshold" : null, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/disable-purchasability" + }, + "enable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58/availability/enable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:43 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/af68f558-b478-4cf3-8b99-f1c2232c8c58 + 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: + - Tue, 29 Oct 2024 14:39:43 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.115' + X-B3-Traceid: + - 7225c942b3b1ef36d9f87bcb654079f6 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:43 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_enable_stock_management/enables_stock_management_for_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_enable_stock_management/enables_stock_management_for_a_product.yml new file mode 100644 index 0000000..8320ae5 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_enable_stock_management/enables_stock_management_for_a_product.yml @@ -0,0 +1,460 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:41 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.095' + X-B3-Traceid: + - c205bf66238017523eabc6faac9f7eed + 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" : 1730212781, + "jti" : "9sv8p5+dz9pZadDzSA0NUyn3x1s=" + } + recorded_at: Tue, 29 Oct 2024 14:39:41 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: + - Tue, 29 Oct 2024 14:39:41 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4 + 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.299' + X-B3-Traceid: + - 43668d15b681917ecfa8d94e100dec0e + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "9927fc3e-0d43-4bdb-803c-ce43c99078e4", + "lastModifiedAt" : "2024-10-29T14:39:41.737091818", + "sku" : "1123", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:41 GMT +- 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: + - Tue, 29 Oct 2024 14:39:42 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.100' + X-B3-Traceid: + - 66063fa36a54bbb52533b562dafd7a2c + 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" : 1730212782, + "jti" : "ZbMstzbD3FkON3F6OCpmU2okDgg=" + } + recorded_at: Tue, 29 Oct 2024 14:39:42 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability/enable-stock-management + body: + encoding: UTF-8 + string: '{"initialAvailableStock":100,"stockThreshold":2}' + 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: + - Tue, 29 Oct 2024 14:39:42 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability + 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.050' + X-B3-Traceid: + - a40416be060a68ab7acb8dbaeb44f3e7 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : 100, + "stockThreshold" : 2, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability/disable-purchasability" + }, + "adjust-available-stock" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability/adjust-available-stock" + }, + "update-stock-threshold" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability/update-stock-threshold" + }, + "disable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4/availability/disable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:42 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/9927fc3e-0d43-4bdb-803c-ce43c99078e4 + 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: + - Tue, 29 Oct 2024 14:39:42 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.112' + X-B3-Traceid: + - 98f5eb1afc7a0073ad8dd1ad0147a4a9 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:42 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_update_reserve_stock/updates_the_reserve_stock_of_a_product.yml b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_update_reserve_stock/updates_the_reserve_stock_of_a_product.yml new file mode 100644 index 0000000..c10b4e8 --- /dev/null +++ b/spec/vcr_cassettes/BeyondApi_ProductManagement_Availability/with_stock_management/_update_reserve_stock/updates_the_reserve_stock_of_a_product.yml @@ -0,0 +1,542 @@ +--- +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: + - Tue, 29 Oct 2024 14:39:44 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.100' + X-B3-Traceid: + - 4dd3f4f572a68ee04f6cab5cf97a2991 + 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" : 1730212784, + "jti" : "0gCHjbViYRJnxi6x7g6ClCYnNNg=" + } + recorded_at: Tue, 29 Oct 2024 14:39:44 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: + - Tue, 29 Oct 2024 14:39:45 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988 + 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.223' + X-B3-Traceid: + - '09ce3b2ce57c87237228e88e60660b5c' + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "_id" : "55f010f4-46f2-4391-b376-0e35073c1988", + "lastModifiedAt" : "2024-10-29T14:39:45.182153343", + "sku" : "1126", + "salesPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 8.7, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 7.25, + "taxRate" : 0.2 + } + }, + "listPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 10.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.125, + "taxRate" : 0.2 + } + }, + "manufacturerPrice" : { + "taxModel" : "GROSS", + "currency" : "GBP", + "amount" : 11.95, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.95833333333333333333333, + "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" : "GROSS", + "currency" : "GBP", + "amount" : 11.6, + "derivedPrice" : { + "taxModel" : "NET", + "currency" : "GBP", + "amount" : 9.6667, + "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/55f010f4-46f2-4391-b376-0e35073c1988/availability" + } + } + } + }, + "_links" : { + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988" + }, + "availability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability" + }, + "attributes" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/attributes" + }, + "attachments" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/attachments" + }, + "images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/images" + }, + "default-image" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/default-image" + }, + "videos" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/videos" + }, + "cross-sells" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/cross-sells" + }, + "multiple-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/multiple-images" + }, + "external-images" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/external-images" + }, + "additional-descriptions" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/additional-descriptions" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:45 GMT +- 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: + - Tue, 29 Oct 2024 14:39:45 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.116' + X-B3-Traceid: + - 3864b4a432b6abd90d839aef886de8a4 + 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" : 1730212785, + "jti" : "yxUfaCi/7U/4cu4tc8Vw/L8hlI4=" + } + recorded_at: Tue, 29 Oct 2024 14:39:45 GMT +- request: + method: post + uri: https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/enable-stock-management + body: + encoding: UTF-8 + string: '{"initialAvailableStock":100,"stockThreshold":2}' + 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: + - Tue, 29 Oct 2024 14:39:45 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability + 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.045' + X-B3-Traceid: + - 56b59baa4400696bc863433d1cb46da0 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : 100, + "stockThreshold" : 2, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/disable-purchasability" + }, + "adjust-available-stock" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/adjust-available-stock" + }, + "update-stock-threshold" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/update-stock-threshold" + }, + "disable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/disable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:45 GMT +- request: + method: put + uri: https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/update-stock-threshold + body: + encoding: UTF-8 + string: '{"stockThreshold":3}' + 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: + - Tue, 29 Oct 2024 14:39:45 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Location: + - https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability + 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.048' + X-B3-Traceid: + - b616fc5b3cfa0ce6db229653b7f766f0 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: |- + { + "availabilityState" : "IN_STOCK", + "availableStock" : 100, + "stockThreshold" : 3, + "purchasable" : true, + "_links" : { + "product" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988" + }, + "self" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability" + }, + "disable-purchasability" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/disable-purchasability" + }, + "adjust-available-stock" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/adjust-available-stock" + }, + "update-stock-threshold" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/update-stock-threshold" + }, + "disable-stock-management" : { + "href" : "https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988/availability/disable-stock-management" + } + } + } + recorded_at: Tue, 29 Oct 2024 14:39:45 GMT +- request: + method: delete + uri: https://team42-beyond-api.beyondshop.cloud/api/products/55f010f4-46f2-4391-b376-0e35073c1988 + 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: + - Tue, 29 Oct 2024 14:39:46 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.181' + X-B3-Traceid: + - d570e5786a3c30e225ed331ed05ed371 + X-Hello-Human: + - Come work with us! https://developer.epages.com/devjobs/ + body: + encoding: UTF-8 + string: '' + recorded_at: Tue, 29 Oct 2024 14:39:46 GMT +recorded_with: VCR 6.2.0