# vim: set ts=2 sw=2 sts=2 et:
#
# Demo order for "warehouse" mode
#
# Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
# See https://www.x-cart.com/license-agreement.html for license details.

XLite\Model\Order:
  - order_id: 1
    children:
      - order_id: 2
        vendor: {login: partner2@example.com, order_id: "null"}
        vendorRatings:
          - type: description
            rating: 5
            additionDate: 1554105540
          - type: communication
            rating: 4
            additionDate: 1554105540
        total: 19.9900
        subtotal: 19.9900
        date: 1554105540
        currency: {code: USD}
        paymentStatus: {code: P}
        shippingStatus: {code: D}
        orderNumber: NULL
        shipping: {processor: offline, code: courier}
        recent: 0
        orig_profile: {login: bit-bucket@example.com}
        items:
          - object: {sku: '10000000118'}
            name: 'Perfect Snacks [Wholesale prices]'
            sku: '10000000118'
            vendor: {login: partner2@example.com, order_id: "null"}
            price: 19.9900
            itemNetPrice: 19.9900
            discountedSubtotal: 16.9900
            amount: 1
            subtotal: 19.9900
            total: 19.9900
            object_type: product
        profile:
          login: bit-bucket@example.com
          password: 084e0343a0486ff05530df6c705c8bb4
          anonymous: 1
          cms_profile_id: 0
          addresses:
            - is_billing: true
              is_shipping: true
              addressFields:
                - addressField: {serviceName: title}
                  value: 'Mr.'
                - addressField: {serviceName: firstname}
                  value: Guest
                - addressField: {serviceName: lastname}
                  value: Guest
                - addressField: {serviceName: phone}
                  value: '+14055555555'
                - addressField: {serviceName: address1}
                  value: '51 apt, 87 street'
                - addressField: {serviceName: city}
                  value: Edmond
                - addressField: {serviceName: state_id}
                  value: 580
                - addressField: {serviceName: country_code}
                  value: US
                - addressField: {serviceName: zipcode}
                  value: '73003'
                - addressField: {serviceName: custom_state}
                  value: Oklahoma
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '+14055555555'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 19.7400
    subtotal: 19.9900
    date: 1554105540
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 1
    shipping: {processor: offline, code: courier}
    recent: 0
    note: 'Please send me this'
    adminNote: 'Good client'
    payment_transactions:
      - method_name: PhoneOrdering
        method_local_name: 'Phone ordering'
        payment_method: {service_name: PhoneOrdering}
        currency: {code: 'USD'}
        date: 1554105540
        status: S
        value: 19.7400
        type: sale
        note: ''
        publicTxnId: '000001-KGSP'
        public_id: 'demostore-000001-KGSP'
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 2.5000
      - type: discount
        code: DISCOUNT
        class: '\CDev\VolumeDiscounts\Logic\Order\Modifier\Discount'
        name: Discount
        value: -3.00
    events:
      - date: 1554105540
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1554105540
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 19.74, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1554105540
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 1}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}

  - order_id: 3
    children:
      - order_id: 4
        vendor: {login: partner2@example.com, order_id: "null"}
        total: 19.9900
        subtotal: 19.9900
        date: 1554605540
        currency: {code: USD}
        paymentStatus: {code: Q}
        shippingStatus: {code: N}
        orderNumber: NULL
        shipping: {processor: offline, code: courier}
        orig_profile: {login: bit-bucket@example.com}
        items:
          - object: {sku: '10000000069'}
            name: "Beige Sneakers"
            sku: '10000000069'
            vendor: {login: partner2@example.com, order_id: "null"}
            price: 19.9900
            itemNetPrice: 19.9900
            discountedSubtotal: 19.9900
            amount: 1
            subtotal: 19.9900
            total: 19.9900
            object_type: product
        profile:
          login: bit-bucket@example.com
          password: 084e0343a0486ff05530df6c705c8bb4
          anonymous: 1
          cms_profile_id: 0
          addresses:
            - is_billing: true
              is_shipping: true
              addressFields:
                - addressField: {serviceName: title}
                  value: 'Mr.'
                - addressField: {serviceName: firstname}
                  value: Guest
                - addressField: {serviceName: lastname}
                  value: Guest
                - addressField: {serviceName: phone}
                  value: '+14055555555'
                - addressField: {serviceName: address1}
                  value: '51 apt, 87 street'
                - addressField: {serviceName: city}
                  value: Edmond
                - addressField: {serviceName: state_id}
                  value: 580
                - addressField: {serviceName: country_code}
                  value: US
                - addressField: {serviceName: zipcode}
                  value: '73003'
                - addressField: {serviceName: custom_state}
                  value: Oklahoma
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '+14055555555'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 22.7400
    subtotal: 19.9900
    date: 1554605540
    currency: {code: USD}
    paymentStatus: {code: Q}
    shippingStatus: {code: N}
    orderNumber: 2
    shipping: {processor: offline, code: courier}
    payment_transactions:
      - method_name: PhoneOrdering
        method_local_name: 'Phone ordering'
        payment_method: {service_name: PhoneOrdering}
        currency: {code: 'USD'}
        date: 1554605540
        status: W
        value: 22.7400
        type: sale
        note: ''
        publicTxnId: '000003-FX7B'
        public_id: 'demostore-000003-FX7B'
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 2.5000
    events:
      - date: 1554605540
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1554605540
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 22.74, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1554605540
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 2}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}

  - order_id: 5
    children:
      - order_id: 6
        vendor: {login: seller3@example.com, order_id: "null"}
        vendorRatings:
          - type: description
            rating: 4
            additionDate: 1558605540
          - type: communication
            rating: 3
            additionDate: 1558605540
        total: 9.9900
        subtotal: 9.9900
        date: 1558605540
        currency: {code: USD}
        paymentStatus: {code: P}
        shippingStatus: {code: D}
        orderNumber: NULL
        shipping: {processor: offline, code: courier}
        orig_profile: {login: bit-bucket@example.com}
        items:
          - object: {sku: '10000000085'}
            name: 'Waist Tie Dress in Blue and White Stripe'
            sku: '10000000085'
            vendor: {login: seller3@example.com, order_id: "null"}
            price: 9.9900
            itemNetPrice: 9.9900
            discountedSubtotal: 9.9900
            amount: 1
            subtotal: 9.9900
            total: 9.9900
            object_type: product
        profile:
          login: bit-bucket@example.com
          password: 084e0343a0486ff05530df6c705c8bb4
          anonymous: 1
          cms_profile_id: 0
          addresses:
            - is_billing: true
              is_shipping: true
              addressFields:
                - addressField: {serviceName: title}
                  value: 'Mr.'
                - addressField: {serviceName: firstname}
                  value: Guest
                - addressField: {serviceName: lastname}
                  value: Guest
                - addressField: {serviceName: phone}
                  value: '+14055555555'
                - addressField: {serviceName: address1}
                  value: '51 apt, 87 street'
                - addressField: {serviceName: city}
                  value: Edmond
                - addressField: {serviceName: state_id}
                  value: 580
                - addressField: {serviceName: country_code}
                  value: US
                - addressField: {serviceName: zipcode}
                  value: '73003'
                - addressField: {serviceName: custom_state}
                  value: Oklahoma
      - order_id: 7
        vendor: {login: partner2@example.com, order_id: "null"}
        vendorRatings:
          - type: description
            rating: 5
            additionDate: 1558605540
          - type: communication
            rating: 5
            additionDate: 1558605540
        total: 99.000
        subtotal: 99.000
        date: 1558605540
        currency: {code: USD}
        paymentStatus: {code: P}
        shippingStatus: {code: D}
        orderNumber: NULL
        shipping: {processor: offline, code: courier}
        orig_profile: {login: bit-bucket@example.com}
        items:
          - object: {sku: '10000000089'}
            name: 'Sleeved Mini Dress in Color Block'
            sku: '10000000089'
            vendor: {login: partner2@example.com, order_id: "null"}
            price: 99.0000
            itemNetPrice: 99.0000
            discountedSubtotal: 99.9900
            amount: 1
            subtotal: 99.0000
            total: 99.0000
            object_type: product
        profile:
          login: bit-bucket@example.com
          password: 084e0343a0486ff05530df6c705c8bb4
          anonymous: 1
          cms_profile_id: 0
          addresses:
            - is_billing: true
              is_shipping: true
              addressFields:
                - addressField: {serviceName: title}
                  value: 'Mr.'
                - addressField: {serviceName: firstname}
                  value: Guest
                - addressField: {serviceName: lastname}
                  value: Guest
                - addressField: {serviceName: phone}
                  value: '+14055555555'
                - addressField: {serviceName: address1}
                  value: '51 apt, 87 street'
                - addressField: {serviceName: city}
                  value: Edmond
                - addressField: {serviceName: state_id}
                  value: 580
                - addressField: {serviceName: country_code}
                  value: US
                - addressField: {serviceName: zipcode}
                  value: '73003'
                - addressField: {serviceName: custom_state}
                  value: Oklahoma
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '+14055555555'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 113.0700
    subtotal: 108.9900
    date: 1558605540
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    orderNumber: 3
    shipping: {processor: offline, code: courier}
    payment_transactions:
      - method_name: PhoneOrdering
        method_local_name: 'Phone ordering'
        payment_method: {service_name: PhoneOrdering}
        currency: {code: 'USD'}
        date: 1558605540
        status: S
        value: 113.070
        type: sale
        note: ''
        publicTxnId: '000005-O3MJ'
        public_id: 'demostore-000005-O3MJ'
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 4.0800
    events:
      - date: 1558605540
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1558605540
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 113.070, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1558605540
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 3}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}

  - order_id: 8
    children:
      - order_id: 9
        vendor: {login: seller3@example.com, order_id: "null"}
        total: 34.9900
        subtotal: 34.9900
        date: 1562605540
        currency: {code: USD}
        paymentStatus: {code: D}
        shippingStatus: {code: WND}
        orderNumber: NULL
        shipping: {processor: offline, code: courier}
        items:
          - object: {sku: '10000000083'}
            name: "Caged Cutout Sandals in Gold"
            sku: '10000000083'
            vendor: {login: seller3@example.com, order_id: "null"}
            price: 34.99
            itemNetPrice: 34.9900
            discountedSubtotal: 34.9900
            amount: 1
            subtotal: 34.9900
            total: 34.9900
            object_type: product
        profile:
          login: bit-bucket@example.com
          password: 084e0343a0486ff05530df6c705c8bb4
          anonymous: 1
          cms_profile_id: 0
          addresses:
            - is_billing: true
              is_shipping: true
              addressFields:
                - addressField: {serviceName: title}
                  value: 'Mr.'
                - addressField: {serviceName: firstname}
                  value: Guest
                - addressField: {serviceName: lastname}
                  value: Guest
                - addressField: {serviceName: phone}
                  value: '+14055555555'
                - addressField: {serviceName: address1}
                  value: '51 apt, 87 street'
                - addressField: {serviceName: city}
                  value: Edmond
                - addressField: {serviceName: state_id}
                  value: 580
                - addressField: {serviceName: country_code}
                  value: US
                - addressField: {serviceName: zipcode}
                  value: '73003'
                - addressField: {serviceName: custom_state}
                  value: Oklahoma
        orig_profile: {login: bit-bucket@example.com}
    profile:
      login: bit-bucket@example.com
      password: 084e0343a0486ff05530df6c705c8bb4
      anonymous: 1
      cms_profile_id: 0
      addresses:
        - is_billing: true
          is_shipping: true
          addressFields:
            - addressField: {serviceName: title}
              value: 'Mr.'
            - addressField: {serviceName: firstname}
              value: Guest
            - addressField: {serviceName: lastname}
              value: Guest
            - addressField: {serviceName: phone}
              value: '+14055555555'
            - addressField: {serviceName: address1}
              value: '51 apt, 87 street'
            - addressField: {serviceName: city}
              value: Edmond
            - addressField: {serviceName: state_id}
              value: 580
            - addressField: {serviceName: country_code}
              value: US
            - addressField: {serviceName: zipcode}
              value: '73003'
            - addressField: {serviceName: custom_state}
              value: Oklahoma
    orig_profile: {login: bit-bucket@example.com}
    total: 38.0100
    subtotal: 34.9900
    date: 1562605540
    currency: {code: USD}
    paymentStatus: {code: D}
    shippingStatus: {code: WND}
    payment_method_name: Simplify Commerce Hosted Payments
    orderNumber: 4
    shipping: {processor: offline, code: courier}

    payment_transactions:
      - method_name: SimplifyCommerceHP
        method_local_name: 'Simplify Commerce Hosted Payments'
        currency: {code: 'USD'}
        date: 1562605550
        status: F
        value: 38.0100
        type: sale
        note: "Simplify_BadRequestException: \"Request data is invalid\" (status: 400, error code: validation, reference: c5a0b8b8-92ac-4908-9506-88b843ecd399)\nField error: card.number\"Card bin Country rejected by acquirer\" (country.bin.not.accepted)"
        publicTxnId: '000008-AS2T'
        public_id: 'demostore-000008-AS2T'
        data:
          - name: 'test_mode'
            label: 'Test mode'
            access_level: A
            value: 1
          - name: 'error_field_name_card.number'
            label: 'Error: field name'
            access_level: A
            value: 'card.number'
          - name: 'error_field_code_card.number'
            label: 'Error: field code'
            access_level: A
            value: 'country.bin.not.accepted'
          - name: 'error_field_message_card.number'
            label: 'Error: field message'
            access_level: A
            value: 'Card bin Country rejected by acquirer'
          - name: 'cart_items'
            label: 'Cart items'
            access_level: A
            value: 'a:1:{i:0;a:5:{s:4:"name";s:28:"Caged Cutout Sandals in Gold";s:3:"sku";s:11:"10000000083";s:5:"price";d:34.990000000000002;s:6:"amount";i:1;s:5:"attrs";a:0:{}}}'

      - method_name: SimplifyCommerceHP
        method_local_name: 'Simplify Commerce Hosted Payments'
        currency: {code: 'USD'}
        date: 1562605560
        status: F
        value: 38.0100
        type: sale
        note: "Simplify_BadRequestException: \"Request data is invalid\" (status: 400, error code: validation, reference: 195c1b1a-44c8-46d4-8e48-ee4e65f271af)\nField error: card.number\"Card has expired.\" (card.expired)"
        publicTxnId: '000009-3I22'
        public_id: 'demostore-000009-3I22'
        data:
          - name: 'test_mode'
            label: 'Test mode'
            access_level: A
            value: 1
          - name: 'error_field_name_card.number'
            label: 'Error: field name'
            access_level: A
            value: 'card.number'
          - name: 'error_field_code_card.number'
            label: 'Error: field code'
            access_level: A
            value: 'card.expired'
          - name: 'error_field_message_card.number'
            label: 'Error: field message'
            access_level: A
            value: 'Card has expired.'
          - name: 'cart_items'
            label: 'Cart items'
            access_level: A
            value: 'a:1:{i:0;a:5:{s:4:"name";s:28:"Caged Cutout Sandals in Gold";s:3:"sku";s:11:"10000000083";s:5:"price";d:34.990000000000002;s:6:"amount";i:1;s:5:"attrs";a:0:{}}}'
    surcharges:
      - type: shipping
        code: SHIPPING
        class: '\XLite\Logic\Order\Modifier\Shipping'
        name: Shipping cost
        value: 3.0200
    events:
      - date: 1562605540
        code: PLACE ORDER
        description: Order placed
        data: {orderId: 4}
        author: {login: bit-bucket@example.com}
      - date: 1562605550
        code: TRANSACTION
        description: 'Back end payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 38.01, status: Failed] [initial request]'
        author: {login: bit-bucket@example.com}
      - date: 1562605560
        code: TRANSACTION
        description: 'Payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 38.01, status: Failed]'
        author: {login: bit-bucket@example.com}
      - date: 1562605570
        code: CHANGE PAYMENT STATUS ORDER
        description: "Order payment status changed from {{oldStatus}} to {{newStatus}}"
        data: {orderId: 4, newStatus: "Declined", oldStatus: "Awaiting payment"}
        author: {login: bit-bucket@example.com}
      - date: 1562605590
        code: CHANGE PAYMENT STATUS ORDER
        description: "Order payment status changed from {{oldStatus}} to {{newStatus}}"
        data: {orderId: 4, newStatus: "Awaiting payment", oldStatus: "Declined"}
        author: {login: bit-bucket@example.com}
      - date: 1562605590
        code: TRANSACTION
        description: 'Back end payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 38.01, status: Failed] [initial request]'
        author: {login: bit-bucket@example.com}
      - date: 1562605620
        code: TRANSACTION
        description: 'Payment transaction [method: Simplify Commerce Hosted Payments, type: sale, amount: 38.01, status: Failed]'
        author: {login: bit-bucket@example.com}
      - date: 1562605630
        code: CHANGE PAYMENT STATUS ORDER
        description: "Order payment status changed from {{oldStatus}} to {{newStatus}}"
        data: {orderId: 4, newStatus: "Declined", oldStatus: "Awaiting payment"}
        author: {login: bit-bucket@example.com}
