Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(SQL Server) Ecwid - Search OrdersSee more Ecwid ExamplesSearch or filter orders in an Ecwid store. The response provides full details of the found orders. For more information, see https://api-docs.ecwid.com/reference/orders#search-orders
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls. -- CREATE PROCEDURE ChilkatSample AS BEGIN DECLARE @hr int DECLARE @iTmp0 int -- Important: Do not use nvarchar(max). See the warning about using nvarchar(max). DECLARE @sTmp0 nvarchar(4000) -- This example assumes the Chilkat API to have been previously unlocked. -- See Global Unlock Sample for sample code. DECLARE @http int -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT IF @hr <> 0 BEGIN PRINT 'Failed to create ActiveX component' RETURN END DECLARE @success int -- Implements the following CURL command: -- curl --request GET \ -- --url 'https://app.ecwid.com/api/v3/storeId/orders?token=token' \ -- --header 'Accept: application/json' -- Use the following online tool to generate HTTP code from a CURL command -- Convert a cURL Command to HTTP Source Code -- Load the access token previously obtained in Ecwid Get Access Token DECLARE @jsonToken int -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jsonToken OUT EXEC sp_OAMethod @jsonToken, 'LoadFile', @success OUT, 'qa_data/tokens/ecwid.json' EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json' DECLARE @params int -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @params OUT EXEC sp_OAMethod @params, 'UpdateInt', @success OUT, 'limit', 100 EXEC sp_OAMethod @params, 'UpdateString', @success OUT, 'email', 'joe@example.com' EXEC sp_OAMethod @jsonToken, 'StringOf', @sTmp0 OUT, 'access_token' EXEC sp_OAMethod @params, 'UpdateString', @success OUT, 'token', @sTmp0 DECLARE @resp int EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://app.ecwid.com/api/v3/storeId/orders', @params EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT IF @iTmp0 = 0 BEGIN EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT PRINT @sTmp0 EXEC @hr = sp_OADestroy @http EXEC @hr = sp_OADestroy @jsonToken EXEC @hr = sp_OADestroy @params RETURN END DECLARE @sbResponseBody int -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody DECLARE @jResp int -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody EXEC sp_OASetProperty @jResp, 'EmitCompact', 0 PRINT 'Response Body:' EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT PRINT @sTmp0 DECLARE @respStatusCode int EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT EXEC @hr = sp_OADestroy @resp PRINT 'Response Status Code = ' + @respStatusCode IF @respStatusCode <> 200 BEGIN PRINT 'Failed.' EXEC @hr = sp_OADestroy @http EXEC @hr = sp_OADestroy @jsonToken EXEC @hr = sp_OADestroy @params EXEC @hr = sp_OADestroy @sbResponseBody EXEC @hr = sp_OADestroy @jResp RETURN END -- Sample JSON response: -- (Sample code for parsing the JSON response is shown below) -- { -- "total": 1, -- "count": 1, -- "offset": 0, -- "limit": 100, -- "items": [ -- { -- "id": "XJ12H", -- "subtotal": 1076.64, -- "total": 2014.97, -- "giftCardRedemption": 2.23, -- "totalBeforeGiftCardRedemption": 2.23, -- "giftCardDoubleSpending": false, -- "usdTotal": 2014.97, -- "tax": 488.48, -- "paymentMethod": "Credit or debit card (Mollie)", -- "paymentStatus": "PARTIALLY_REFUNDED", -- "fulfillmentStatus": "DELIVERED", -- "vendorOrderNumber": "XJ12H", -- "orderNumber": 1082727626, -- "refererUrl": "https://mdemo.ecwid.com/", -- "globalReferer": "https://my.ecwid.com/", -- "createDate": "2018-05-31 15:08:36 +0000", -- "updateDate": "2018-05-31 15:09:35 +0000", -- "createTimestamp": 1527779316, -- "updateTimestamp": 1527779375, -- "hidden": false, -- "orderComments": "Test order comments", -- "privateAdminNotes": "Must be delivered till Sunday.", -- "email": "mscott@gmail.com", -- "ipAddress": "123.431.234.243", -- "customerId": 40201284, -- "customerGroupId": 12345, -- "customerGroup": "Gold", -- "customerTaxExempt": false, -- "customerTaxId": "", -- "customerTaxIdValid": false, -- "reversedTaxApplied": false, -- "discount": 4, -- "couponDiscount": 22, -- "volumeDiscount": 4, -- "membershipBasedDiscount": 0, -- "totalAndMembershipBasedDiscount": 0, -- "customDiscount": [ -- ], -- "discountCoupon": { -- "id": 29567026, -- "name": "API Testing", -- "code": "APITESTING", -- "discountType": "ABS", -- "status": "ACTIVE", -- "discount": 22, -- "launchDate": "2018-05-24 20:00:00 +0000", -- "usesLimit": "UNLIMITED", -- "applicationLimit": "UNLIMITED", -- "creationDate": "2018-05-31 15:08:33 +0000", -- "updateDate": "2018-05-24 13:40:32 +0000", -- "orderCount": 0 -- }, -- "discountInfo": [ -- { -- "value": 4, -- "type": "ABS", -- "base": "ON_TOTAL", -- "orderTotal": 1 -- } -- ], -- "items": [ -- { -- "id": 140273658, -- "productId": 66722487, -- "categoryId": 19563207, -- "price": 1060, -- "productPrice": 1000, -- "sku": "ABCA-IAC", -- "quantity": 1, -- "shortDescription": "", -- "tax": 331.01, -- "shipping": 0, -- "quantityInStock": 0, -- "name": "iMac", -- "isShippingRequired": true, -- "weight": 0, -- "trackQuantity": false, -- "fixedShippingRateOnly": false, -- "imageUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/391870914.jpg", -- "smallThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/650638292.jpg", -- "hdThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/650638293.jpg", -- "fixedShippingRate": 0, -- "digital": false, -- "couponApplied": true, -- "selectedOptions": [ -- { -- "name": "Price-Optimizer", -- "value": "6", -- "valuesArray": [ -- "6" -- ], -- "selections": [ -- { -- "selectionTitle": "6", -- "selectionModifier": 6, -- "selectionModifierType": "PERCENT" -- } -- ], -- "type": "CHOICE" -- } -- ], -- "taxes": [ -- { -- "name": "State tax", -- "value": 12, -- "total": 124.13, -- "taxOnDiscountedSubtotal": 124.13, -- "taxOnShipping": 0, -- "includeInPrice": false -- }, -- { -- "name": "TVA", -- "value": 20, -- "total": 206.88, -- "taxOnDiscountedSubtotal": 206.88, -- "taxOnShipping": 0, -- "includeInPrice": true -- } -- ], -- "dimensions": { -- "length": 0, -- "width": 0, -- "height": 0 -- }, -- "couponAmount": 21.66, -- "discounts": [ -- { -- "discountInfo": { -- "value": 4, -- "type": "ABS", -- "base": "ON_TOTAL", -- "orderTotal": 1 -- }, -- "total": 3.94 -- } -- ] -- }, -- { -- "id": 140273659, -- "productId": 66821181, -- "categoryId": 0, -- "price": 16.64, -- "productPrice": 16, -- "sku": "001001", -- "quantity": 1, -- "shortDescription": "This sturdy white, glossy ceramic mug is an essential to your cupboard. This brawny version of ceramic mugs shows it’s ...", -- "tax": 157.47, -- "shipping": 471.85, -- "quantityInStock": 0, -- "name": "Mug", -- "isShippingRequired": true, -- "weight": 0.4, -- "trackQuantity": false, -- "fixedShippingRateOnly": false, -- "imageUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/389900000.jpg", -- "smallThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/475772545.jpg", -- "hdThumbnailUrl": "https://ecwid-images-ru.gcdn.co/images/5035009/408631478.jpg", -- "fixedShippingRate": 0, -- "digital": false, -- "couponApplied": true, -- "selectedOptions": [ -- { -- "name": "Color", -- "value": "White", -- "valuesArray": [ -- "White" -- ], -- "selections": [ -- { -- "selectionTitle": "White", -- "selectionModifier": 0, -- "selectionModifierType": "ABSOLUTE" -- } -- ], -- "type": "CHOICE" -- }, -- { -- "name": "Size", -- "value": "11oz", -- "valuesArray": [ -- "11oz" -- ], -- "selections": [ -- { -- "selectionTitle": "11oz", -- "selectionModifier": 0, -- "selectionModifierType": "ABSOLUTE" -- } -- ], -- "type": "CHOICE" -- }, -- { -- "name": "Price-Optimizer", -- "value": "4", -- "valuesArray": [ -- "4" -- ], -- "selections": [ -- { -- "selectionTitle": "4", -- "selectionModifier": 4, -- "selectionModifierType": "PERCENT" -- } -- ], -- "type": "CHOICE" -- } -- ], -- "taxes": [ -- { -- "name": "State tax", -- "value": 12, -- "total": 59.05, -- "taxOnDiscountedSubtotal": 1.95, -- "taxOnShipping": 57.1, -- "includeInPrice": false -- }, -- { -- "name": "TVA", -- "value": 20, -- "total": 98.42, -- "taxOnDiscountedSubtotal": 3.25, -- "taxOnShipping": 95.17, -- "includeInPrice": true -- } -- ], -- "dimensions": { -- "length": 0, -- "width": 0, -- "height": 0 -- }, -- "couponAmount": 0.34, -- "discounts": [ -- { -- "discountInfo": { -- "value": 4, -- "type": "ABS", -- "base": "ON_TOTAL", -- "orderTotal": 1 -- }, -- "total": 0.06 -- } -- ] -- }, -- { -- "subscriptionId": 123456, -- "recurringChargeSettings": { -- "recurringInterval": "month", -- "recurringIntervalCount": 1 -- } -- } -- ], -- "refundedAmount": 3.5, -- "refunds": [ -- { -- "date": "2017-09-12 10:12:56 +0000", -- "source": "CP", -- "reason": "Testing!", -- "amount": 3.5 -- } -- ], -- "billingPerson": { -- "name": "Michael Scott", -- "companyName": "", -- "street": "555 Lackawanna Ave", -- "city": "Scranton", -- "countryCode": "US", -- "countryName": "United States", -- "postalCode": "18508", -- "stateOrProvinceCode": "PA", -- "stateOrProvinceName": "Pennsylvania", -- "phone": "" -- }, -- "shippingPerson": { -- "name": "Michael Scott", -- "companyName": "", -- "street": "555 Lackawanna Ave", -- "city": "Scranton", -- "countryCode": "US", -- "countryName": "United States", -- "postalCode": "18508", -- "stateOrProvinceCode": "PA", -- "stateOrProvinceName": "Pennsylvania", -- "phone": "" -- }, -- "shippingOption": { -- "shippingCarrierName": "Shipping app the-printful", -- "shippingMethodName": "USPS Priority Mail", -- "shippingRate": 471.85, -- "estimatedTransitTime": "1-3", -- "isPickup": false -- }, -- "handlingFee": { -- "name": "Handling Fee", -- "value": 4, -- "description": "" -- }, -- "predictedPackage": [ -- { -- "length": 0, -- "width": 0, -- "height": 0, -- "weight": 0.4, -- "declaredValue": 1076.64 -- } -- ], -- "shipments": [ -- { -- "id": "5e79bd4f-9ebf-4ab8-b901-24c9b48b19eb", -- "created": "2020-04-23 19:13:43 +0000", -- "shipTo": { -- "name": "Michael Scott", -- "companyName": "", -- "street": "555 Lackawanna Ave", -- "city": "Scranton", -- "countryCode": "US", -- "countryName": "United States", -- "postalCode": "18508", -- "stateOrProvinceCode": "PA", -- "stateOrProvinceName": "Pennsylvania", -- "phone": "" -- }, -- "shipFrom": { -- "companyName": "Roga Kopyty Inc", -- "street": "444 fff", -- "city": "New York", -- "countryCode": "US", -- "countryName": "United States", -- "postalCode": "10001", -- "stateOrProvinceCode": "NY", -- "stateOrProvinceName": "New York", -- "phone": "1011991919" -- }, -- "parcel": { -- "weight": 0.5, -- "weightUnit": 'KILOGRAM', -- "width": 10, -- "height": 10, -- "length": 10, -- "dimensionUnit": 'CM' -- }, -- "shippingService": { -- "carrier": 'USPS', -- "carrierName": 'Shipping, -- "carrierServiceName": "Priority Mail", -- "carrierServiceCode": "usps_priority" -- }, -- "tracking": { -- "tracking_number": "9499907123456123456781", -- "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781", -- "estimatedDays": 3 -- }, -- "shippingLabel": { -- "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", -- "commercial_invoice_url": "" -- } -- } -- ], -- "taxesOnShipping": [ -- { -- "name": "State tax", -- "value": 12, -- "total": 57.1 -- }, -- { -- "name": "TVA", -- "value": 20, -- "total": 95.17 -- } -- ], -- "paymentModule": "CUSTOM_PAYMENT_APP-mollie-pg", -- "additionalInfo": { -- "google_customer_id": "2008512504.1526280224" -- }, -- "paymentParams": {}, -- "orderExtraFields": [ -- { -- "id": "lang", -- "value": "en", -- "customerInputType": "", -- "title": "", -- "orderDetailsDisplaySection": "", -- "orderBy": "1" -- }, -- { -- "id": "askHowYouFoundUsApp", -- "value": "From a friend", -- "customerInputType": "SELECT", -- "title": "How did you hear about us?", -- "orderDetailsDisplaySection": "order_comments", -- "orderBy": "2" -- } -- ], -- "acceptMarketing": true, -- "refererId": "Amazon", -- "disableAllCustomerNotifications": false, -- "externalFulfillment": false, -- "pricesIncludeTax": false -- } -- ] -- } -- Sample code for parsing the JSON response... -- Use the following online tool to generate parsing code from sample JSON: -- Generate Parsing Code from JSON DECLARE @id nvarchar(4000) DECLARE @subtotal nvarchar(4000) DECLARE @total_str nvarchar(4000) DECLARE @giftCardRedemption nvarchar(4000) DECLARE @totalBeforeGiftCardRedemption nvarchar(4000) DECLARE @giftCardDoubleSpending int DECLARE @usdTotal nvarchar(4000) DECLARE @tax nvarchar(4000) DECLARE @paymentMethod nvarchar(4000) DECLARE @paymentStatus nvarchar(4000) DECLARE @fulfillmentStatus nvarchar(4000) DECLARE @vendorOrderNumber nvarchar(4000) DECLARE @orderNumber int DECLARE @refererUrl nvarchar(4000) DECLARE @globalReferer nvarchar(4000) DECLARE @createDate nvarchar(4000) DECLARE @updateDate nvarchar(4000) DECLARE @createTimestamp int DECLARE @updateTimestamp int DECLARE @hidden int DECLARE @orderComments nvarchar(4000) DECLARE @privateAdminNotes nvarchar(4000) DECLARE @email nvarchar(4000) DECLARE @ipAddress nvarchar(4000) DECLARE @customerId int DECLARE @customerGroupId int DECLARE @customerGroup nvarchar(4000) DECLARE @customerTaxExempt int DECLARE @customerTaxId nvarchar(4000) DECLARE @customerTaxIdValid int DECLARE @reversedTaxApplied int DECLARE @discount int DECLARE @couponDiscount int DECLARE @volumeDiscount int DECLARE @membershipBasedDiscount int DECLARE @totalAndMembershipBasedDiscount int DECLARE @discountCouponId int DECLARE @discountCouponName nvarchar(4000) DECLARE @discountCouponCode nvarchar(4000) DECLARE @discountCouponDiscountType nvarchar(4000) DECLARE @discountCouponStatus nvarchar(4000) DECLARE @discountCouponDiscount int DECLARE @discountCouponLaunchDate nvarchar(4000) DECLARE @discountCouponUsesLimit nvarchar(4000) DECLARE @discountCouponApplicationLimit nvarchar(4000) DECLARE @discountCouponCreationDate nvarchar(4000) DECLARE @discountCouponUpdateDate nvarchar(4000) DECLARE @discountCouponOrderCount int DECLARE @refundedAmount nvarchar(4000) DECLARE @billingPersonName nvarchar(4000) DECLARE @billingPersonCompanyName nvarchar(4000) DECLARE @billingPersonStreet nvarchar(4000) DECLARE @billingPersonCity nvarchar(4000) DECLARE @billingPersonCountryCode nvarchar(4000) DECLARE @billingPersonCountryName nvarchar(4000) DECLARE @billingPersonPostalCode nvarchar(4000) DECLARE @billingPersonStateOrProvinceCode nvarchar(4000) DECLARE @billingPersonStateOrProvinceName nvarchar(4000) DECLARE @billingPersonPhone nvarchar(4000) DECLARE @shippingPersonName nvarchar(4000) DECLARE @shippingPersonCompanyName nvarchar(4000) DECLARE @shippingPersonStreet nvarchar(4000) DECLARE @shippingPersonCity nvarchar(4000) DECLARE @shippingPersonCountryCode nvarchar(4000) DECLARE @shippingPersonCountryName nvarchar(4000) DECLARE @shippingPersonPostalCode nvarchar(4000) DECLARE @shippingPersonStateOrProvinceCode nvarchar(4000) DECLARE @shippingPersonStateOrProvinceName nvarchar(4000) DECLARE @shippingPersonPhone nvarchar(4000) DECLARE @shippingOptionShippingCarrierName nvarchar(4000) DECLARE @shippingOptionShippingMethodName nvarchar(4000) DECLARE @shippingOptionShippingRate nvarchar(4000) DECLARE @shippingOptionEstimatedTransitTime nvarchar(4000) DECLARE @shippingOptionIsPickup int DECLARE @handlingFeeName nvarchar(4000) DECLARE @handlingFeeValue int DECLARE @handlingFeeDescription nvarchar(4000) DECLARE @paymentModule nvarchar(4000) DECLARE @additionalInfoGoogle_customer_id nvarchar(4000) DECLARE @acceptMarketing int DECLARE @refererId nvarchar(4000) DECLARE @disableAllCustomerNotifications int DECLARE @externalFulfillment int DECLARE @pricesIncludeTax int DECLARE @j int DECLARE @count_j int DECLARE @value int DECLARE @v_type nvarchar(4000) DECLARE @base nvarchar(4000) DECLARE @orderTotal int DECLARE @id_int int DECLARE @productId int DECLARE @categoryId int DECLARE @price int DECLARE @productPrice int DECLARE @sku nvarchar(4000) DECLARE @quantity int DECLARE @shortDescription nvarchar(4000) DECLARE @shipping int DECLARE @quantityInStock int DECLARE @name nvarchar(4000) DECLARE @isShippingRequired int DECLARE @weight int DECLARE @trackQuantity int DECLARE @fixedShippingRateOnly int DECLARE @imageUrl nvarchar(4000) DECLARE @smallThumbnailUrl nvarchar(4000) DECLARE @hdThumbnailUrl nvarchar(4000) DECLARE @fixedShippingRate int DECLARE @digital int DECLARE @couponApplied int DECLARE @dimensionsLength int DECLARE @dimensionsWidth int DECLARE @dimensionsHeight int DECLARE @couponAmount nvarchar(4000) DECLARE @subscriptionId int DECLARE @recurringChargeSettingsRecurringInterval nvarchar(4000) DECLARE @recurringChargeSettingsRecurringIntervalCount int DECLARE @k int DECLARE @count_k int DECLARE @value_str nvarchar(4000) DECLARE @json1 int DECLARE @i1 int DECLARE @count_i1 int DECLARE @strVal nvarchar(4000) DECLARE @selectionTitle nvarchar(4000) DECLARE @selectionModifier int DECLARE @selectionModifierType nvarchar(4000) DECLARE @taxOnDiscountedSubtotal nvarchar(4000) DECLARE @taxOnShipping int DECLARE @includeInPrice int DECLARE @discountInfoValue int DECLARE @discountInfoType nvarchar(4000) DECLARE @discountInfoBase nvarchar(4000) DECLARE @discountInfoOrderTotal int DECLARE @date nvarchar(4000) DECLARE @source nvarchar(4000) DECLARE @reason nvarchar(4000) DECLARE @amount nvarchar(4000) DECLARE @length int DECLARE @width int DECLARE @height int DECLARE @weight_str nvarchar(4000) DECLARE @declaredValue nvarchar(4000) DECLARE @created nvarchar(4000) DECLARE @shipToName nvarchar(4000) DECLARE @shipToCompanyName nvarchar(4000) DECLARE @shipToStreet nvarchar(4000) DECLARE @shipToCity nvarchar(4000) DECLARE @shipToCountryCode nvarchar(4000) DECLARE @shipToCountryName nvarchar(4000) DECLARE @shipToPostalCode nvarchar(4000) DECLARE @shipToStateOrProvinceCode nvarchar(4000) DECLARE @shipToStateOrProvinceName nvarchar(4000) DECLARE @shipToPhone nvarchar(4000) DECLARE @shipFromCompanyName nvarchar(4000) DECLARE @shipFromStreet nvarchar(4000) DECLARE @shipFromCity nvarchar(4000) DECLARE @shipFromCountryCode nvarchar(4000) DECLARE @shipFromCountryName nvarchar(4000) DECLARE @shipFromPostalCode nvarchar(4000) DECLARE @shipFromStateOrProvinceCode nvarchar(4000) DECLARE @shipFromStateOrProvinceName nvarchar(4000) DECLARE @shipFromPhone nvarchar(4000) DECLARE @parcelWeight nvarchar(4000) DECLARE @parcelWeightUnit int DECLARE @parcelWidth int DECLARE @parcelHeight int DECLARE @parcelLength int DECLARE @parcelDimensionUnit int DECLARE @shippingServiceCarrier int DECLARE @shippingServiceCarrierName int DECLARE @shippingServiceCarrierServiceName nvarchar(4000) DECLARE @shippingServiceCarrierServiceCode nvarchar(4000) DECLARE @trackingTracking_number nvarchar(4000) DECLARE @trackingTracking_url nvarchar(4000) DECLARE @trackingEstimatedDays int DECLARE @shippingLabelLabel_url nvarchar(4000) DECLARE @shippingLabelCommercial_invoice_url nvarchar(4000) DECLARE @customerInputType nvarchar(4000) DECLARE @title nvarchar(4000) DECLARE @orderDetailsDisplaySection nvarchar(4000) DECLARE @orderBy nvarchar(4000) DECLARE @total int EXEC sp_OAMethod @jResp, 'IntOf', @total OUT, 'total' DECLARE @count int EXEC sp_OAMethod @jResp, 'IntOf', @count OUT, 'count' DECLARE @offset int EXEC sp_OAMethod @jResp, 'IntOf', @offset OUT, 'offset' DECLARE @limit int EXEC sp_OAMethod @jResp, 'IntOf', @limit OUT, 'limit' DECLARE @i int SELECT @i = 0 DECLARE @count_i int EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'items' WHILE @i < @count_i BEGIN EXEC sp_OASetProperty @jResp, 'I', @i EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'items[i].id' EXEC sp_OAMethod @jResp, 'StringOf', @subtotal OUT, 'items[i].subtotal' EXEC sp_OAMethod @jResp, 'StringOf', @total_str OUT, 'items[i].total' EXEC sp_OAMethod @jResp, 'StringOf', @giftCardRedemption OUT, 'items[i].giftCardRedemption' EXEC sp_OAMethod @jResp, 'StringOf', @totalBeforeGiftCardRedemption OUT, 'items[i].totalBeforeGiftCardRedemption' EXEC sp_OAMethod @jResp, 'BoolOf', @giftCardDoubleSpending OUT, 'items[i].giftCardDoubleSpending' EXEC sp_OAMethod @jResp, 'StringOf', @usdTotal OUT, 'items[i].usdTotal' EXEC sp_OAMethod @jResp, 'StringOf', @tax OUT, 'items[i].tax' EXEC sp_OAMethod @jResp, 'StringOf', @paymentMethod OUT, 'items[i].paymentMethod' EXEC sp_OAMethod @jResp, 'StringOf', @paymentStatus OUT, 'items[i].paymentStatus' EXEC sp_OAMethod @jResp, 'StringOf', @fulfillmentStatus OUT, 'items[i].fulfillmentStatus' EXEC sp_OAMethod @jResp, 'StringOf', @vendorOrderNumber OUT, 'items[i].vendorOrderNumber' EXEC sp_OAMethod @jResp, 'IntOf', @orderNumber OUT, 'items[i].orderNumber' EXEC sp_OAMethod @jResp, 'StringOf', @refererUrl OUT, 'items[i].refererUrl' EXEC sp_OAMethod @jResp, 'StringOf', @globalReferer OUT, 'items[i].globalReferer' EXEC sp_OAMethod @jResp, 'StringOf', @createDate OUT, 'items[i].createDate' EXEC sp_OAMethod @jResp, 'StringOf', @updateDate OUT, 'items[i].updateDate' EXEC sp_OAMethod @jResp, 'IntOf', @createTimestamp OUT, 'items[i].createTimestamp' EXEC sp_OAMethod @jResp, 'IntOf', @updateTimestamp OUT, 'items[i].updateTimestamp' EXEC sp_OAMethod @jResp, 'BoolOf', @hidden OUT, 'items[i].hidden' EXEC sp_OAMethod @jResp, 'StringOf', @orderComments OUT, 'items[i].orderComments' EXEC sp_OAMethod @jResp, 'StringOf', @privateAdminNotes OUT, 'items[i].privateAdminNotes' EXEC sp_OAMethod @jResp, 'StringOf', @email OUT, 'items[i].email' EXEC sp_OAMethod @jResp, 'StringOf', @ipAddress OUT, 'items[i].ipAddress' EXEC sp_OAMethod @jResp, 'IntOf', @customerId OUT, 'items[i].customerId' EXEC sp_OAMethod @jResp, 'IntOf', @customerGroupId OUT, 'items[i].customerGroupId' EXEC sp_OAMethod @jResp, 'StringOf', @customerGroup OUT, 'items[i].customerGroup' EXEC sp_OAMethod @jResp, 'BoolOf', @customerTaxExempt OUT, 'items[i].customerTaxExempt' EXEC sp_OAMethod @jResp, 'StringOf', @customerTaxId OUT, 'items[i].customerTaxId' EXEC sp_OAMethod @jResp, 'BoolOf', @customerTaxIdValid OUT, 'items[i].customerTaxIdValid' EXEC sp_OAMethod @jResp, 'BoolOf', @reversedTaxApplied OUT, 'items[i].reversedTaxApplied' EXEC sp_OAMethod @jResp, 'IntOf', @discount OUT, 'items[i].discount' EXEC sp_OAMethod @jResp, 'IntOf', @couponDiscount OUT, 'items[i].couponDiscount' EXEC sp_OAMethod @jResp, 'IntOf', @volumeDiscount OUT, 'items[i].volumeDiscount' EXEC sp_OAMethod @jResp, 'IntOf', @membershipBasedDiscount OUT, 'items[i].membershipBasedDiscount' EXEC sp_OAMethod @jResp, 'IntOf', @totalAndMembershipBasedDiscount OUT, 'items[i].totalAndMembershipBasedDiscount' EXEC sp_OAMethod @jResp, 'IntOf', @discountCouponId OUT, 'items[i].discountCoupon.id' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponName OUT, 'items[i].discountCoupon.name' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponCode OUT, 'items[i].discountCoupon.code' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponDiscountType OUT, 'items[i].discountCoupon.discountType' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponStatus OUT, 'items[i].discountCoupon.status' EXEC sp_OAMethod @jResp, 'IntOf', @discountCouponDiscount OUT, 'items[i].discountCoupon.discount' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponLaunchDate OUT, 'items[i].discountCoupon.launchDate' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponUsesLimit OUT, 'items[i].discountCoupon.usesLimit' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponApplicationLimit OUT, 'items[i].discountCoupon.applicationLimit' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponCreationDate OUT, 'items[i].discountCoupon.creationDate' EXEC sp_OAMethod @jResp, 'StringOf', @discountCouponUpdateDate OUT, 'items[i].discountCoupon.updateDate' EXEC sp_OAMethod @jResp, 'IntOf', @discountCouponOrderCount OUT, 'items[i].discountCoupon.orderCount' EXEC sp_OAMethod @jResp, 'StringOf', @refundedAmount OUT, 'items[i].refundedAmount' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonName OUT, 'items[i].billingPerson.name' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonCompanyName OUT, 'items[i].billingPerson.companyName' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonStreet OUT, 'items[i].billingPerson.street' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonCity OUT, 'items[i].billingPerson.city' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonCountryCode OUT, 'items[i].billingPerson.countryCode' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonCountryName OUT, 'items[i].billingPerson.countryName' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonPostalCode OUT, 'items[i].billingPerson.postalCode' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonStateOrProvinceCode OUT, 'items[i].billingPerson.stateOrProvinceCode' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonStateOrProvinceName OUT, 'items[i].billingPerson.stateOrProvinceName' EXEC sp_OAMethod @jResp, 'StringOf', @billingPersonPhone OUT, 'items[i].billingPerson.phone' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonName OUT, 'items[i].shippingPerson.name' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonCompanyName OUT, 'items[i].shippingPerson.companyName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonStreet OUT, 'items[i].shippingPerson.street' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonCity OUT, 'items[i].shippingPerson.city' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonCountryCode OUT, 'items[i].shippingPerson.countryCode' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonCountryName OUT, 'items[i].shippingPerson.countryName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonPostalCode OUT, 'items[i].shippingPerson.postalCode' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonStateOrProvinceCode OUT, 'items[i].shippingPerson.stateOrProvinceCode' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonStateOrProvinceName OUT, 'items[i].shippingPerson.stateOrProvinceName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingPersonPhone OUT, 'items[i].shippingPerson.phone' EXEC sp_OAMethod @jResp, 'StringOf', @shippingOptionShippingCarrierName OUT, 'items[i].shippingOption.shippingCarrierName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingOptionShippingMethodName OUT, 'items[i].shippingOption.shippingMethodName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingOptionShippingRate OUT, 'items[i].shippingOption.shippingRate' EXEC sp_OAMethod @jResp, 'StringOf', @shippingOptionEstimatedTransitTime OUT, 'items[i].shippingOption.estimatedTransitTime' EXEC sp_OAMethod @jResp, 'BoolOf', @shippingOptionIsPickup OUT, 'items[i].shippingOption.isPickup' EXEC sp_OAMethod @jResp, 'StringOf', @handlingFeeName OUT, 'items[i].handlingFee.name' EXEC sp_OAMethod @jResp, 'IntOf', @handlingFeeValue OUT, 'items[i].handlingFee.value' EXEC sp_OAMethod @jResp, 'StringOf', @handlingFeeDescription OUT, 'items[i].handlingFee.description' EXEC sp_OAMethod @jResp, 'StringOf', @paymentModule OUT, 'items[i].paymentModule' EXEC sp_OAMethod @jResp, 'StringOf', @additionalInfoGoogle_customer_id OUT, 'items[i].additionalInfo.google_customer_id' EXEC sp_OAMethod @jResp, 'BoolOf', @acceptMarketing OUT, 'items[i].acceptMarketing' EXEC sp_OAMethod @jResp, 'StringOf', @refererId OUT, 'items[i].refererId' EXEC sp_OAMethod @jResp, 'BoolOf', @disableAllCustomerNotifications OUT, 'items[i].disableAllCustomerNotifications' EXEC sp_OAMethod @jResp, 'BoolOf', @externalFulfillment OUT, 'items[i].externalFulfillment' EXEC sp_OAMethod @jResp, 'BoolOf', @pricesIncludeTax OUT, 'items[i].pricesIncludeTax' SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].customDiscount' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].discountInfo' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'IntOf', @value OUT, 'items[i].discountInfo[j].value' EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'items[i].discountInfo[j].type' EXEC sp_OAMethod @jResp, 'StringOf', @base OUT, 'items[i].discountInfo[j].base' EXEC sp_OAMethod @jResp, 'IntOf', @orderTotal OUT, 'items[i].discountInfo[j].orderTotal' SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].items' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'IntOf', @id_int OUT, 'items[i].items[j].id' EXEC sp_OAMethod @jResp, 'IntOf', @productId OUT, 'items[i].items[j].productId' EXEC sp_OAMethod @jResp, 'IntOf', @categoryId OUT, 'items[i].items[j].categoryId' EXEC sp_OAMethod @jResp, 'IntOf', @price OUT, 'items[i].items[j].price' EXEC sp_OAMethod @jResp, 'IntOf', @productPrice OUT, 'items[i].items[j].productPrice' EXEC sp_OAMethod @jResp, 'StringOf', @sku OUT, 'items[i].items[j].sku' EXEC sp_OAMethod @jResp, 'IntOf', @quantity OUT, 'items[i].items[j].quantity' EXEC sp_OAMethod @jResp, 'StringOf', @shortDescription OUT, 'items[i].items[j].shortDescription' EXEC sp_OAMethod @jResp, 'StringOf', @tax OUT, 'items[i].items[j].tax' EXEC sp_OAMethod @jResp, 'IntOf', @shipping OUT, 'items[i].items[j].shipping' EXEC sp_OAMethod @jResp, 'IntOf', @quantityInStock OUT, 'items[i].items[j].quantityInStock' EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'items[i].items[j].name' EXEC sp_OAMethod @jResp, 'BoolOf', @isShippingRequired OUT, 'items[i].items[j].isShippingRequired' EXEC sp_OAMethod @jResp, 'IntOf', @weight OUT, 'items[i].items[j].weight' EXEC sp_OAMethod @jResp, 'BoolOf', @trackQuantity OUT, 'items[i].items[j].trackQuantity' EXEC sp_OAMethod @jResp, 'BoolOf', @fixedShippingRateOnly OUT, 'items[i].items[j].fixedShippingRateOnly' EXEC sp_OAMethod @jResp, 'StringOf', @imageUrl OUT, 'items[i].items[j].imageUrl' EXEC sp_OAMethod @jResp, 'StringOf', @smallThumbnailUrl OUT, 'items[i].items[j].smallThumbnailUrl' EXEC sp_OAMethod @jResp, 'StringOf', @hdThumbnailUrl OUT, 'items[i].items[j].hdThumbnailUrl' EXEC sp_OAMethod @jResp, 'IntOf', @fixedShippingRate OUT, 'items[i].items[j].fixedShippingRate' EXEC sp_OAMethod @jResp, 'BoolOf', @digital OUT, 'items[i].items[j].digital' EXEC sp_OAMethod @jResp, 'BoolOf', @couponApplied OUT, 'items[i].items[j].couponApplied' EXEC sp_OAMethod @jResp, 'IntOf', @dimensionsLength OUT, 'items[i].items[j].dimensions.length' EXEC sp_OAMethod @jResp, 'IntOf', @dimensionsWidth OUT, 'items[i].items[j].dimensions.width' EXEC sp_OAMethod @jResp, 'IntOf', @dimensionsHeight OUT, 'items[i].items[j].dimensions.height' EXEC sp_OAMethod @jResp, 'StringOf', @couponAmount OUT, 'items[i].items[j].couponAmount' EXEC sp_OAMethod @jResp, 'IntOf', @subscriptionId OUT, 'items[i].items[j].subscriptionId' EXEC sp_OAMethod @jResp, 'StringOf', @recurringChargeSettingsRecurringInterval OUT, 'items[i].items[j].recurringChargeSettings.recurringInterval' EXEC sp_OAMethod @jResp, 'IntOf', @recurringChargeSettingsRecurringIntervalCount OUT, 'items[i].items[j].recurringChargeSettings.recurringIntervalCount' SELECT @k = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'items[i].items[j].selectedOptions' WHILE @k < @count_k BEGIN EXEC sp_OASetProperty @jResp, 'K', @k EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'items[i].items[j].selectedOptions[k].name' EXEC sp_OAMethod @jResp, 'StringOf', @value_str OUT, 'items[i].items[j].selectedOptions[k].value' EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'items[i].items[j].selectedOptions[k].type' EXEC sp_OAMethod @jResp, 'ObjectOf', @json1 OUT, 'items[i].items[j].selectedOptions[k]' SELECT @i1 = 0 EXEC sp_OAMethod @json1, 'SizeOfArray', @count_i1 OUT, 'valuesArray' WHILE @i1 < @count_i1 BEGIN EXEC sp_OASetProperty @json1, 'I', @i1 EXEC sp_OAMethod @json1, 'StringOf', @strVal OUT, 'valuesArray[i]' SELECT @i1 = @i1 + 1 END EXEC @hr = sp_OADestroy @json1 EXEC sp_OAMethod @jResp, 'ObjectOf', @json1 OUT, 'items[i].items[j].selectedOptions[k]' SELECT @i1 = 0 EXEC sp_OAMethod @json1, 'SizeOfArray', @count_i1 OUT, 'selections' WHILE @i1 < @count_i1 BEGIN EXEC sp_OASetProperty @json1, 'I', @i1 EXEC sp_OAMethod @json1, 'StringOf', @selectionTitle OUT, 'selections[i].selectionTitle' EXEC sp_OAMethod @json1, 'IntOf', @selectionModifier OUT, 'selections[i].selectionModifier' EXEC sp_OAMethod @json1, 'StringOf', @selectionModifierType OUT, 'selections[i].selectionModifierType' SELECT @i1 = @i1 + 1 END EXEC @hr = sp_OADestroy @json1 SELECT @k = @k + 1 END SELECT @k = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'items[i].items[j].taxes' WHILE @k < @count_k BEGIN EXEC sp_OASetProperty @jResp, 'K', @k EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'items[i].items[j].taxes[k].name' EXEC sp_OAMethod @jResp, 'IntOf', @value OUT, 'items[i].items[j].taxes[k].value' EXEC sp_OAMethod @jResp, 'StringOf', @total_str OUT, 'items[i].items[j].taxes[k].total' EXEC sp_OAMethod @jResp, 'StringOf', @taxOnDiscountedSubtotal OUT, 'items[i].items[j].taxes[k].taxOnDiscountedSubtotal' EXEC sp_OAMethod @jResp, 'IntOf', @taxOnShipping OUT, 'items[i].items[j].taxes[k].taxOnShipping' EXEC sp_OAMethod @jResp, 'BoolOf', @includeInPrice OUT, 'items[i].items[j].taxes[k].includeInPrice' SELECT @k = @k + 1 END SELECT @k = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'items[i].items[j].discounts' WHILE @k < @count_k BEGIN EXEC sp_OASetProperty @jResp, 'K', @k EXEC sp_OAMethod @jResp, 'IntOf', @discountInfoValue OUT, 'items[i].items[j].discounts[k].discountInfo.value' EXEC sp_OAMethod @jResp, 'StringOf', @discountInfoType OUT, 'items[i].items[j].discounts[k].discountInfo.type' EXEC sp_OAMethod @jResp, 'StringOf', @discountInfoBase OUT, 'items[i].items[j].discounts[k].discountInfo.base' EXEC sp_OAMethod @jResp, 'IntOf', @discountInfoOrderTotal OUT, 'items[i].items[j].discounts[k].discountInfo.orderTotal' EXEC sp_OAMethod @jResp, 'StringOf', @total_str OUT, 'items[i].items[j].discounts[k].total' SELECT @k = @k + 1 END SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].refunds' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @date OUT, 'items[i].refunds[j].date' EXEC sp_OAMethod @jResp, 'StringOf', @source OUT, 'items[i].refunds[j].source' EXEC sp_OAMethod @jResp, 'StringOf', @reason OUT, 'items[i].refunds[j].reason' EXEC sp_OAMethod @jResp, 'StringOf', @amount OUT, 'items[i].refunds[j].amount' SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].predictedPackage' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'IntOf', @length OUT, 'items[i].predictedPackage[j].length' EXEC sp_OAMethod @jResp, 'IntOf', @width OUT, 'items[i].predictedPackage[j].width' EXEC sp_OAMethod @jResp, 'IntOf', @height OUT, 'items[i].predictedPackage[j].height' EXEC sp_OAMethod @jResp, 'StringOf', @weight_str OUT, 'items[i].predictedPackage[j].weight' EXEC sp_OAMethod @jResp, 'StringOf', @declaredValue OUT, 'items[i].predictedPackage[j].declaredValue' SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].shipments' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'items[i].shipments[j].id' EXEC sp_OAMethod @jResp, 'StringOf', @created OUT, 'items[i].shipments[j].created' EXEC sp_OAMethod @jResp, 'StringOf', @shipToName OUT, 'items[i].shipments[j].shipTo.name' EXEC sp_OAMethod @jResp, 'StringOf', @shipToCompanyName OUT, 'items[i].shipments[j].shipTo.companyName' EXEC sp_OAMethod @jResp, 'StringOf', @shipToStreet OUT, 'items[i].shipments[j].shipTo.street' EXEC sp_OAMethod @jResp, 'StringOf', @shipToCity OUT, 'items[i].shipments[j].shipTo.city' EXEC sp_OAMethod @jResp, 'StringOf', @shipToCountryCode OUT, 'items[i].shipments[j].shipTo.countryCode' EXEC sp_OAMethod @jResp, 'StringOf', @shipToCountryName OUT, 'items[i].shipments[j].shipTo.countryName' EXEC sp_OAMethod @jResp, 'StringOf', @shipToPostalCode OUT, 'items[i].shipments[j].shipTo.postalCode' EXEC sp_OAMethod @jResp, 'StringOf', @shipToStateOrProvinceCode OUT, 'items[i].shipments[j].shipTo.stateOrProvinceCode' EXEC sp_OAMethod @jResp, 'StringOf', @shipToStateOrProvinceName OUT, 'items[i].shipments[j].shipTo.stateOrProvinceName' EXEC sp_OAMethod @jResp, 'StringOf', @shipToPhone OUT, 'items[i].shipments[j].shipTo.phone' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromCompanyName OUT, 'items[i].shipments[j].shipFrom.companyName' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromStreet OUT, 'items[i].shipments[j].shipFrom.street' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromCity OUT, 'items[i].shipments[j].shipFrom.city' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromCountryCode OUT, 'items[i].shipments[j].shipFrom.countryCode' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromCountryName OUT, 'items[i].shipments[j].shipFrom.countryName' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromPostalCode OUT, 'items[i].shipments[j].shipFrom.postalCode' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromStateOrProvinceCode OUT, 'items[i].shipments[j].shipFrom.stateOrProvinceCode' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromStateOrProvinceName OUT, 'items[i].shipments[j].shipFrom.stateOrProvinceName' EXEC sp_OAMethod @jResp, 'StringOf', @shipFromPhone OUT, 'items[i].shipments[j].shipFrom.phone' EXEC sp_OAMethod @jResp, 'StringOf', @parcelWeight OUT, 'items[i].shipments[j].parcel.weight' EXEC sp_OAMethod @jResp, 'IntOf', @parcelWeightUnit OUT, 'items[i].shipments[j].parcel.weightUnit' EXEC sp_OAMethod @jResp, 'IntOf', @parcelWidth OUT, 'items[i].shipments[j].parcel.width' EXEC sp_OAMethod @jResp, 'IntOf', @parcelHeight OUT, 'items[i].shipments[j].parcel.height' EXEC sp_OAMethod @jResp, 'IntOf', @parcelLength OUT, 'items[i].shipments[j].parcel.length' EXEC sp_OAMethod @jResp, 'IntOf', @parcelDimensionUnit OUT, 'items[i].shipments[j].parcel.dimensionUnit' EXEC sp_OAMethod @jResp, 'IntOf', @shippingServiceCarrier OUT, 'items[i].shipments[j].shippingService.carrier' EXEC sp_OAMethod @jResp, 'IntOf', @shippingServiceCarrierName OUT, 'items[i].shipments[j].shippingService.carrierName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingServiceCarrierServiceName OUT, 'items[i].shipments[j].shippingService.carrierServiceName' EXEC sp_OAMethod @jResp, 'StringOf', @shippingServiceCarrierServiceCode OUT, 'items[i].shipments[j].shippingService.carrierServiceCode' EXEC sp_OAMethod @jResp, 'StringOf', @trackingTracking_number OUT, 'items[i].shipments[j].tracking.tracking_number' EXEC sp_OAMethod @jResp, 'StringOf', @trackingTracking_url OUT, 'items[i].shipments[j].tracking.tracking_url' EXEC sp_OAMethod @jResp, 'IntOf', @trackingEstimatedDays OUT, 'items[i].shipments[j].tracking.estimatedDays' EXEC sp_OAMethod @jResp, 'StringOf', @shippingLabelLabel_url OUT, 'items[i].shipments[j].shippingLabel.label_url' EXEC sp_OAMethod @jResp, 'StringOf', @shippingLabelCommercial_invoice_url OUT, 'items[i].shipments[j].shippingLabel.commercial_invoice_url' SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].taxesOnShipping' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'items[i].taxesOnShipping[j].name' EXEC sp_OAMethod @jResp, 'IntOf', @value OUT, 'items[i].taxesOnShipping[j].value' EXEC sp_OAMethod @jResp, 'StringOf', @total_str OUT, 'items[i].taxesOnShipping[j].total' SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'items[i].orderExtraFields' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'items[i].orderExtraFields[j].id' EXEC sp_OAMethod @jResp, 'StringOf', @value_str OUT, 'items[i].orderExtraFields[j].value' EXEC sp_OAMethod @jResp, 'StringOf', @customerInputType OUT, 'items[i].orderExtraFields[j].customerInputType' EXEC sp_OAMethod @jResp, 'StringOf', @title OUT, 'items[i].orderExtraFields[j].title' EXEC sp_OAMethod @jResp, 'StringOf', @orderDetailsDisplaySection OUT, 'items[i].orderExtraFields[j].orderDetailsDisplaySection' EXEC sp_OAMethod @jResp, 'StringOf', @orderBy OUT, 'items[i].orderExtraFields[j].orderBy' SELECT @j = @j + 1 END SELECT @i = @i + 1 END EXEC @hr = sp_OADestroy @http EXEC @hr = sp_OADestroy @jsonToken EXEC @hr = sp_OADestroy @params EXEC @hr = sp_OADestroy @sbResponseBody EXEC @hr = sp_OADestroy @jResp END GO |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.