Skip to content

Commit e83dea4

Browse files
committed
fix product and shipping discount schemas
1 parent c432f32 commit e83dea4

File tree

2 files changed

+176
-156
lines changed

2 files changed

+176
-156
lines changed

discounts/javascript/product-discounts/default/schema.graphql

Lines changed: 164 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ type BuyerIdentity {
4141
The phone number of the buyer that is interacting with the cart.
4242
"""
4343
phone: String
44+
45+
"""
46+
The purchasing company associated with the cart.
47+
"""
48+
purchasingCompany: PurchasingCompany
4449
}
4550

4651
"""
@@ -225,6 +230,135 @@ type CartLineCost {
225230
totalAmount: MoneyV2!
226231
}
227232

233+
"""
234+
Represents information about a company which is also a customer of the shop.
235+
"""
236+
type Company implements HasMetafields {
237+
"""
238+
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify.
239+
"""
240+
createdAt: DateTime!
241+
242+
"""
243+
A unique externally-supplied identifier for the company.
244+
"""
245+
externalId: String
246+
247+
"""
248+
The ID of the company.
249+
"""
250+
id: ID!
251+
252+
"""
253+
Returns a metafield by namespace and key that belongs to the resource.
254+
"""
255+
metafield(
256+
"""
257+
The key for the metafield.
258+
"""
259+
key: String!
260+
261+
"""
262+
The namespace for the metafield.
263+
"""
264+
namespace: String!
265+
): Metafield
266+
267+
"""
268+
The name of the company.
269+
"""
270+
name: String!
271+
272+
"""
273+
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified.
274+
"""
275+
updatedAt: DateTime!
276+
}
277+
278+
"""
279+
A company's main point of contact.
280+
"""
281+
type CompanyContact {
282+
"""
283+
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
284+
at which the company contact was created in Shopify.
285+
"""
286+
createdAt: DateTime!
287+
288+
"""
289+
The ID of the company.
290+
"""
291+
id: ID!
292+
293+
"""
294+
The company contact's locale (language).
295+
"""
296+
locale: String
297+
298+
"""
299+
The company contact's job title.
300+
"""
301+
title: String
302+
303+
"""
304+
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
305+
at which the company contact was last modified.
306+
"""
307+
updatedAt: DateTime!
308+
}
309+
310+
"""
311+
A company's location.
312+
"""
313+
type CompanyLocation implements HasMetafields {
314+
"""
315+
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
316+
at which the company location was created in Shopify.
317+
"""
318+
createdAt: DateTime!
319+
320+
"""
321+
A unique externally-supplied identifier for the company.
322+
"""
323+
externalId: String
324+
325+
"""
326+
The ID of the company.
327+
"""
328+
id: ID!
329+
330+
"""
331+
The preferred locale of the company location.
332+
"""
333+
locale: String
334+
335+
"""
336+
Returns a metafield by namespace and key that belongs to the resource.
337+
"""
338+
metafield(
339+
"""
340+
The key for the metafield.
341+
"""
342+
key: String!
343+
344+
"""
345+
The namespace for the metafield.
346+
"""
347+
namespace: String!
348+
): Metafield
349+
350+
"""
351+
The name of the company location.
352+
"""
353+
name: String!
354+
355+
"""
356+
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
357+
at which the company location was last modified.
358+
"""
359+
updatedAt: DateTime!
360+
}
361+
228362
"""
229363
A country.
230364
"""
@@ -1597,10 +1731,7 @@ enum CurrencyCode {
15971731
"""
15981732
Belarusian Ruble (BYR).
15991733
"""
1600-
BYR
1601-
@deprecated(
1602-
reason: "`BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead."
1603-
)
1734+
BYR @deprecated(reason: "`BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead.")
16041735

16051736
"""
16061737
Belize Dollar (BZD).
@@ -2125,10 +2256,7 @@ enum CurrencyCode {
21252256
"""
21262257
Sao Tome And Principe Dobra (STD).
21272258
"""
2128-
STD
2129-
@deprecated(
2130-
reason: "`STD` is deprecated. Use `STN` available from version `2022-07` onwards instead."
2131-
)
2259+
STD @deprecated(reason: "`STD` is deprecated. Use `STN` available from version `2022-07` onwards instead.")
21322260

21332261
"""
21342262
Sao Tome And Principe Dobra (STN).
@@ -2223,10 +2351,7 @@ enum CurrencyCode {
22232351
"""
22242352
Venezuelan Bolivares (VEF).
22252353
"""
2226-
VEF
2227-
@deprecated(
2228-
reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead."
2229-
)
2354+
VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.")
22302355

22312356
"""
22322357
Venezuelan Bolivares (VES).
@@ -2370,6 +2495,13 @@ type Customer implements HasMetafields {
23702495
numberOfOrders: Int!
23712496
}
23722497

2498+
"""
2499+
Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string.
2500+
For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is
2501+
represented as `"2019-09-07T15:50:00Z`".
2502+
"""
2503+
scalar DateTime
2504+
23732505
"""
23742506
A signed decimal number, which supports arbitrary precision and is serialized as a string.
23752507
@@ -3531,6 +3663,26 @@ input ProductVariantTarget {
35313663
quantity: Int
35323664
}
35333665

3666+
"""
3667+
Represents information about the buyer that is interacting with the cart.
3668+
"""
3669+
type PurchasingCompany {
3670+
"""
3671+
The company associated to the order or draft order.
3672+
"""
3673+
company: Company!
3674+
3675+
"""
3676+
The company contact associated to the order or draft order.
3677+
"""
3678+
contact: CompanyContact
3679+
3680+
"""
3681+
The company location associated to the order or draft order.
3682+
"""
3683+
location: CompanyLocation!
3684+
}
3685+
35343686
"""
35353687
The target of the discount.
35363688
"""

0 commit comments

Comments
 (0)