Skip to content

Instantly share code, notes, and snippets.

@jon-by
Created April 9, 2021 19:53
Show Gist options
  • Save jon-by/a9eb95a448ac6f906fd0676c8f8901ae to your computer and use it in GitHub Desktop.
Save jon-by/a9eb95a448ac6f906fd0676c8f8901ae to your computer and use it in GitHub Desktop.
Desafio codeby
{
"value": 657,
"items": [
{
"uniqueId": "6EA48CF66F6349648018C322C5560FA8",
"id": "16701615",
"productId": "317",
"productRefId": null,
"refId": null,
"ean": "223311",
"name": "Trufa BENDITO CACAU 55% CACAU 30 G",
"skuName": "30 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 303,
"listPrice": 303,
"manualPrice": null,
"sellingPrice": 273,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159959-800-1029/truffon-meio-amargo.png?v=636930938547630000",
"detailUrl": "/trufa-bendito-cacau-55-/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#246461c4-7dcc-43c1-ba10-bae715ddd480",
"value": -30,
"rawValue": -0.3,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "33DEE4CA67A14A4D914C6FFCE698281F",
"id": "16701612",
"productId": "314",
"productRefId": null,
"refId": null,
"ean": "0123456789123",
"name": "TRUFA MORANGO",
"skuName": "TRUFA MORANGO",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 123,
"listPrice": 123,
"manualPrice": null,
"sellingPrice": 111,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159939-800-1029/trufa-morango-30g.png?v=636916431597070000",
"detailUrl": "/trufa-morango/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#246461c4-7dcc-43c1-ba10-bae715ddd480",
"value": -12,
"rawValue": -0.12,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "BF99659671134B10BD20343AE9ECF12F",
"id": "16701610",
"productId": "312",
"productRefId": null,
"refId": null,
"ean": "223311",
"name": "TRUFA TRADICIONAL 30 G",
"skuName": "30 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 303,
"listPrice": 303,
"manualPrice": null,
"sellingPrice": 273,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159942-800-1029/trufa-tradicional.png?v=636916452526400000",
"detailUrl": "/trufa-tradicional/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#246461c4-7dcc-43c1-ba10-bae715ddd480",
"value": -30,
"rawValue": -0.3,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
}
],
"totalizers": [
{ "id": "Items", "name": "Total dos Itens", "value": 729 },
{ "id": "Discounts", "name": "Total dos Descontos", "value": -72 }
],
"itemMetadata": {
"items": [
{
"id": "16701615",
"seller": "1",
"name": "Trufa BENDITO CACAU 55% CACAU 30 G",
"skuName": "30 G",
"productId": "317",
"refId": null,
"ean": "223311",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159959-800-1029/truffon-meio-amargo.png?v=636930938547630000",
"detailUrl": "/trufa-bendito-cacau-55-/p",
"assemblyOptions": []
},
{
"id": "16701612",
"seller": "1",
"name": "TRUFA MORANGO",
"skuName": "TRUFA MORANGO",
"productId": "314",
"refId": null,
"ean": "0123456789123",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159939-800-1029/trufa-morango-30g.png?v=636916431597070000",
"detailUrl": "/trufa-morango/p",
"assemblyOptions": []
},
{
"id": "16701610",
"seller": "1",
"name": "TRUFA TRADICIONAL 30 G",
"skuName": "30 G",
"productId": "312",
"refId": null,
"ean": "223311",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159942-800-1029/trufa-tradicional.png?v=636916452526400000",
"detailUrl": "/trufa-tradicional/p",
"assemblyOptions": []
}
]
}
}
{
"value": 1401,
"items": [
{
"uniqueId": "6EA48CF66F6349648018C322C5560FA8",
"id": "16701615",
"productId": "317",
"productRefId": null,
"refId": null,
"ean": "223311",
"name": "Trufa BENDITO CACAU 55% CACAU 30 G",
"skuName": "30 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 303,
"listPrice": 303,
"manualPrice": null,
"sellingPrice": 273,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159959-800-1029/truffon-meio-amargo.png?v=636930938547630000",
"detailUrl": "/trufa-bendito-cacau-55-/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -30,
"rawValue": -0.3,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "33DEE4CA67A14A4D914C6FFCE698281F",
"id": "16701612",
"productId": "314",
"productRefId": null,
"refId": null,
"ean": "0123456789123",
"name": "TRUFA MORANGO",
"skuName": "TRUFA MORANGO",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 123,
"listPrice": 123,
"manualPrice": null,
"sellingPrice": 111,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159939-800-1029/trufa-morango-30g.png?v=636916431597070000",
"detailUrl": "/trufa-morango/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -12,
"rawValue": -0.12,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "BF99659671134B10BD20343AE9ECF12F",
"id": "16701610",
"productId": "312",
"productRefId": null,
"refId": null,
"ean": "223311",
"name": "TRUFA TRADICIONAL 30 G",
"skuName": "30 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 303,
"listPrice": 303,
"manualPrice": null,
"sellingPrice": 273,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159942-800-1029/trufa-tradicional.png?v=636916452526400000",
"detailUrl": "/trufa-tradicional/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -30,
"rawValue": -0.3,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "CB9786BD499A475C815DC0E868CCCDE3",
"id": "16701618",
"productId": "318",
"productRefId": null,
"refId": null,
"ean": "223311",
"name": "TRUFA DE COCO 30 G",
"skuName": "30 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 303,
"listPrice": 303,
"manualPrice": null,
"sellingPrice": 273,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159957-800-1029/trufa-coco.png?v=636929369885800000",
"detailUrl": "/trufa-coco/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -30,
"rawValue": -0.3,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "73C3840DFE124A778B3A1F7826D58172",
"id": "16701609",
"productId": "311",
"productRefId": null,
"refId": null,
"ean": "223311",
"name": "TRUFA BRANCO 30G",
"skuName": "30G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 110,
"listPrice": 110,
"manualPrice": null,
"sellingPrice": 99,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159993-800-1029/trufa-branco.png?v=636945743710500000",
"detailUrl": "/trufa-lacreme-branco/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -11,
"rawValue": -0.11,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "822C1AC05E674B21B2D16137AE235AD1",
"id": "16701611",
"productId": "313",
"productRefId": null,
"refId": null,
"ean": "11122222",
"name": "TRUFA MEZZO 30 G",
"skuName": "30 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 303,
"listPrice": 303,
"manualPrice": null,
"sellingPrice": 273,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159941-800-1029/mezzo.png?v=636916443729870000",
"detailUrl": "/trufa-mezzo/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -30,
"rawValue": -0.3,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
},
{
"uniqueId": "0C11A2FE262A481A9A58FB7C0E977662",
"id": "16701608",
"productId": "310",
"productRefId": null,
"refId": null,
"ean": "1122334",
"name": "TRUFA MORANGO E MARACUJÁ 13,5 G",
"skuName": "13,5 G",
"modalType": null,
"parentItemIndex": null,
"parentAssemblyBinding": null,
"assemblies": [],
"priceValidUntil": "2020-12-01T02:30:00Z",
"tax": 0,
"price": 110,
"listPrice": 110,
"manualPrice": null,
"sellingPrice": 99,
"rewardValue": 0,
"isGift": false,
"additionalInfo": {
"brandName": "Codeby",
"brandId": "2000004",
"offeringInfo": null,
"offeringType": null,
"offeringTypeId": null
},
"preSaleDate": null,
"productCategoryIds": "/29/",
"productCategories": { "29": "trufas" },
"quantity": 1,
"seller": "1",
"sellerChain": ["1"],
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159936-800-1029/Trufa-Morango-e-Maracuja.png?v=636915614811230000",
"detailUrl": "/trufa-morango-e-maracuja-/p",
"components": [],
"bundleItems": [],
"attachments": [],
"attachmentOfferings": [],
"offerings": [],
"priceTags": [
{
"name": "discount@price-6f7f6403-f49b-4e24-936e-bbdba265e959#42b7009d-54a4-4c66-abae-1446b085c5c1",
"value": -11,
"rawValue": -0.11,
"isPercentual": false,
"identifier": "6f7f6403-f49b-4e24-936e-bbdba265e959"
}
],
"availability": "available",
"measurementUnit": "un",
"unitMultiplier": 1,
"manufacturerCode": null
}
],
"totalizers": [
{ "id": "Items", "name": "Total dos Itens", "value": 1555 },
{ "id": "Discounts", "name": "Total dos Descontos", "value": -154 }
],
"itemMetadata": {
"items": [
{
"id": "16701615",
"seller": "1",
"name": "Trufa BENDITO CACAU 55% CACAU 30 G",
"skuName": "30 G",
"productId": "317",
"refId": null,
"ean": "223311",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159959-800-1029/truffon-meio-amargo.png?v=636930938547630000",
"detailUrl": "/trufa-bendito-cacau-55-/p",
"assemblyOptions": []
},
{
"id": "16701612",
"seller": "1",
"name": "TRUFA MORANGO",
"skuName": "TRUFA MORANGO",
"productId": "314",
"refId": null,
"ean": "0123456789123",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159939-800-1029/trufa-morango-30g.png?v=636916431597070000",
"detailUrl": "/trufa-morango/p",
"assemblyOptions": []
},
{
"id": "16701610",
"seller": "1",
"name": "TRUFA TRADICIONAL 30 G",
"skuName": "30 G",
"productId": "312",
"refId": null,
"ean": "223311",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159942-800-1029/trufa-tradicional.png?v=636916452526400000",
"detailUrl": "/trufa-tradicional/p",
"assemblyOptions": []
},
{
"id": "16701618",
"seller": "1",
"name": "TRUFA DE COCO 30 G",
"skuName": "30 G",
"productId": "318",
"refId": null,
"ean": "223311",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159957-800-1029/trufa-coco.png?v=636929369885800000",
"detailUrl": "/trufa-coco/p",
"assemblyOptions": []
},
{
"id": "16701609",
"seller": "1",
"name": "TRUFA BRANCO 30G",
"skuName": "30G",
"productId": "311",
"refId": null,
"ean": "223311",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159993-800-1029/trufa-branco.png?v=636945743710500000",
"detailUrl": "/trufa-lacreme-branco/p",
"assemblyOptions": []
},
{
"id": "16701611",
"seller": "1",
"name": "TRUFA MEZZO 30 G",
"skuName": "30 G",
"productId": "313",
"refId": null,
"ean": "11122222",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159941-800-1029/mezzo.png?v=636916443729870000",
"detailUrl": "/trufa-mezzo/p",
"assemblyOptions": []
},
{
"id": "16701608",
"seller": "1",
"name": "TRUFA MORANGO E MARACUJÁ 13,5 G",
"skuName": "13,5 G",
"productId": "310",
"refId": null,
"ean": "1122334",
"imageUrl": "http://codeby.vteximg.com.br/arquivos/ids/159936-800-1029/Trufa-Morango-e-Maracuja.png?v=636915614811230000",
"detailUrl": "/trufa-morango-e-maracuja-/p",
"assemblyOptions": []
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment