Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Swift 3,4,5... Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(Swift 3,4,5...) Ecwid - Search Orders

See more Ecwid Examples

Search 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

Chilkat Downloads for the Swift Programming Language

MAC OS X (Cocoa) Objective-C/Swift Libs

iOS Objective-C/Swift Libs

func chilkatTest() {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    let http = CkoHttp()!
    var success: Bool

    // 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
    let jsonToken = CkoJsonObject()!
    jsonToken.loadFile("qa_data/tokens/ecwid.json")

    http.setRequestHeader("Accept", value: "application/json")

    let params = CkoJsonObject()!
    params.updateInt("limit", value: 100)
    params.update("email", value: "joe@example.com")
    params.update("token", value: jsonToken.string(of: "access_token"))

    var resp: CkoHttpResponse? = http.quickRequestParams("GET", url: "https://app.ecwid.com/api/v3/storeId/orders", json: params)
    if http.lastMethodSuccess == false {
        print("\(http.lastErrorText!)")
        return
    }

    let sbResponseBody = CkoStringBuilder()!
    resp!.getBodySb(sbResponseBody)
    let jResp = CkoJsonObject()!
    jResp.loadSb(sbResponseBody)
    jResp.emitCompact = false

    print("Response Body:")
    print("\(jResp.emit()!)")

    var respStatusCode: Int = resp!.statusCode.intValue
    resp = nil

    print("Response Status Code = \(respStatusCode)")
    if respStatusCode != 200 {
        print("Failed.")
        return
    }

    // 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

    var id: String?
    var subtotal: String?
    var total_str: String?
    var giftCardRedemption: String?
    var totalBeforeGiftCardRedemption: String?
    var giftCardDoubleSpending: Bool
    var usdTotal: String?
    var tax: String?
    var paymentMethod: String?
    var paymentStatus: String?
    var fulfillmentStatus: String?
    var vendorOrderNumber: String?
    var orderNumber: Int
    var refererUrl: String?
    var globalReferer: String?
    var createDate: String?
    var updateDate: String?
    var createTimestamp: Int
    var updateTimestamp: Int
    var hidden: Bool
    var orderComments: String?
    var privateAdminNotes: String?
    var email: String?
    var ipAddress: String?
    var customerId: Int
    var customerGroupId: Int
    var customerGroup: String?
    var customerTaxExempt: Bool
    var customerTaxId: String?
    var customerTaxIdValid: Bool
    var reversedTaxApplied: Bool
    var discount: Int
    var couponDiscount: Int
    var volumeDiscount: Int
    var membershipBasedDiscount: Int
    var totalAndMembershipBasedDiscount: Int
    var discountCouponId: Int
    var discountCouponName: String?
    var discountCouponCode: String?
    var discountCouponDiscountType: String?
    var discountCouponStatus: String?
    var discountCouponDiscount: Int
    var discountCouponLaunchDate: String?
    var discountCouponUsesLimit: String?
    var discountCouponApplicationLimit: String?
    var discountCouponCreationDate: String?
    var discountCouponUpdateDate: String?
    var discountCouponOrderCount: Int
    var refundedAmount: String?
    var billingPersonName: String?
    var billingPersonCompanyName: String?
    var billingPersonStreet: String?
    var billingPersonCity: String?
    var billingPersonCountryCode: String?
    var billingPersonCountryName: String?
    var billingPersonPostalCode: String?
    var billingPersonStateOrProvinceCode: String?
    var billingPersonStateOrProvinceName: String?
    var billingPersonPhone: String?
    var shippingPersonName: String?
    var shippingPersonCompanyName: String?
    var shippingPersonStreet: String?
    var shippingPersonCity: String?
    var shippingPersonCountryCode: String?
    var shippingPersonCountryName: String?
    var shippingPersonPostalCode: String?
    var shippingPersonStateOrProvinceCode: String?
    var shippingPersonStateOrProvinceName: String?
    var shippingPersonPhone: String?
    var shippingOptionShippingCarrierName: String?
    var shippingOptionShippingMethodName: String?
    var shippingOptionShippingRate: String?
    var shippingOptionEstimatedTransitTime: String?
    var shippingOptionIsPickup: Bool
    var handlingFeeName: String?
    var handlingFeeValue: Int
    var handlingFeeDescription: String?
    var paymentModule: String?
    var additionalInfoGoogle_customer_id: String?
    var acceptMarketing: Bool
    var refererId: String?
    var disableAllCustomerNotifications: Bool
    var externalFulfillment: Bool
    var pricesIncludeTax: Bool
    var j: Int
    var count_j: Int
    var value: Int
    var v_type: String?
    var base: String?
    var orderTotal: Int
    var id_int: Int
    var productId: Int
    var categoryId: Int
    var price: Int
    var productPrice: Int
    var sku: String?
    var quantity: Int
    var shortDescription: String?
    var shipping: Int
    var quantityInStock: Int
    var name: String?
    var isShippingRequired: Bool
    var weight: Int
    var trackQuantity: Bool
    var fixedShippingRateOnly: Bool
    var imageUrl: String?
    var smallThumbnailUrl: String?
    var hdThumbnailUrl: String?
    var fixedShippingRate: Int
    var digital: Bool
    var couponApplied: Bool
    var dimensionsLength: Int
    var dimensionsWidth: Int
    var dimensionsHeight: Int
    var couponAmount: String?
    var subscriptionId: Int
    var recurringChargeSettingsRecurringInterval: String?
    var recurringChargeSettingsRecurringIntervalCount: Int
    var k: Int
    var count_k: Int
    var value_str: String?
    var json1: CkoJsonObject?
    var i1: Int
    var count_i1: Int
    var strVal: String?
    var selectionTitle: String?
    var selectionModifier: Int
    var selectionModifierType: String?
    var taxOnDiscountedSubtotal: String?
    var taxOnShipping: Int
    var includeInPrice: Bool
    var discountInfoValue: Int
    var discountInfoType: String?
    var discountInfoBase: String?
    var discountInfoOrderTotal: Int
    var date: String?
    var source: String?
    var reason: String?
    var amount: String?
    var length: Int
    var width: Int
    var height: Int
    var weight_str: String?
    var declaredValue: String?
    var created: String?
    var shipToName: String?
    var shipToCompanyName: String?
    var shipToStreet: String?
    var shipToCity: String?
    var shipToCountryCode: String?
    var shipToCountryName: String?
    var shipToPostalCode: String?
    var shipToStateOrProvinceCode: String?
    var shipToStateOrProvinceName: String?
    var shipToPhone: String?
    var shipFromCompanyName: String?
    var shipFromStreet: String?
    var shipFromCity: String?
    var shipFromCountryCode: String?
    var shipFromCountryName: String?
    var shipFromPostalCode: String?
    var shipFromStateOrProvinceCode: String?
    var shipFromStateOrProvinceName: String?
    var shipFromPhone: String?
    var parcelWeight: String?
    var parcelWeightUnit: Int
    var parcelWidth: Int
    var parcelHeight: Int
    var parcelLength: Int
    var parcelDimensionUnit: Int
    var shippingServiceCarrier: Int
    var shippingServiceCarrierName: Int
    var shippingServiceCarrierServiceName: String?
    var shippingServiceCarrierServiceCode: String?
    var trackingTracking_number: String?
    var trackingTracking_url: String?
    var trackingEstimatedDays: Int
    var shippingLabelLabel_url: String?
    var shippingLabelCommercial_invoice_url: String?
    var customerInputType: String?
    var title: String?
    var orderDetailsDisplaySection: String?
    var orderBy: String?

    var total: Int = jResp.int(of: "total").intValue
    var count: Int = jResp.int(of: "count").intValue
    var offset: Int = jResp.int(of: "offset").intValue
    var limit: Int = jResp.int(of: "limit").intValue
    var i: Int = 0
    var count_i: Int = jResp.size(ofArray: "items").intValue
    while i < count_i {
        jResp.i = i
        id = jResp.string(of: "items[i].id")
        subtotal = jResp.string(of: "items[i].subtotal")
        total_str = jResp.string(of: "items[i].total")
        giftCardRedemption = jResp.string(of: "items[i].giftCardRedemption")
        totalBeforeGiftCardRedemption = jResp.string(of: "items[i].totalBeforeGiftCardRedemption")
        giftCardDoubleSpending = jResp.bool(of: "items[i].giftCardDoubleSpending")
        usdTotal = jResp.string(of: "items[i].usdTotal")
        tax = jResp.string(of: "items[i].tax")
        paymentMethod = jResp.string(of: "items[i].paymentMethod")
        paymentStatus = jResp.string(of: "items[i].paymentStatus")
        fulfillmentStatus = jResp.string(of: "items[i].fulfillmentStatus")
        vendorOrderNumber = jResp.string(of: "items[i].vendorOrderNumber")
        orderNumber = jResp.int(of: "items[i].orderNumber").intValue
        refererUrl = jResp.string(of: "items[i].refererUrl")
        globalReferer = jResp.string(of: "items[i].globalReferer")
        createDate = jResp.string(of: "items[i].createDate")
        updateDate = jResp.string(of: "items[i].updateDate")
        createTimestamp = jResp.int(of: "items[i].createTimestamp").intValue
        updateTimestamp = jResp.int(of: "items[i].updateTimestamp").intValue
        hidden = jResp.bool(of: "items[i].hidden")
        orderComments = jResp.string(of: "items[i].orderComments")
        privateAdminNotes = jResp.string(of: "items[i].privateAdminNotes")
        email = jResp.string(of: "items[i].email")
        ipAddress = jResp.string(of: "items[i].ipAddress")
        customerId = jResp.int(of: "items[i].customerId").intValue
        customerGroupId = jResp.int(of: "items[i].customerGroupId").intValue
        customerGroup = jResp.string(of: "items[i].customerGroup")
        customerTaxExempt = jResp.bool(of: "items[i].customerTaxExempt")
        customerTaxId = jResp.string(of: "items[i].customerTaxId")
        customerTaxIdValid = jResp.bool(of: "items[i].customerTaxIdValid")
        reversedTaxApplied = jResp.bool(of: "items[i].reversedTaxApplied")
        discount = jResp.int(of: "items[i].discount").intValue
        couponDiscount = jResp.int(of: "items[i].couponDiscount").intValue
        volumeDiscount = jResp.int(of: "items[i].volumeDiscount").intValue
        membershipBasedDiscount = jResp.int(of: "items[i].membershipBasedDiscount").intValue
        totalAndMembershipBasedDiscount = jResp.int(of: "items[i].totalAndMembershipBasedDiscount").intValue
        discountCouponId = jResp.int(of: "items[i].discountCoupon.id").intValue
        discountCouponName = jResp.string(of: "items[i].discountCoupon.name")
        discountCouponCode = jResp.string(of: "items[i].discountCoupon.code")
        discountCouponDiscountType = jResp.string(of: "items[i].discountCoupon.discountType")
        discountCouponStatus = jResp.string(of: "items[i].discountCoupon.status")
        discountCouponDiscount = jResp.int(of: "items[i].discountCoupon.discount").intValue
        discountCouponLaunchDate = jResp.string(of: "items[i].discountCoupon.launchDate")
        discountCouponUsesLimit = jResp.string(of: "items[i].discountCoupon.usesLimit")
        discountCouponApplicationLimit = jResp.string(of: "items[i].discountCoupon.applicationLimit")
        discountCouponCreationDate = jResp.string(of: "items[i].discountCoupon.creationDate")
        discountCouponUpdateDate = jResp.string(of: "items[i].discountCoupon.updateDate")
        discountCouponOrderCount = jResp.int(of: "items[i].discountCoupon.orderCount").intValue
        refundedAmount = jResp.string(of: "items[i].refundedAmount")
        billingPersonName = jResp.string(of: "items[i].billingPerson.name")
        billingPersonCompanyName = jResp.string(of: "items[i].billingPerson.companyName")
        billingPersonStreet = jResp.string(of: "items[i].billingPerson.street")
        billingPersonCity = jResp.string(of: "items[i].billingPerson.city")
        billingPersonCountryCode = jResp.string(of: "items[i].billingPerson.countryCode")
        billingPersonCountryName = jResp.string(of: "items[i].billingPerson.countryName")
        billingPersonPostalCode = jResp.string(of: "items[i].billingPerson.postalCode")
        billingPersonStateOrProvinceCode = jResp.string(of: "items[i].billingPerson.stateOrProvinceCode")
        billingPersonStateOrProvinceName = jResp.string(of: "items[i].billingPerson.stateOrProvinceName")
        billingPersonPhone = jResp.string(of: "items[i].billingPerson.phone")
        shippingPersonName = jResp.string(of: "items[i].shippingPerson.name")
        shippingPersonCompanyName = jResp.string(of: "items[i].shippingPerson.companyName")
        shippingPersonStreet = jResp.string(of: "items[i].shippingPerson.street")
        shippingPersonCity = jResp.string(of: "items[i].shippingPerson.city")
        shippingPersonCountryCode = jResp.string(of: "items[i].shippingPerson.countryCode")
        shippingPersonCountryName = jResp.string(of: "items[i].shippingPerson.countryName")
        shippingPersonPostalCode = jResp.string(of: "items[i].shippingPerson.postalCode")
        shippingPersonStateOrProvinceCode = jResp.string(of: "items[i].shippingPerson.stateOrProvinceCode")
        shippingPersonStateOrProvinceName = jResp.string(of: "items[i].shippingPerson.stateOrProvinceName")
        shippingPersonPhone = jResp.string(of: "items[i].shippingPerson.phone")
        shippingOptionShippingCarrierName = jResp.string(of: "items[i].shippingOption.shippingCarrierName")
        shippingOptionShippingMethodName = jResp.string(of: "items[i].shippingOption.shippingMethodName")
        shippingOptionShippingRate = jResp.string(of: "items[i].shippingOption.shippingRate")
        shippingOptionEstimatedTransitTime = jResp.string(of: "items[i].shippingOption.estimatedTransitTime")
        shippingOptionIsPickup = jResp.bool(of: "items[i].shippingOption.isPickup")
        handlingFeeName = jResp.string(of: "items[i].handlingFee.name")
        handlingFeeValue = jResp.int(of: "items[i].handlingFee.value").intValue
        handlingFeeDescription = jResp.string(of: "items[i].handlingFee.description")
        paymentModule = jResp.string(of: "items[i].paymentModule")
        additionalInfoGoogle_customer_id = jResp.string(of: "items[i].additionalInfo.google_customer_id")
        acceptMarketing = jResp.bool(of: "items[i].acceptMarketing")
        refererId = jResp.string(of: "items[i].refererId")
        disableAllCustomerNotifications = jResp.bool(of: "items[i].disableAllCustomerNotifications")
        externalFulfillment = jResp.bool(of: "items[i].externalFulfillment")
        pricesIncludeTax = jResp.bool(of: "items[i].pricesIncludeTax")
        j = 0
        count_j = jResp.size(ofArray: "items[i].customDiscount").intValue
        while j < count_j {
            jResp.j = j
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].discountInfo").intValue
        while j < count_j {
            jResp.j = j
            value = jResp.int(of: "items[i].discountInfo[j].value").intValue
            v_type = jResp.string(of: "items[i].discountInfo[j].type")
            base = jResp.string(of: "items[i].discountInfo[j].base")
            orderTotal = jResp.int(of: "items[i].discountInfo[j].orderTotal").intValue
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].items").intValue
        while j < count_j {
            jResp.j = j
            id_int = jResp.int(of: "items[i].items[j].id").intValue
            productId = jResp.int(of: "items[i].items[j].productId").intValue
            categoryId = jResp.int(of: "items[i].items[j].categoryId").intValue
            price = jResp.int(of: "items[i].items[j].price").intValue
            productPrice = jResp.int(of: "items[i].items[j].productPrice").intValue
            sku = jResp.string(of: "items[i].items[j].sku")
            quantity = jResp.int(of: "items[i].items[j].quantity").intValue
            shortDescription = jResp.string(of: "items[i].items[j].shortDescription")
            tax = jResp.string(of: "items[i].items[j].tax")
            shipping = jResp.int(of: "items[i].items[j].shipping").intValue
            quantityInStock = jResp.int(of: "items[i].items[j].quantityInStock").intValue
            name = jResp.string(of: "items[i].items[j].name")
            isShippingRequired = jResp.bool(of: "items[i].items[j].isShippingRequired")
            weight = jResp.int(of: "items[i].items[j].weight").intValue
            trackQuantity = jResp.bool(of: "items[i].items[j].trackQuantity")
            fixedShippingRateOnly = jResp.bool(of: "items[i].items[j].fixedShippingRateOnly")
            imageUrl = jResp.string(of: "items[i].items[j].imageUrl")
            smallThumbnailUrl = jResp.string(of: "items[i].items[j].smallThumbnailUrl")
            hdThumbnailUrl = jResp.string(of: "items[i].items[j].hdThumbnailUrl")
            fixedShippingRate = jResp.int(of: "items[i].items[j].fixedShippingRate").intValue
            digital = jResp.bool(of: "items[i].items[j].digital")
            couponApplied = jResp.bool(of: "items[i].items[j].couponApplied")
            dimensionsLength = jResp.int(of: "items[i].items[j].dimensions.length").intValue
            dimensionsWidth = jResp.int(of: "items[i].items[j].dimensions.width").intValue
            dimensionsHeight = jResp.int(of: "items[i].items[j].dimensions.height").intValue
            couponAmount = jResp.string(of: "items[i].items[j].couponAmount")
            subscriptionId = jResp.int(of: "items[i].items[j].subscriptionId").intValue
            recurringChargeSettingsRecurringInterval = jResp.string(of: "items[i].items[j].recurringChargeSettings.recurringInterval")
            recurringChargeSettingsRecurringIntervalCount = jResp.int(of: "items[i].items[j].recurringChargeSettings.recurringIntervalCount").intValue
            k = 0
            count_k = jResp.size(ofArray: "items[i].items[j].selectedOptions").intValue
            while k < count_k {
                jResp.k = k
                name = jResp.string(of: "items[i].items[j].selectedOptions[k].name")
                value_str = jResp.string(of: "items[i].items[j].selectedOptions[k].value")
                v_type = jResp.string(of: "items[i].items[j].selectedOptions[k].type")

                json1 = jResp.object(of: "items[i].items[j].selectedOptions[k]")
                i1 = 0
                count_i1 = json1!.size(ofArray: "valuesArray").intValue
                while i1 < count_i1 {
                    json1.i = i1
                    strVal = json1!.string(of: "valuesArray[i]")
                    i1 = i1 + 1
                }

                json1 = nil

                json1 = jResp.object(of: "items[i].items[j].selectedOptions[k]")
                i1 = 0
                count_i1 = json1!.size(ofArray: "selections").intValue
                while i1 < count_i1 {
                    json1.i = i1
                    selectionTitle = json1!.string(of: "selections[i].selectionTitle")
                    selectionModifier = json1!.int(of: "selections[i].selectionModifier").intValue
                    selectionModifierType = json1!.string(of: "selections[i].selectionModifierType")
                    i1 = i1 + 1
                }

                json1 = nil
                k = k + 1
            }

            k = 0
            count_k = jResp.size(ofArray: "items[i].items[j].taxes").intValue
            while k < count_k {
                jResp.k = k
                name = jResp.string(of: "items[i].items[j].taxes[k].name")
                value = jResp.int(of: "items[i].items[j].taxes[k].value").intValue
                total_str = jResp.string(of: "items[i].items[j].taxes[k].total")
                taxOnDiscountedSubtotal = jResp.string(of: "items[i].items[j].taxes[k].taxOnDiscountedSubtotal")
                taxOnShipping = jResp.int(of: "items[i].items[j].taxes[k].taxOnShipping").intValue
                includeInPrice = jResp.bool(of: "items[i].items[j].taxes[k].includeInPrice")
                k = k + 1
            }

            k = 0
            count_k = jResp.size(ofArray: "items[i].items[j].discounts").intValue
            while k < count_k {
                jResp.k = k
                discountInfoValue = jResp.int(of: "items[i].items[j].discounts[k].discountInfo.value").intValue
                discountInfoType = jResp.string(of: "items[i].items[j].discounts[k].discountInfo.type")
                discountInfoBase = jResp.string(of: "items[i].items[j].discounts[k].discountInfo.base")
                discountInfoOrderTotal = jResp.int(of: "items[i].items[j].discounts[k].discountInfo.orderTotal").intValue
                total_str = jResp.string(of: "items[i].items[j].discounts[k].total")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].refunds").intValue
        while j < count_j {
            jResp.j = j
            date = jResp.string(of: "items[i].refunds[j].date")
            source = jResp.string(of: "items[i].refunds[j].source")
            reason = jResp.string(of: "items[i].refunds[j].reason")
            amount = jResp.string(of: "items[i].refunds[j].amount")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].predictedPackage").intValue
        while j < count_j {
            jResp.j = j
            length = jResp.int(of: "items[i].predictedPackage[j].length").intValue
            width = jResp.int(of: "items[i].predictedPackage[j].width").intValue
            height = jResp.int(of: "items[i].predictedPackage[j].height").intValue
            weight_str = jResp.string(of: "items[i].predictedPackage[j].weight")
            declaredValue = jResp.string(of: "items[i].predictedPackage[j].declaredValue")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].shipments").intValue
        while j < count_j {
            jResp.j = j
            id = jResp.string(of: "items[i].shipments[j].id")
            created = jResp.string(of: "items[i].shipments[j].created")
            shipToName = jResp.string(of: "items[i].shipments[j].shipTo.name")
            shipToCompanyName = jResp.string(of: "items[i].shipments[j].shipTo.companyName")
            shipToStreet = jResp.string(of: "items[i].shipments[j].shipTo.street")
            shipToCity = jResp.string(of: "items[i].shipments[j].shipTo.city")
            shipToCountryCode = jResp.string(of: "items[i].shipments[j].shipTo.countryCode")
            shipToCountryName = jResp.string(of: "items[i].shipments[j].shipTo.countryName")
            shipToPostalCode = jResp.string(of: "items[i].shipments[j].shipTo.postalCode")
            shipToStateOrProvinceCode = jResp.string(of: "items[i].shipments[j].shipTo.stateOrProvinceCode")
            shipToStateOrProvinceName = jResp.string(of: "items[i].shipments[j].shipTo.stateOrProvinceName")
            shipToPhone = jResp.string(of: "items[i].shipments[j].shipTo.phone")
            shipFromCompanyName = jResp.string(of: "items[i].shipments[j].shipFrom.companyName")
            shipFromStreet = jResp.string(of: "items[i].shipments[j].shipFrom.street")
            shipFromCity = jResp.string(of: "items[i].shipments[j].shipFrom.city")
            shipFromCountryCode = jResp.string(of: "items[i].shipments[j].shipFrom.countryCode")
            shipFromCountryName = jResp.string(of: "items[i].shipments[j].shipFrom.countryName")
            shipFromPostalCode = jResp.string(of: "items[i].shipments[j].shipFrom.postalCode")
            shipFromStateOrProvinceCode = jResp.string(of: "items[i].shipments[j].shipFrom.stateOrProvinceCode")
            shipFromStateOrProvinceName = jResp.string(of: "items[i].shipments[j].shipFrom.stateOrProvinceName")
            shipFromPhone = jResp.string(of: "items[i].shipments[j].shipFrom.phone")
            parcelWeight = jResp.string(of: "items[i].shipments[j].parcel.weight")
            parcelWeightUnit = jResp.int(of: "items[i].shipments[j].parcel.weightUnit").intValue
            parcelWidth = jResp.int(of: "items[i].shipments[j].parcel.width").intValue
            parcelHeight = jResp.int(of: "items[i].shipments[j].parcel.height").intValue
            parcelLength = jResp.int(of: "items[i].shipments[j].parcel.length").intValue
            parcelDimensionUnit = jResp.int(of: "items[i].shipments[j].parcel.dimensionUnit").intValue
            shippingServiceCarrier = jResp.int(of: "items[i].shipments[j].shippingService.carrier").intValue
            shippingServiceCarrierName = jResp.int(of: "items[i].shipments[j].shippingService.carrierName").intValue
            shippingServiceCarrierServiceName = jResp.string(of: "items[i].shipments[j].shippingService.carrierServiceName")
            shippingServiceCarrierServiceCode = jResp.string(of: "items[i].shipments[j].shippingService.carrierServiceCode")
            trackingTracking_number = jResp.string(of: "items[i].shipments[j].tracking.tracking_number")
            trackingTracking_url = jResp.string(of: "items[i].shipments[j].tracking.tracking_url")
            trackingEstimatedDays = jResp.int(of: "items[i].shipments[j].tracking.estimatedDays").intValue
            shippingLabelLabel_url = jResp.string(of: "items[i].shipments[j].shippingLabel.label_url")
            shippingLabelCommercial_invoice_url = jResp.string(of: "items[i].shipments[j].shippingLabel.commercial_invoice_url")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].taxesOnShipping").intValue
        while j < count_j {
            jResp.j = j
            name = jResp.string(of: "items[i].taxesOnShipping[j].name")
            value = jResp.int(of: "items[i].taxesOnShipping[j].value").intValue
            total_str = jResp.string(of: "items[i].taxesOnShipping[j].total")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "items[i].orderExtraFields").intValue
        while j < count_j {
            jResp.j = j
            id = jResp.string(of: "items[i].orderExtraFields[j].id")
            value_str = jResp.string(of: "items[i].orderExtraFields[j].value")
            customerInputType = jResp.string(of: "items[i].orderExtraFields[j].customerInputType")
            title = jResp.string(of: "items[i].orderExtraFields[j].title")
            orderDetailsDisplaySection = jResp.string(of: "items[i].orderExtraFields[j].orderDetailsDisplaySection")
            orderBy = jResp.string(of: "items[i].orderExtraFields[j].orderBy")
            j = j + 1
        }

        i = i + 1
    }


}

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.