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) MercadoLibre - Search Orders from a BuyerSearch for orders from a buyer. For more information, see https://developers.mercadolibre.com.ar/es_ar/gestiona-ventas#Como-filtrar
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls. -- CREATE PROCEDURE ChilkatSample AS BEGIN DECLARE @hr 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 -- First get our previously obtained OAuth2 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 DECLARE @success int EXEC sp_OAMethod @jsonToken, 'LoadFile', @success OUT, 'qa_data/tokens/mercadolibre.json' -- Implements the following CURL command: -- curl -X GET https://api.mercadolibre.com/orders/search?buyer=$BUYER_ID&access_token=$ACCESS_TOKEN -- Use the following online tool to generate HTTP code from a CURL command -- Convert a cURL Command to HTTP Source Code EXEC sp_OAMethod @jsonToken, 'StringOf', @sTmp0 OUT, 'access_token' EXEC sp_OAMethod @http, 'SetUrlVar', @success OUT, 'access_token', @sTmp0 -- Use an actual buyer ID here.. EXEC sp_OAMethod @http, 'SetUrlVar', @success OUT, 'buyer_id', '577815702' 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 @http, 'QuickGetSb', @success OUT, 'https://api.mercadolibre.com/orders/search?buyer={$buyer_id}&access_token={$access_token}', @sbResponseBody IF @success = 0 BEGIN EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT PRINT @sTmp0 PRINT 'Response Header:' EXEC sp_OAGetProperty @http, 'LastHeader', @sTmp0 OUT PRINT @sTmp0 PRINT '----' PRINT 'Response Body:' EXEC sp_OAMethod @sbResponseBody, 'GetAsString', @sTmp0 OUT PRINT @sTmp0 PRINT 'Failed.' EXEC @hr = sp_OADestroy @http EXEC @hr = sp_OADestroy @jsonToken EXEC @hr = sp_OADestroy @sbResponseBody RETURN END 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 @http, 'LastStatus', @respStatusCode OUT PRINT 'Response Status Code = ' + @respStatusCode IF @respStatusCode >= 400 BEGIN PRINT 'Response Header:' EXEC sp_OAGetProperty @http, 'LastHeader', @sTmp0 OUT PRINT @sTmp0 PRINT '----' PRINT 'Response Body:' EXEC sp_OAMethod @sbResponseBody, 'GetAsString', @sTmp0 OUT PRINT @sTmp0 PRINT 'Failed.' EXEC @hr = sp_OADestroy @http EXEC @hr = sp_OADestroy @jsonToken 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) -- { -- "query": "2032217210", -- "results": [ -- { -- "seller": { -- "phone": { -- "number": "11971427863", -- "extension": "", -- "area_code": null, -- "verified": false -- }, -- "alternative_phone": { -- "number": "", -- "extension": "", -- "area_code": "" -- }, -- "nickname": "VENDASDKMB", -- "last_name": "Cheracomo", -- "id": 239432672, -- "first_name": "Demétrio", -- "email": "dcherac.8m6k0q+2-ogiydgmrsge3tenby@mail.mercadolivre.com" -- }, -- "payments": [ -- { -- "reason": "Kit Com 03 Adesivo Spray 3m 75 Cola Silk Sublimação 300g", -- "status_code": null, -- "total_paid_amount": 129.95, -- "operation_type": "regular_payment", -- "transaction_amount": 129.95, -- "date_approved": "2019-05-22T03:51:07.000-04:00", -- "collector": { -- "id": 239432672 -- }, -- "coupon_id": null, -- "installments": 1, -- "authorization_code": "008877", -- "taxes_amount": 0, -- "id": 4792155710, -- "date_last_modified": "2019-05-22T03:51:07.000-04:00", -- "coupon_amount": 0, -- "available_actions": [ -- "refund" -- ], -- "shipping_cost": 0, -- "installment_amount": 129.95, -- "date_created": "2019-05-22T03:51:05.000-04:00", -- "activation_uri": null, -- "overpaid_amount": 0, -- "card_id": 203453778, -- "status_detail": "accredited", -- "issuer_id": "24", -- "payment_method_id": "master", -- "payment_type": "credit_card", -- "deferred_period": null, -- "atm_transfer_reference": { -- "transaction_id": "135292", -- "company_id": null -- }, -- "site_id": "MLB", -- "payer_id": 89660613, -- "marketplace_fee": 14.290000000000001, -- "order_id": 2032217210, -- "currency_id": "BRL", -- "status": "approved", -- "transaction_order_id": null -- } -- ], -- "fulfilled": true, -- "buying_mode": "buy_equals_pay", -- "taxes": { -- "amount": null, -- "currency_id": null -- }, -- "order_request": { -- "change": null, -- "return": null -- }, -- "expiration_date": "2019-06-19T03:51:07.000-04:00", -- "feedback": { -- "sale": null, -- "purchase": null -- }, -- "shipping": { -- "id": 27968238880 -- }, -- "date_closed": "2019-05-22T03:51:07.000-04:00", -- "id": 2032217210, -- "manufacturing_ending_date": null, -- "hidden_for_seller": false, -- "order_items": [ -- { -- "item": { -- "seller_custom_field": null, -- "condition": "new", -- "category_id": "MLB33383", -- "variation_id": null, -- "variation_attributes": [ -- ], -- "seller_sku": null, -- "warranty": "Garantia de 1 ano fabricante", -- "id": "MLB1054990648", -- "title": "Kit Com 03 Adesivo Spray 3m 75 Cola Silk Sublimação 300g" -- }, -- "quantity": 1, -- "differential_pricing_id": null, -- "sale_fee": 14.29, -- "listing_type_id": "gold_special", -- "base_currency_id": null, -- "unit_price": 129.95, -- "full_unit_price": 129.95, -- "base_exchange_rate": null, -- "currency_id": "BRL", -- "manufacturing_days": null -- } -- ], -- "date_last_updated": "2020-02-14T02:55:49.811Z", -- "last_updated": "2019-05-28T15:16:04.000-04:00", -- "comments": null, -- "pack_id": null, -- "coupon": { -- "amount": 0, -- "id": null -- }, -- "shipping_cost": 0, -- "date_created": "2019-05-22T03:51:05.000-04:00", -- "application_id": "7092", -- "pickup_id": null, -- "status_detail": null, -- "tags": [ -- "delivered", -- "paid" -- ], -- "buyer": { -- "billing_info": { -- "doc_number": "02183212950", -- "doc_type": "CPF" -- }, -- "phone": { -- "number": "99962663", -- "extension": "", -- "area_code": "41", -- "verified": false -- }, -- "alternative_phone": { -- "number": "30576339", -- "extension": "", -- "area_code": "41" -- }, -- "nickname": "S.VICTORHUGO", -- "last_name": "Schemberger", -- "id": 89660613, -- "first_name": "Victor Hugo", -- "email": "vschemb.y14cdz+2-ogiydgmrsge3tenbz@mail.mercadolivre.com" -- }, -- "total_amount": 129.95, -- "paid_amount": 129.95, -- "mediations": [ -- ], -- "currency_id": "BRL", -- "status": "paid" -- } -- ], -- "sort": { -- "id": "date_asc", -- "name": "Date ascending" -- }, -- "available_sorts": [ -- { -- "id": "date_desc", -- "name": "Date descending" -- } -- ], -- "filters": [ -- ], -- "paging": { -- "total": 1, -- "offset": 0, -- "limit": 50 -- }, -- "display": "complete" -- } -- 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 @date_closed int -- Use "Chilkat_9_5_0.DtObj" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.DtObj', @date_closed OUT DECLARE @date_last_updated int -- Use "Chilkat_9_5_0.DtObj" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.DtObj', @date_last_updated OUT DECLARE @date_created int -- Use "Chilkat_9_5_0.DtObj" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.DtObj', @date_created OUT DECLARE @date_approved int -- Use "Chilkat_9_5_0.DtObj" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.DtObj', @date_approved OUT DECLARE @date_last_modified int -- Use "Chilkat_9_5_0.DtObj" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.DtObj', @date_last_modified OUT DECLARE @sellerPhoneNumber nvarchar(4000) DECLARE @sellerPhoneExtension nvarchar(4000) DECLARE @sellerPhoneArea_code nvarchar(4000) DECLARE @sellerPhoneVerified int DECLARE @sellerAlternative_phoneNumber nvarchar(4000) DECLARE @sellerAlternative_phoneExtension nvarchar(4000) DECLARE @sellerAlternative_phoneArea_code nvarchar(4000) DECLARE @sellerNickname nvarchar(4000) DECLARE @sellerLast_name nvarchar(4000) DECLARE @sellerId int DECLARE @sellerFirst_name nvarchar(4000) DECLARE @sellerEmail nvarchar(4000) DECLARE @fulfilled int DECLARE @buying_mode nvarchar(4000) DECLARE @taxesAmount nvarchar(4000) DECLARE @taxesCurrency_id nvarchar(4000) DECLARE @order_requestChange nvarchar(4000) DECLARE @order_requestReturn nvarchar(4000) DECLARE @expiration_date nvarchar(4000) DECLARE @feedbackSale nvarchar(4000) DECLARE @feedbackPurchase nvarchar(4000) DECLARE @shippingId int DECLARE @id int DECLARE @manufacturing_ending_date nvarchar(4000) DECLARE @hidden_for_seller int DECLARE @last_updated nvarchar(4000) DECLARE @comments nvarchar(4000) DECLARE @pack_id nvarchar(4000) DECLARE @couponAmount int DECLARE @couponId nvarchar(4000) DECLARE @shipping_cost int DECLARE @application_id nvarchar(4000) DECLARE @pickup_id nvarchar(4000) DECLARE @status_detail nvarchar(4000) DECLARE @buyerBilling_infoDoc_number nvarchar(4000) DECLARE @buyerBilling_infoDoc_type nvarchar(4000) DECLARE @buyerPhoneNumber nvarchar(4000) DECLARE @buyerPhoneExtension nvarchar(4000) DECLARE @buyerPhoneArea_code nvarchar(4000) DECLARE @buyerPhoneVerified int DECLARE @buyerAlternative_phoneNumber nvarchar(4000) DECLARE @buyerAlternative_phoneExtension nvarchar(4000) DECLARE @buyerAlternative_phoneArea_code nvarchar(4000) DECLARE @buyerNickname nvarchar(4000) DECLARE @buyerLast_name nvarchar(4000) DECLARE @buyerId int DECLARE @buyerFirst_name nvarchar(4000) DECLARE @buyerEmail nvarchar(4000) DECLARE @total_amount nvarchar(4000) DECLARE @paid_amount nvarchar(4000) DECLARE @currency_id nvarchar(4000) DECLARE @status nvarchar(4000) DECLARE @j int DECLARE @count_j int DECLARE @reason nvarchar(4000) DECLARE @status_code nvarchar(4000) DECLARE @total_paid_amount nvarchar(4000) DECLARE @operation_type nvarchar(4000) DECLARE @transaction_amount nvarchar(4000) DECLARE @collectorId int DECLARE @coupon_id nvarchar(4000) DECLARE @installments int DECLARE @authorization_code nvarchar(4000) DECLARE @taxes_amount int DECLARE @coupon_amount int DECLARE @installment_amount nvarchar(4000) DECLARE @activation_uri nvarchar(4000) DECLARE @overpaid_amount int DECLARE @card_id int DECLARE @issuer_id nvarchar(4000) DECLARE @payment_method_id nvarchar(4000) DECLARE @payment_type nvarchar(4000) DECLARE @deferred_period nvarchar(4000) DECLARE @atm_transfer_referenceTransaction_id nvarchar(4000) DECLARE @atm_transfer_referenceCompany_id nvarchar(4000) DECLARE @site_id nvarchar(4000) DECLARE @payer_id int DECLARE @marketplace_fee nvarchar(4000) DECLARE @order_id int DECLARE @transaction_order_id nvarchar(4000) DECLARE @k int DECLARE @count_k int DECLARE @strVal nvarchar(4000) DECLARE @itemSeller_custom_field nvarchar(4000) DECLARE @itemCondition nvarchar(4000) DECLARE @itemCategory_id nvarchar(4000) DECLARE @itemVariation_id nvarchar(4000) DECLARE @itemSeller_sku nvarchar(4000) DECLARE @itemWarranty nvarchar(4000) DECLARE @itemId nvarchar(4000) DECLARE @itemTitle nvarchar(4000) DECLARE @quantity int DECLARE @differential_pricing_id nvarchar(4000) DECLARE @sale_fee nvarchar(4000) DECLARE @listing_type_id nvarchar(4000) DECLARE @base_currency_id nvarchar(4000) DECLARE @unit_price nvarchar(4000) DECLARE @full_unit_price nvarchar(4000) DECLARE @base_exchange_rate nvarchar(4000) DECLARE @manufacturing_days nvarchar(4000) DECLARE @id_str nvarchar(4000) DECLARE @name nvarchar(4000) DECLARE @query nvarchar(4000) EXEC sp_OAMethod @jResp, 'StringOf', @query OUT, 'query' DECLARE @sortId nvarchar(4000) EXEC sp_OAMethod @jResp, 'StringOf', @sortId OUT, 'sort.id' DECLARE @sortName nvarchar(4000) EXEC sp_OAMethod @jResp, 'StringOf', @sortName OUT, 'sort.name' DECLARE @pagingTotal int EXEC sp_OAMethod @jResp, 'IntOf', @pagingTotal OUT, 'paging.total' DECLARE @pagingOffset int EXEC sp_OAMethod @jResp, 'IntOf', @pagingOffset OUT, 'paging.offset' DECLARE @pagingLimit int EXEC sp_OAMethod @jResp, 'IntOf', @pagingLimit OUT, 'paging.limit' DECLARE @display nvarchar(4000) EXEC sp_OAMethod @jResp, 'StringOf', @display OUT, 'display' DECLARE @i int SELECT @i = 0 DECLARE @count_i int EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'results' WHILE @i < @count_i BEGIN EXEC sp_OASetProperty @jResp, 'I', @i EXEC sp_OAMethod @jResp, 'StringOf', @sellerPhoneNumber OUT, 'results[i].seller.phone.number' EXEC sp_OAMethod @jResp, 'StringOf', @sellerPhoneExtension OUT, 'results[i].seller.phone.extension' EXEC sp_OAMethod @jResp, 'StringOf', @sellerPhoneArea_code OUT, 'results[i].seller.phone.area_code' EXEC sp_OAMethod @jResp, 'BoolOf', @sellerPhoneVerified OUT, 'results[i].seller.phone.verified' EXEC sp_OAMethod @jResp, 'StringOf', @sellerAlternative_phoneNumber OUT, 'results[i].seller.alternative_phone.number' EXEC sp_OAMethod @jResp, 'StringOf', @sellerAlternative_phoneExtension OUT, 'results[i].seller.alternative_phone.extension' EXEC sp_OAMethod @jResp, 'StringOf', @sellerAlternative_phoneArea_code OUT, 'results[i].seller.alternative_phone.area_code' EXEC sp_OAMethod @jResp, 'StringOf', @sellerNickname OUT, 'results[i].seller.nickname' EXEC sp_OAMethod @jResp, 'StringOf', @sellerLast_name OUT, 'results[i].seller.last_name' EXEC sp_OAMethod @jResp, 'IntOf', @sellerId OUT, 'results[i].seller.id' EXEC sp_OAMethod @jResp, 'StringOf', @sellerFirst_name OUT, 'results[i].seller.first_name' EXEC sp_OAMethod @jResp, 'StringOf', @sellerEmail OUT, 'results[i].seller.email' EXEC sp_OAMethod @jResp, 'BoolOf', @fulfilled OUT, 'results[i].fulfilled' EXEC sp_OAMethod @jResp, 'StringOf', @buying_mode OUT, 'results[i].buying_mode' EXEC sp_OAMethod @jResp, 'StringOf', @taxesAmount OUT, 'results[i].taxes.amount' EXEC sp_OAMethod @jResp, 'StringOf', @taxesCurrency_id OUT, 'results[i].taxes.currency_id' EXEC sp_OAMethod @jResp, 'StringOf', @order_requestChange OUT, 'results[i].order_request.change' EXEC sp_OAMethod @jResp, 'StringOf', @order_requestReturn OUT, 'results[i].order_request.return' EXEC sp_OAMethod @jResp, 'StringOf', @expiration_date OUT, 'results[i].expiration_date' EXEC sp_OAMethod @jResp, 'StringOf', @feedbackSale OUT, 'results[i].feedback.sale' EXEC sp_OAMethod @jResp, 'StringOf', @feedbackPurchase OUT, 'results[i].feedback.purchase' EXEC sp_OAMethod @jResp, 'IntOf', @shippingId OUT, 'results[i].shipping.id' EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'results[i].date_closed', 0, @date_closed EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'results[i].id' EXEC sp_OAMethod @jResp, 'StringOf', @manufacturing_ending_date OUT, 'results[i].manufacturing_ending_date' EXEC sp_OAMethod @jResp, 'BoolOf', @hidden_for_seller OUT, 'results[i].hidden_for_seller' EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'results[i].date_last_updated', 0, @date_last_updated EXEC sp_OAMethod @jResp, 'StringOf', @last_updated OUT, 'results[i].last_updated' EXEC sp_OAMethod @jResp, 'StringOf', @comments OUT, 'results[i].comments' EXEC sp_OAMethod @jResp, 'StringOf', @pack_id OUT, 'results[i].pack_id' EXEC sp_OAMethod @jResp, 'IntOf', @couponAmount OUT, 'results[i].coupon.amount' EXEC sp_OAMethod @jResp, 'StringOf', @couponId OUT, 'results[i].coupon.id' EXEC sp_OAMethod @jResp, 'IntOf', @shipping_cost OUT, 'results[i].shipping_cost' EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'results[i].date_created', 0, @date_created EXEC sp_OAMethod @jResp, 'StringOf', @application_id OUT, 'results[i].application_id' EXEC sp_OAMethod @jResp, 'StringOf', @pickup_id OUT, 'results[i].pickup_id' EXEC sp_OAMethod @jResp, 'StringOf', @status_detail OUT, 'results[i].status_detail' EXEC sp_OAMethod @jResp, 'StringOf', @buyerBilling_infoDoc_number OUT, 'results[i].buyer.billing_info.doc_number' EXEC sp_OAMethod @jResp, 'StringOf', @buyerBilling_infoDoc_type OUT, 'results[i].buyer.billing_info.doc_type' EXEC sp_OAMethod @jResp, 'StringOf', @buyerPhoneNumber OUT, 'results[i].buyer.phone.number' EXEC sp_OAMethod @jResp, 'StringOf', @buyerPhoneExtension OUT, 'results[i].buyer.phone.extension' EXEC sp_OAMethod @jResp, 'StringOf', @buyerPhoneArea_code OUT, 'results[i].buyer.phone.area_code' EXEC sp_OAMethod @jResp, 'BoolOf', @buyerPhoneVerified OUT, 'results[i].buyer.phone.verified' EXEC sp_OAMethod @jResp, 'StringOf', @buyerAlternative_phoneNumber OUT, 'results[i].buyer.alternative_phone.number' EXEC sp_OAMethod @jResp, 'StringOf', @buyerAlternative_phoneExtension OUT, 'results[i].buyer.alternative_phone.extension' EXEC sp_OAMethod @jResp, 'StringOf', @buyerAlternative_phoneArea_code OUT, 'results[i].buyer.alternative_phone.area_code' EXEC sp_OAMethod @jResp, 'StringOf', @buyerNickname OUT, 'results[i].buyer.nickname' EXEC sp_OAMethod @jResp, 'StringOf', @buyerLast_name OUT, 'results[i].buyer.last_name' EXEC sp_OAMethod @jResp, 'IntOf', @buyerId OUT, 'results[i].buyer.id' EXEC sp_OAMethod @jResp, 'StringOf', @buyerFirst_name OUT, 'results[i].buyer.first_name' EXEC sp_OAMethod @jResp, 'StringOf', @buyerEmail OUT, 'results[i].buyer.email' EXEC sp_OAMethod @jResp, 'StringOf', @total_amount OUT, 'results[i].total_amount' EXEC sp_OAMethod @jResp, 'StringOf', @paid_amount OUT, 'results[i].paid_amount' EXEC sp_OAMethod @jResp, 'StringOf', @currency_id OUT, 'results[i].currency_id' EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'results[i].status' SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].payments' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @reason OUT, 'results[i].payments[j].reason' EXEC sp_OAMethod @jResp, 'StringOf', @status_code OUT, 'results[i].payments[j].status_code' EXEC sp_OAMethod @jResp, 'StringOf', @total_paid_amount OUT, 'results[i].payments[j].total_paid_amount' EXEC sp_OAMethod @jResp, 'StringOf', @operation_type OUT, 'results[i].payments[j].operation_type' EXEC sp_OAMethod @jResp, 'StringOf', @transaction_amount OUT, 'results[i].payments[j].transaction_amount' EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'results[i].payments[j].date_approved', 0, @date_approved EXEC sp_OAMethod @jResp, 'IntOf', @collectorId OUT, 'results[i].payments[j].collector.id' EXEC sp_OAMethod @jResp, 'StringOf', @coupon_id OUT, 'results[i].payments[j].coupon_id' EXEC sp_OAMethod @jResp, 'IntOf', @installments OUT, 'results[i].payments[j].installments' EXEC sp_OAMethod @jResp, 'StringOf', @authorization_code OUT, 'results[i].payments[j].authorization_code' EXEC sp_OAMethod @jResp, 'IntOf', @taxes_amount OUT, 'results[i].payments[j].taxes_amount' EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'results[i].payments[j].id' EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'results[i].payments[j].date_last_modified', 0, @date_last_modified EXEC sp_OAMethod @jResp, 'IntOf', @coupon_amount OUT, 'results[i].payments[j].coupon_amount' EXEC sp_OAMethod @jResp, 'IntOf', @shipping_cost OUT, 'results[i].payments[j].shipping_cost' EXEC sp_OAMethod @jResp, 'StringOf', @installment_amount OUT, 'results[i].payments[j].installment_amount' EXEC sp_OAMethod @jResp, 'DtOf', @success OUT, 'results[i].payments[j].date_created', 0, @date_created EXEC sp_OAMethod @jResp, 'StringOf', @activation_uri OUT, 'results[i].payments[j].activation_uri' EXEC sp_OAMethod @jResp, 'IntOf', @overpaid_amount OUT, 'results[i].payments[j].overpaid_amount' EXEC sp_OAMethod @jResp, 'IntOf', @card_id OUT, 'results[i].payments[j].card_id' EXEC sp_OAMethod @jResp, 'StringOf', @status_detail OUT, 'results[i].payments[j].status_detail' EXEC sp_OAMethod @jResp, 'StringOf', @issuer_id OUT, 'results[i].payments[j].issuer_id' EXEC sp_OAMethod @jResp, 'StringOf', @payment_method_id OUT, 'results[i].payments[j].payment_method_id' EXEC sp_OAMethod @jResp, 'StringOf', @payment_type OUT, 'results[i].payments[j].payment_type' EXEC sp_OAMethod @jResp, 'StringOf', @deferred_period OUT, 'results[i].payments[j].deferred_period' EXEC sp_OAMethod @jResp, 'StringOf', @atm_transfer_referenceTransaction_id OUT, 'results[i].payments[j].atm_transfer_reference.transaction_id' EXEC sp_OAMethod @jResp, 'StringOf', @atm_transfer_referenceCompany_id OUT, 'results[i].payments[j].atm_transfer_reference.company_id' EXEC sp_OAMethod @jResp, 'StringOf', @site_id OUT, 'results[i].payments[j].site_id' EXEC sp_OAMethod @jResp, 'IntOf', @payer_id OUT, 'results[i].payments[j].payer_id' EXEC sp_OAMethod @jResp, 'StringOf', @marketplace_fee OUT, 'results[i].payments[j].marketplace_fee' EXEC sp_OAMethod @jResp, 'IntOf', @order_id OUT, 'results[i].payments[j].order_id' EXEC sp_OAMethod @jResp, 'StringOf', @currency_id OUT, 'results[i].payments[j].currency_id' EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'results[i].payments[j].status' EXEC sp_OAMethod @jResp, 'StringOf', @transaction_order_id OUT, 'results[i].payments[j].transaction_order_id' SELECT @k = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'results[i].payments[j].available_actions' WHILE @k < @count_k BEGIN EXEC sp_OASetProperty @jResp, 'K', @k EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'results[i].payments[j].available_actions[k]' SELECT @k = @k + 1 END SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].order_items' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @itemSeller_custom_field OUT, 'results[i].order_items[j].item.seller_custom_field' EXEC sp_OAMethod @jResp, 'StringOf', @itemCondition OUT, 'results[i].order_items[j].item.condition' EXEC sp_OAMethod @jResp, 'StringOf', @itemCategory_id OUT, 'results[i].order_items[j].item.category_id' EXEC sp_OAMethod @jResp, 'StringOf', @itemVariation_id OUT, 'results[i].order_items[j].item.variation_id' EXEC sp_OAMethod @jResp, 'StringOf', @itemSeller_sku OUT, 'results[i].order_items[j].item.seller_sku' EXEC sp_OAMethod @jResp, 'StringOf', @itemWarranty OUT, 'results[i].order_items[j].item.warranty' EXEC sp_OAMethod @jResp, 'StringOf', @itemId OUT, 'results[i].order_items[j].item.id' EXEC sp_OAMethod @jResp, 'StringOf', @itemTitle OUT, 'results[i].order_items[j].item.title' EXEC sp_OAMethod @jResp, 'IntOf', @quantity OUT, 'results[i].order_items[j].quantity' EXEC sp_OAMethod @jResp, 'StringOf', @differential_pricing_id OUT, 'results[i].order_items[j].differential_pricing_id' EXEC sp_OAMethod @jResp, 'StringOf', @sale_fee OUT, 'results[i].order_items[j].sale_fee' EXEC sp_OAMethod @jResp, 'StringOf', @listing_type_id OUT, 'results[i].order_items[j].listing_type_id' EXEC sp_OAMethod @jResp, 'StringOf', @base_currency_id OUT, 'results[i].order_items[j].base_currency_id' EXEC sp_OAMethod @jResp, 'StringOf', @unit_price OUT, 'results[i].order_items[j].unit_price' EXEC sp_OAMethod @jResp, 'StringOf', @full_unit_price OUT, 'results[i].order_items[j].full_unit_price' EXEC sp_OAMethod @jResp, 'StringOf', @base_exchange_rate OUT, 'results[i].order_items[j].base_exchange_rate' EXEC sp_OAMethod @jResp, 'StringOf', @currency_id OUT, 'results[i].order_items[j].currency_id' EXEC sp_OAMethod @jResp, 'StringOf', @manufacturing_days OUT, 'results[i].order_items[j].manufacturing_days' SELECT @k = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'results[i].order_items[j].item.variation_attributes' WHILE @k < @count_k BEGIN EXEC sp_OASetProperty @jResp, 'K', @k SELECT @k = @k + 1 END SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].tags' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'results[i].tags[j]' SELECT @j = @j + 1 END SELECT @j = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].mediations' WHILE @j < @count_j BEGIN EXEC sp_OASetProperty @jResp, 'J', @j SELECT @j = @j + 1 END SELECT @i = @i + 1 END SELECT @i = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'available_sorts' WHILE @i < @count_i BEGIN EXEC sp_OASetProperty @jResp, 'I', @i EXEC sp_OAMethod @jResp, 'StringOf', @id_str OUT, 'available_sorts[i].id' EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'available_sorts[i].name' SELECT @i = @i + 1 END SELECT @i = 0 EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'filters' WHILE @i < @count_i BEGIN EXEC sp_OASetProperty @jResp, 'I', @i SELECT @i = @i + 1 END EXEC @hr = sp_OADestroy @http EXEC @hr = sp_OADestroy @jsonToken EXEC @hr = sp_OADestroy @sbResponseBody EXEC @hr = sp_OADestroy @jResp EXEC @hr = sp_OADestroy @date_closed EXEC @hr = sp_OADestroy @date_last_updated EXEC @hr = sp_OADestroy @date_created EXEC @hr = sp_OADestroy @date_approved EXEC @hr = sp_OADestroy @date_last_modified END GO |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.