# vim: set ts=2 sw=2 sts=2 et:
#
# Demo order for "separate shops" 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: 10
    children:
      - order_id: 11
        vendor: {login: partner2@example.com, order_id: "null"}
        vendorRatings:
          - type: description
            rating: 5
            additionDate: 1566461690
          - type: communication
            rating: 2
            additionDate: 1566461690
        total: 22.7400
        subtotal: 19.9900
        date: 1566461690
        currency: {code: USD}
        paymentStatus: {code: P}
        shippingStatus: {code: D}
        orderNumber: 5
        payment_method_name: Phone Ordering
        shipping: {processor: offline, code: VENDOR_2_TEST_SHIPPING}
        recent: 0
        orig_profile: {login: bit-bucket@example.com}
        surcharges:
          - type: shipping
            code: SHIPPING
            class: '\XLite\Logic\Order\Modifier\Shipping'
            name: Shipping cost
            value: 2.750
        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: 22.740
    subtotal: 19.990
    date: 1566461690
    currency: {code: USD}
    paymentStatus: {code: P}
    shippingStatus: {code: D}
    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: 1566461690
        status: S
        value: 22.74
        type: sale
        note: ''
        publicTxnId: '000010-5BS8'
        public_id: 'demostore-000010-5BS8'
    events:
      - date: 1566461690
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1566461690
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 22.740, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1566461690
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 10}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}

  # Order with different vendors products
  - order_id: 12
    children:
      - order_id: 13
        vendor: {login: seller3@example.com, order_id: "null"}
        total: 12.7400
        subtotal: 9.9900
        date: 1569571690
        currency: {code: USD}
        paymentStatus: {code: Q}
        shippingStatus: {code: N}
        orderNumber: 6
        payment_method_name: Phone Ordering
        shipping: {processor: offline, code: VENDOR_3_TEST_SHIPPING}
        orig_profile: {login: bit-bucket@example.com}
        surcharges:
          - type: shipping
            code: SHIPPING
            class: '\XLite\Logic\Order\Modifier\Shipping'
            name: Shipping cost
            value: 2.750
        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
        events:
          - date: 1569571690
            code: CHANGE PRODUCT AMOUNT
            description: '[Inventory] Removed from stock: "{{product}}" product amount in stock changes from "{{oldInStock}}" to "{{newInStock}}" ({{qty}} items)'
            data: {orderId: 13, newInStock: 12, oldInStock: 13, product: "Sleeved Mini Dress in Color Block [Vendor 2]", qty: 1}
            author: {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
      - order_id: 14
        vendor: {login: partner2@example.com, order_id: "null"}
        total: 102.940
        subtotal: 99.000
        date: 1569571690
        currency: {code: USD}
        paymentStatus: {code: Q}
        shippingStatus: {code: N}
        orderNumber: 7
        payment_method_name: Phone Ordering
        shipping: {processor: offline, code: VENDOR_2_TEST_SHIPPING}
        orig_profile: {login: bit-bucket@example.com}
        surcharges:
          - type: shipping
            code: SHIPPING
            class: '\XLite\Logic\Order\Modifier\Shipping'
            name: Shipping cost
            value: 3.940
        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
        events:
          - date: 1569571690
            code: CHANGE PRODUCT AMOUNT
            description: '[Inventory] Removed from stock: "{{product}}" product amount in stock changes from "{{oldInStock}}" to "{{newInStock}}" ({{qty}} items)'
            data: {orderId: 14, newInStock: 397, oldInStock: 398, product: "Vinyl Idolz: Ghostbusters [Vendor 1]", qty: 1}
            author: {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
    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: 115.530
    subtotal: 108.990
    date: 1569571690
    currency: {code: USD}
    paymentStatus: {code: Q}
    shippingStatus: {code: N}
    orderNumber: NULL
    payment_transactions:
      - method_name: PhoneOrdering
        method_local_name: 'Phone ordering'
        payment_method: {service_name: PhoneOrdering}
        currency: {code: 'USD'}
        date: 1569571690
        status: W
        value: 115.530
        type: sale
        note: ''
        publicTxnId: '000012-8KUU'
        public_id: 'demostore-000012-8KUU'
    events:
      - date: 1569571690
        code: PLACE ORDER
        description: Order placed
        author: {login: bit-bucket@example.com}
      - date: 1569571690
        code: TRANSACTION
        description: 'Payment transaction [method: Phone Ordering, type: sale, amount: 115.530, status: Pending]'
        author: {login: bit-bucket@example.com}
      - date: 1569571690
        code: EMAIL ADMIN SENT
        description: Email sent to the admin
        data: {orderId: 12}
        comment: Order is initially created
        author: {login: bit-bucket@example.com}
