diff --git a/spec/vcr/bling_stock_by_product_id.yml b/spec/vcr/bling_stock_by_product_id.yml new file mode 100644 index 00000000..62735e1a --- /dev/null +++ b/spec/vcr/bling_stock_by_product_id.yml @@ -0,0 +1,62 @@ +--- +http_interactions: +- request: + method: get + uri: https://www.bling.com.br/Api/v3/estoques/saldos?idsProdutos%5B%5D=16181499538&idsProdutos%5B%5D=16181499539 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer <%= ENV['ACCESS_TOKEN'] %> + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 21 Dec 2023 15:39:39 GMT + Content-Type: + - application/json + Content-Length: + - '400' + Connection: + - keep-alive + Server-Timing: + - intid;desc=799ff8f4f515660e + Set-Cookie: + - PHPSESSID=d2ksur5lekkcipr6cud0u40aks; path=/; secure; HttpOnly + - PHPSESSID=j70ojd65bo1ta7mlb0ed4fbgoh; path=/; secure; HttpOnly + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Cache-Control: + - no-cache, public, must-revalidate, max-age=2592000 + Pragma: + - no-cache + Vary: + - Accept-Encoding + Cf-Cache-Status: + - DYNAMIC + Strict-Transport-Security: + - max-age=31536000 + Referrer-Policy: + - strict-origin-when-cross-origin + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + Server: + - cloudflare + Cf-Ray: + - 8391380d2fae2603-GIG + body: + encoding: ASCII-8BIT + string: '{"data":[{"produto":{"id":16181499538},"saldoFisicoTotal":30,"saldoVirtualTotal":30,"depositos":[{"id":9023657532,"saldoFisico":30,"saldoVirtual":30},{"id":14887161887,"saldoFisico":0,"saldoVirtual":0}]},{"produto":{"id":16181499539},"saldoFisicoTotal":30,"saldoVirtualTotal":30,"depositos":[{"id":9023657532,"saldoFisico":30,"saldoVirtual":30},{"id":14887161887,"saldoFisico":0,"saldoVirtual":0}]}]}' + recorded_at: Thu, 21 Dec 2023 15:39:39 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr/bling_stock_by_product_id_absent.yml b/spec/vcr/bling_stock_by_product_id_absent.yml new file mode 100644 index 00000000..cf05a902 --- /dev/null +++ b/spec/vcr/bling_stock_by_product_id_absent.yml @@ -0,0 +1,62 @@ +--- +http_interactions: +- request: + method: get + uri: https://www.bling.com.br/Api/v3/estoques/saldos?idsProdutos%5B%5D=98&idsProdutos%5B%5D=99 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer <%= ENV['ACCESS_TOKEN'] %> + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 21 Dec 2023 15:44:36 GMT + Content-Type: + - application/json + Content-Length: + - '11' + Connection: + - keep-alive + Server-Timing: + - intid;desc=cd14c0b39f3ad417 + Set-Cookie: + - PHPSESSID=9bvfa6fhi5bkfc8g5sgo2sde9n; path=/; secure; HttpOnly + - PHPSESSID=pk0i8617mlrku47guakbr7hp6l; path=/; secure; HttpOnly + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Cache-Control: + - no-cache, public, must-revalidate, max-age=2592000 + Pragma: + - no-cache + Vary: + - Accept-Encoding + Cf-Cache-Status: + - DYNAMIC + Strict-Transport-Security: + - max-age=31536000 + Referrer-Policy: + - strict-origin-when-cross-origin + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + Server: + - cloudflare + Cf-Ray: + - 83913f4f5fcb25b1-GIG + body: + encoding: ASCII-8BIT + string: '{"data":[]}' + recorded_at: Thu, 21 Dec 2023 15:44:36 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr/bling_stock_by_product_id_present_absent.yml b/spec/vcr/bling_stock_by_product_id_present_absent.yml new file mode 100644 index 00000000..20b16341 --- /dev/null +++ b/spec/vcr/bling_stock_by_product_id_present_absent.yml @@ -0,0 +1,62 @@ +--- +http_interactions: +- request: + method: get + uri: https://www.bling.com.br/Api/v3/estoques/saldos?idsProdutos%5B%5D=16181499539&idsProdutos%5B%5D=98 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer <%= ENV['ACCESS_TOKEN'] %> + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 21 Dec 2023 15:47:31 GMT + Content-Type: + - application/json + Content-Length: + - '205' + Connection: + - keep-alive + Server-Timing: + - intid;desc=ece8f463a8cfa69d + Set-Cookie: + - PHPSESSID=natl10m8en20s9a2qjs17mj4h4; path=/; secure; HttpOnly + - PHPSESSID=sop0p82mn2baeljk5n32erg0m1; path=/; secure; HttpOnly + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Cache-Control: + - no-cache, public, must-revalidate, max-age=2592000 + Pragma: + - no-cache + Vary: + - Accept-Encoding + Cf-Cache-Status: + - DYNAMIC + Strict-Transport-Security: + - max-age=31536000 + Referrer-Policy: + - strict-origin-when-cross-origin + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + Server: + - cloudflare + Cf-Ray: + - 839143943ac564bb-GIG + body: + encoding: ASCII-8BIT + string: '{"data":[{"produto":{"id":16181499539},"saldoFisicoTotal":30,"saldoVirtualTotal":30,"depositos":[{"id":9023657532,"saldoFisico":30,"saldoVirtual":30},{"id":14887161887,"saldoFisico":0,"saldoVirtual":0}]}]}' + recorded_at: Thu, 21 Dec 2023 15:47:31 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/vcr/bling_stocks.yml b/spec/vcr/bling_stocks.yml new file mode 100644 index 00000000..16fed556 --- /dev/null +++ b/spec/vcr/bling_stocks.yml @@ -0,0 +1,62 @@ +--- +http_interactions: +- request: + method: get + uri: https://www.bling.com.br/Api/v3/estoques/saldos?idsProdutos%5B%5D=16181499539 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer <%= ENV['ACCESS_TOKEN'] %> + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 21 Dec 2023 16:33:06 GMT + Content-Type: + - application/json + Content-Length: + - '205' + Connection: + - keep-alive + Server-Timing: + - intid;desc=b69af751242dc7fe + Set-Cookie: + - PHPSESSID=8r3o4dg9hcjahhs16mlr9j9odg; path=/; secure; HttpOnly + - PHPSESSID=cj2ts0rrqbtgoa5vgp55blvvnn; path=/; secure; HttpOnly + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Cache-Control: + - no-cache, public, must-revalidate, max-age=2592000 + Pragma: + - no-cache + Vary: + - Accept-Encoding + Cf-Cache-Status: + - DYNAMIC + Strict-Transport-Security: + - max-age=31536000 + Referrer-Policy: + - strict-origin-when-cross-origin + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + Server: + - cloudflare + Cf-Ray: + - 8391865cabf91d42-GIG + body: + encoding: ASCII-8BIT + string: '{"data":[{"produto":{"id":16181499539},"saldoFisicoTotal":30,"saldoVirtualTotal":30,"depositos":[{"id":9023657532,"saldoFisico":30,"saldoVirtual":30},{"id":14887161887,"saldoFisico":0,"saldoVirtual":0}]}]}' + recorded_at: Thu, 21 Dec 2023 16:33:06 GMT +recorded_with: VCR 6.2.0