@@ -72,12 +72,12 @@ type CustomerOrder {
72
72
invoices : [Invoice ] @doc ("invoice list for the order" )
73
73
credit_memos : [CreditMemo ] @doc ("credit memo list for the order" )
74
74
shipments : [OrderShipment ] @doc ("shipment list for the order" )
75
- payment_methods : [PaymentMethod ] @doc ("payment details for the order" )
75
+ payment_methods : [OrderPaymentMethod ] @doc ("payment details for the order" )
76
76
shipping_address : OrderAddress @doc ("shipping address for the order" )
77
77
billing_address : OrderAddress @doc ("billing address for the order" )
78
78
carrier : String @doc ("shipping carrier for the order delivery" )
79
79
shipping_method : String @doc ("shipping method for the order" )
80
- comments : [CommentItem ] @doc ("comments on the order" )
80
+ comments : [SalesCommentItem ] @doc ("comments on the order" )
81
81
}
82
82
```
83
83
@@ -114,13 +114,6 @@ type BundleOrderItem implements OrderItemInterface {
114
114
bundle_options : [ItemSelectedBundleOption ] @doc ("A list of bundle options that are assigned to the bundle product" )
115
115
}
116
116
117
- type GiftCardOrderItem implements OrderItemInterface {
118
- gift_card_amount : Money ! @doc ("Amount of value on gift card" )
119
- gift_card_sender : String @doc ("Name of gift card sender" )
120
- gift_card_recipient : String @doc ("Name of gift card recipient" )
121
- gift_card_message : String @doc ("Message accompanying gift card" )
122
- }
123
-
124
117
type ItemSelectedBundleOption {
125
118
id : ID ! @doc (description : " The unique identifier of the option" )
126
119
label : String ! @doc (description : " The label of the option" )
@@ -135,9 +128,30 @@ type ItemSelectedBundleOptionValue {
135
128
price : Money ! @doc ("Option value price. price for single quantity" )
136
129
}
137
130
131
+ type DownloadableOrderItem implements OrderItemInterface {
132
+ downloadable_links : [DownloadableItemsLinks ] @doc (description : " A list of downloadable links that are ordered from the downloadable product" )
133
+ }
134
+
135
+ type DownloadableItemsLinks @doc (description : " DownloadableProductLinks defines characteristics of a downloadable product" ) {
136
+ title : String @doc (description : " The display name of the link" )
137
+ sort_order : Int @doc (description : " A number indicating the sort order" )
138
+ uid : ID ! @doc (description : " A string that encodes option details." )
139
+ }
140
+
141
+ type GiftCardOrderItem implements OrderItemInterface {
142
+ gift_card : GiftCardItem @doc (description : " Selected gift card properties for an order item" )
143
+ }
144
+ type GiftCardItem {
145
+ sender_name : String @doc (description : " Entered gift card sender name" )
146
+ sender_email : String @doc (description : " Entered gift card sender email" )
147
+ recipient_name : String @doc (description : " Entered gift card recipient name" )
148
+ recipient_email : String @doc (description : " Entered gift card recipient email" )
149
+ message : String @doc (description : " Entered gift card message intended for the recipient" )
150
+ }
151
+
138
152
@doc ("Represents order item options like selected or entered" )
139
153
type OrderItemOption {
140
- id : String ! @doc ("name of the option" )
154
+ label : String ! @doc ("name of the option" )
141
155
value : String ! @doc ("value of the option" )
142
156
}
143
157
```
@@ -147,7 +161,7 @@ To provide more customization for different payment solutions, the payment metho
147
161
148
162
```graphql
149
163
@doc ("Payment method used to pay for the order" )
150
- type PaymentMethod {
164
+ type OrderPaymentMethod {
151
165
name : String ! @doc ("payment method name for e.g Braintree, Authorize etc." )
152
166
type : String ! @doc ("payment method type used to pay for the order for e.g Credit Card, PayPal etc." )
153
167
additional_data : [KeyValue ] @doc ("additional data per payment method type" )
@@ -179,7 +193,11 @@ type ShippingHandling {
179
193
amount_including_tax : Money @doc ("shipping amount including tax" )
180
194
amount_excluding_tax : Money @doc ("shipping amount excluding tax" )
181
195
taxes : [TaxItem ] @doc ("shipping taxes details" )
182
- discounts : [Discount ] @doc ("The applied discounts to the shipping)
196
+ discounts : [ShippingDiscount ] @doc ("The applied discounts to the shipping)
197
+ }
198
+
199
+ type ShippingDiscount @doc(description:" Defines an individual shipping discount. This discount can be applied to shipping.") {
200
+ amount: Money! @doc(description:" The amount of the discount")
183
201
}
184
202
185
203
@doc(" Tax item details")
@@ -201,7 +219,7 @@ type Invoice {
201
219
number: String! @doc(" sequential invoice number")
202
220
total: InvoiceTotal @doc(" invoice total amount details")
203
221
items: [InvoiceItemInterface] @doc(" invoiced product details")
204
- comments: [CommentItem ] @doc(" comments on the invoice")
222
+ comments: [SalesCommentItem ] @doc(" comments on the invoice")
205
223
}
206
224
207
225
@doc(" Invoice item details")
@@ -222,6 +240,14 @@ type BundleInvoiceItem implements InvoiceItemInterface {
222
240
bundle_options: [ItemSelectedBundleOption] @doc(" A list of bundle options that are assigned to the bundle product")
223
241
}
224
242
243
+ type DownloadableInvoiceItem implements InvoiceItemInterface {
244
+ downloadable_links: [DownloadableItemsLinks] @doc(description: " A list of downloadable links that are invoiced from the downloadable product")
245
+ }
246
+
247
+ type GiftCardInvoiceItem implements InvoiceItemInterface {
248
+ gift_card: GiftCardItem @doc(description: " Selected gift card properties for an invoice item")
249
+ }
250
+
225
251
@doc(" Invoice total amount details")
226
252
type InvoiceTotal {
227
253
subtotal: Money! @doc(" subtotal amount excluding, shipping, discounts and tax")
@@ -238,16 +264,16 @@ type InvoiceTotal {
238
264
## Refund Type Schema
239
265
240
266
The credit memo entity will have the similar to the order and invoice schema:
241
- The `id` will be a `base64_encode_encode (increment_id)` which in future can be replaced by UUID.
267
+ The `id` will be a `base64encode (increment_id)` which in future can be replaced by UUID.
242
268
243
269
```graphql
244
270
@doc(" Credit memo details")
245
271
type CreditMemo {
246
272
id: ID! @doc(" the ID of the credit memo, used for API purposes")
247
273
number: String! @doc(" sequential credit memo number")
248
- items: [CreditMemoItem ] @doc(" items refunded")
274
+ items: [CreditMemoItemInterface ] @doc(" items refunded")
249
275
total: CreditMemoTotal @doc(" refund total amount details")
250
- comments: [CommentItem ] @doc(" comments on the credit memo")
276
+ comments: [SalesCommentItem ] @doc(" comments on the credit memo")
251
277
}
252
278
253
279
@doc(" Credit memo item details")
@@ -268,6 +294,14 @@ type BundleCreditMemoItem implements CreditMemoIntemInterface {
268
294
bundle_options: [ItemSelectedBundleOption]
269
295
}
270
296
297
+ type DownloadableCreditMemoItem implements CreditMemoItemInterface {
298
+ downloadable_links: [DownloadableItemsLinks] @doc(description: " A list of downloadable links that are refunded from the downloadable product")
299
+ }
300
+
301
+ type GiftCardCreditMemoItem implements CreditMemoItemInterface {
302
+ gift_card: GiftCardItem @doc(description: " Selected gift card properties for a credit memo item")
303
+ }
304
+
271
305
@doc(" Credit memo price details")
272
306
type CreditMemoTotal {
273
307
subtotal: Money! @doc(" subtotal amount excluding, shipping, discounts and tax")
@@ -287,8 +321,8 @@ type OrderShipment {
287
321
id: ID! @doc(" the ID of the shipment, used for API purposes")
288
322
number: String! @doc(" sequential credit shipment number")
289
323
tracking: [ShipmentTracking] @doc(" shipment tracking details")
290
- items: [ShipmentItem ] @doc(" items included in the shipment")
291
- comments: [CommentItem ] @doc(" comments on the shipment")
324
+ items: [ShipmentItemInterface ] @doc(" items included in the shipment")
325
+ comments: [SalesCommentItem ] @doc(" comments on the shipment")
292
326
}
293
327
294
328
@doc(" Order shipment item details")
@@ -308,6 +342,10 @@ type BundleShipmentItem implements ShipmentItemInterface {
308
342
bundle_options: [ItemSelectedBundleOption]
309
343
}
310
344
345
+ type GiftCardShipmentItem implements ShipmentItemInterface {
346
+ gift_card: GiftCardItem @doc(description: " Selected gift card properties for a shipment item")
347
+ }
348
+
311
349
@doc(" Order shipment tracking details")
312
350
type ShipmentTracking {
313
351
title: String! @doc(" shipment tracking title")
@@ -316,10 +354,9 @@ type ShipmentTracking {
316
354
}
317
355
```
318
356
319
-
320
- ## CommentItem type
357
+ ## SalesCommentItem type
321
358
```graphql
322
- type CommentItem {
359
+ type SalesCommentItem {
323
360
timestamp: String! @doc(" The timestamp of the comment")
324
361
message: String! @doc(" the comment message")
325
362
}
@@ -345,8 +382,6 @@ type OrderAddress @doc(description: "OrderAddress contains detailed information
345
382
suffix: String @doc(description: " A value such as Sr., Jr., or III")
346
383
vat_id: String @doc(description: " The customer's Value-added tax (VAT) number (for corporate customers)")
347
384
}
348
-
349
-
350
385
```
351
386
352
387
## Additional Types
0 commit comments