Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [{"Suppliers": []
- "StockLevels": [
- {
- "Location": {
- "StockLocationId": "00000000-0000-0000-0000-000000000000",
- "LocationName": "Default",
- "IsFulfillmentCenter": false,
- "LocationTag": null,
- "BinRack": "C01-0000"
- },
- "StockLevel": 100,
- "StockValue": 0,
- "MinimumLevel": 20,
- "InOrderBook": 2,
- "Due": 0,
- "InOrders": 2,
- "Available": 98,
- "UnitCost": 0,
- "SKU": null,
- "AutoAdjust": false,
- "LastUpdateDate": "2018-01-02T09:21:35",
- "LastUpdateOperation": "OPENING STOCK",
- "rowid": "00000000-0000-0000-0000-000000000000",
- "PendingUpdate": false,
- "StockItemId": "c3566ffc-9a7a-4de1-97eb-77d250a7bf25"
- }
- ],
- "ItemChannelDescriptions": [
- ],
- "ItemExtendedProperties": [
- ],
- "ItemChannelTitles": [
- ],
- "ItemChannelPrices": [
- ],
- "Images": [
- ],
- "ItemNumber": "TEST_SS7050",
- "ItemTitle": "TEST_Swan Stabilo Boss Highlighter Yellow",
- "BarcodeNumber": "4006381118740",
- "MetaData": "Stabilo Boss Highlighter Yellow. The original highlighter since 1972. Available in a choice of attractive fluorescent colors with a long cap off time. The distinctive design stops the pen from rolling away and makes it usable anywhere. Brand quality from Schwann Stabilo, the inventor of the highlighter.",
- "isBatchedStockType": false,
- "PurchasePrice": 0,
- "RetailPrice": null,
- "TaxRate": 0,
- "PostalServiceId": "00000000-0000-0000-0000-000000000000",
- "PostalServiceName": null,
- "CategoryId": "b4e35a83-0e63-4e85-995f-5a99ce998fcf",
- "CategoryName": "Linnworks Test Category",
- "PackageGroupId": "00000000-0000-0000-0000-000000000000",
- "PackageGroupName": null,
- "Height": 0,
- "Width": 0,
- "Depth": 0,
- "Weight": 0.1,
- "CreationDate": "2018-01-02T09:21:36.163",
- "InventoryTrackingType": 0,
- "BatchNumberScanRequired": false,
- "SerialNumberScanRequired": false,
- "StockItemId": "c3566ffc-9a7a-4de1-97eb-77d250a7bf25"}]
- public class fromJSON{
- public cls_Suppliers[] Suppliers;
- public cls_StockLevels[] StockLevels;
- public cls_ItemChannelDescriptions[] ItemChannelDescriptions;
- public cls_ItemExtendedProperties[] ItemExtendedProperties;
- public cls_ItemChannelTitles[] ItemChannelTitles;
- public cls_ItemChannelPrices[] ItemChannelPrices;
- public cls_Images[] Images;
- public String ItemNumber; //TEST_SS7050
- public String ItemTitle; //TEST_Swan Stabilo Boss Highlighter Yellow
- public String BarcodeNumber; //4006381118740
- public String MetaData; //Stabilo Boss Highlighter Yellow. The original highlighter since 1972. Available in a choice of attractive fluorescent colors with a long cap off time. The distinctive design stops the pen from rolling away and makes it usable anywhere. Brand quality from Schwann Stabilo, the inventor of the highlighter.
- public boolean isBatchedStockType;
- public Double PurchasePrice; //0
- public cls_RetailPrice RetailPrice;
- public Double TaxRate; //0
- public String PostalServiceId; //00000000-0000-0000-0000-000000000000
- public cls_PostalServiceName PostalServiceName;
- public String CategoryId; //b4e35a83-0e63-4e85-995f-5a99ce998fcf
- public String CategoryName; //Linnworks Test Category
- public String PackageGroupId; //00000000-0000-0000-0000-000000000000
- public cls_PackageGroupName PackageGroupName;
- public Double Height; //0
- public Double Width; //0
- public Double Depth; //0
- public Double Weight; //0.1
- public String CreationDate; //2018-01-02T09:21:36.163
- public Integer InventoryTrackingType; //0
- public boolean BatchNumberScanRequired;
- public boolean SerialNumberScanRequired;
- public String StockItemId; //c3566ffc-9a7a-4de1-97eb-77d250a7bf25
- public class cls_StockLevels {
- public cls_Location Location;
- public Integer StockLevel; //100
- public Double StockValue; //0
- public Integer MinimumLevel; //20
- public Integer InOrderBook; //2
- public Integer Due; //0
- public Integer InOrders; //2
- public Integer Available; //98
- public Double UnitCost; //0
- public String SKU;
- public boolean AutoAdjust;
- public String LastUpdateDate; //2018-01-02T09:21:35
- public String LastUpdateOperation; //OPENING STOCK
- public String rowid; //00000000-0000-0000-0000-000000000000
- public boolean PendingUpdate;
- public String StockItemId; //c3566ffc-9a7a-4de1-97eb-77d250a7bf25
- }
- class cls_Suppliers {
- }
- class cls_Location {
- public String StockLocationId; //00000000-0000-0000-0000-000000000000
- public String LocationName; //Default
- public boolean IsFulfillmentCenter;
- public cls_LocationTag LocationTag;
- public String BinRack; //C01-0000
- }
- class cls_LocationTag {
- }
- class cls_SKU {
- }
- class cls_ItemChannelDescriptions {
- }
- class cls_ItemExtendedProperties {
- }
- class cls_ItemChannelTitles {
- }
- class cls_ItemChannelPrices {
- }
- class cls_Images {
- }
- class cls_RetailPrice {
- }
- class cls_PostalServiceName {
- }
- class cls_PackageGroupName {
- }
- public static fromJSON parse(String json){
- return (fromJSON) System.JSON.deserialize(json, fromJSON.class);
- }}
- List<fromJSON>response= (List<fromJSON>)JSON.deserialize(res.getBody(), List<fromJSON>.class);
- Map<String, Integer> myMap = new Map<String, Integer>();
- for(fromJSON.cls_StockLevels result: response.StockLevel) {
- myMap.put(result.SKU, result.Available);
- System.debug('MAP: '+ myMap);
- }
Add Comment
Please, Sign In to add comment