|
| 1 | +title: Order Edit |
| 2 | +description: Order edit keeps track of order items changes. |
| 3 | +x-resourceId: order_edit |
| 4 | +required: |
| 5 | + - order_id |
| 6 | + - order |
| 7 | + - changes |
| 8 | + - created_by |
| 9 | +properties: |
| 10 | + id: |
| 11 | + type: string |
| 12 | + description: The order edit's ID |
| 13 | + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK |
| 14 | + order_id: |
| 15 | + type: string |
| 16 | + description: The ID of the order that is edited |
| 17 | + example: order_01G2SG30J8C85S4A5CHM2S1NS2 |
| 18 | + order: |
| 19 | + description: Order object |
| 20 | + $ref: ./order.yaml |
| 21 | + changes: |
| 22 | + type: array |
| 23 | + description: Line item changes array. |
| 24 | + items: |
| 25 | + $ref: ./order_item_change.yaml |
| 26 | + internal_note: |
| 27 | + description: An optional note with additional details about the order edit. |
| 28 | + type: string |
| 29 | + example: Included two more items B to the order. |
| 30 | + created_by: |
| 31 | + type: string |
| 32 | + description: The unique identifier of the user or customer who created the order edit. |
| 33 | + requested_by: |
| 34 | + type: string |
| 35 | + description: >- |
| 36 | + The unique identifier of the user or customer who requested the order |
| 37 | + edit. |
| 38 | + requested_at: |
| 39 | + type: string |
| 40 | + description: The date with timezone at which the edit was requested. |
| 41 | + format: date-time |
| 42 | + confirmed_by: |
| 43 | + type: string |
| 44 | + description: >- |
| 45 | + The unique identifier of the user or customer who confirmed the order |
| 46 | + edit. |
| 47 | + confirmed_at: |
| 48 | + type: string |
| 49 | + description: The date with timezone at which the edit was confirmed. |
| 50 | + format: date-time |
| 51 | + declined_by: |
| 52 | + type: string |
| 53 | + description: The unique identifier of the user or customer who declined the order edit. |
| 54 | + declined_at: |
| 55 | + type: string |
| 56 | + description: The date with timezone at which the edit was declined. |
| 57 | + format: date-time |
| 58 | + declined_reason: |
| 59 | + description: An optional note why the order edit is declined. |
| 60 | + type: string |
| 61 | + subtotal: |
| 62 | + type: integer |
| 63 | + description: The subtotal for line items computed from changes. |
| 64 | + example: 8000 |
| 65 | + discount_total: |
| 66 | + type: integer |
| 67 | + description: The total of discount |
| 68 | + example: 800 |
| 69 | + tax_total: |
| 70 | + type: integer |
| 71 | + description: The total of tax |
| 72 | + example: 0 |
| 73 | + total: |
| 74 | + type: integer |
| 75 | + description: The total amount of the edited order. |
| 76 | + example: 8200 |
| 77 | + difference_due: |
| 78 | + type: integer |
| 79 | + description: >- |
| 80 | + The difference between the total amount of the order and total amount of |
| 81 | + edited order. |
| 82 | + example: 8200 |
| 83 | + items: |
| 84 | + type: array |
| 85 | + description: Computed line items from the changes. |
| 86 | + items: |
| 87 | + $ref: ./line_item.yaml |
0 commit comments