private void HydrateExternalJson(int shopifyJsonType, long shopifyId) { if (shopifyJsonType == ShopifyJsonType.Location) { var json = _inventoryApi.RetrieveLocation(shopifyId); UpdateRecord(shopifyJsonType, shopifyId, json); } if (shopifyJsonType == ShopifyJsonType.Customer) { var json = _customerApi.Retrieve(shopifyId); UpdateRecord(shopifyJsonType, shopifyId, json); } if (shopifyJsonType == ShopifyJsonType.Product) { var json = _productApi.RetrieveProducts(shopifyId); UpdateRecord(shopifyJsonType, shopifyId, json); } if (shopifyJsonType == ShopifyJsonType.Variant) { var json = _productApi.RetrieveVariant(shopifyId); UpdateRecord(shopifyJsonType, shopifyId, json); } if (shopifyJsonType == ShopifyJsonType.Order) { var json = _orderApi.Retrieve(shopifyId); UpdateRecord(shopifyJsonType, shopifyId, json); } if (shopifyJsonType == ShopifyJsonType.Transaction) { var transactions = _orderApi.RetrieveTransactions(shopifyId) .DeserializeFromJson <List <Push.Shopify.Api.Transactions.Transaction> >(); foreach (var transaction in transactions) { UpdateRecord(shopifyJsonType, transaction.id, transaction.SerializeToJson()); } } throw new NotImplementedException(); }