Skip to content

Commit d633091

Browse files
committed
build(codegen): updating SDK
1 parent 0d15797 commit d633091

File tree

69 files changed

+3891
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3891
-10
lines changed

changes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,32 @@
33
<details>
44
<summary>Added Type(s)</summary>
55

6+
- added type `CartDiscountSetRecurringOrderScopeAction`
67
- added type `CartLock`
78
- added type `FreezeStrategy`
89
- added type `CartLockCartAction`
910
- added type `CartSetPurchaseOrderNumberAction`
1011
- added type `CartUnlockCartAction`
1112
- added type `CartPurchaseOrderNumberSetMessage`
1213
- added type `CartPurchaseOrderNumberSetMessagePayload`
14+
- added type `AnyOrder`
15+
- added type `AnyOrderDraft`
16+
- added type `ApplicableRecurrencePolicies`
17+
- added type `ApplicableRecurrencePoliciesDraft`
18+
- added type `NonRecurringOrdersOnly`
19+
- added type `NonRecurringOrdersOnlyDraft`
20+
- added type `RecurringOrderScope`
21+
- added type `RecurringOrderScopeDraft`
22+
- added type `RecurringOrdersOnly`
23+
- added type `RecurringOrdersOnlyDraft`
1324
</details>
1425

1526

1627
<details>
1728
<summary>Added Property(s)</summary>
1829

30+
- added property `recurringOrderScope` to type `CartDiscount`
31+
- added property `recurringOrderScope` to type `CartDiscountDraft`
1932
- added property `freezeStrategy` to type `Cart`
2033
- added property `lock` to type `Cart`
2134
- added property `purchaseOrderNumber` to type `Cart`

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,26 @@ enum AnonymousCartSignInMode {
682682
UseAsNewActiveCustomerCart
683683
}
684684

685+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
686+
type AnyOrder implements RecurringOrderScope {
687+
type: RecurringOrderScopeType!
688+
}
689+
690+
input AnyOrderInput {
691+
dummy: String
692+
}
693+
694+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
695+
type ApplicableRecurrencePolicies implements RecurringOrderScope {
696+
recurrencePolicies: [RecurrencePolicy!]!
697+
type: RecurringOrderScopeType!
698+
recurrencePoliciesRef: [Reference!]!
699+
}
700+
701+
input ApplicableRecurrencePoliciesInput {
702+
recurrencePolicies: [ResourceIdentifierInput!]!
703+
}
704+
685705
type Applied implements OrderEditResult {
686706
excerptBeforeEdit: OrderExcerpt!
687707
excerptAfterEdit: OrderExcerpt!
@@ -1904,6 +1924,7 @@ type CartDiscount implements Versioned & ReferenceExpandable {
19041924
lastModifiedAt: DateTime!
19051925
createdBy: Initiator
19061926
lastModifiedBy: Initiator
1927+
recurringOrderScope: RecurringOrderScope!
19071928
}
19081929

19091930
type CartDiscountCreated implements MessagePayload {
@@ -1931,6 +1952,7 @@ input CartDiscountDraft {
19311952
key: String
19321953
stores: [ResourceIdentifierInput!]
19331954
discountGroup: ResourceIdentifierInput
1955+
recurringOrderScope: RecurringOrderScopeInput
19341956
}
19351957

19361958
type CartDiscountLimitWithCurrent implements LimitWithCurrent {
@@ -2036,6 +2058,7 @@ input CartDiscountUpdateAction {
20362058
setValidFromAndUntil: SetCartDiscountValidFromAndUntil
20372059
setValidUntil: SetCartDiscountValidUntil
20382060
setDiscountGroup: SetCartDiscountDiscountGroup
2061+
setRecurringOrderScope: SetCartDiscountRecurringOrderScope
20392062
}
20402063

20412064
interface CartDiscountValue {
@@ -7377,6 +7400,15 @@ type NestedAttributeDefinitionType implements AttributeDefinitionType {
73777400
name: String!
73787401
}
73797402

7403+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
7404+
type NonRecurringOrdersOnly implements RecurringOrderScope {
7405+
type: RecurringOrderScopeType!
7406+
}
7407+
7408+
input NonRecurringOrdersOnlyInput {
7409+
dummy: String
7410+
}
7411+
73807412
type NotProcessed implements OrderEditResult {
73817413
type: String!
73827414
}
@@ -11237,6 +11269,25 @@ type RecurringOrderScheduleSet implements MessagePayload {
1123711269
type: String!
1123811270
}
1123911271

11272+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11273+
interface RecurringOrderScope {
11274+
type: RecurringOrderScopeType!
11275+
}
11276+
11277+
input RecurringOrderScopeInput {
11278+
AnyOrder: AnyOrderInput
11279+
RecurringOrdersOnly: RecurringOrdersOnlyInput
11280+
NonRecurringOrdersOnly: NonRecurringOrdersOnlyInput
11281+
ApplicableRecurrencePolicies: ApplicableRecurrencePoliciesInput
11282+
}
11283+
11284+
enum RecurringOrderScopeType {
11285+
AnyOrder
11286+
NonRecurringOrdersOnly
11287+
RecurringOrdersOnly
11288+
ApplicableRecurrencePolicies
11289+
}
11290+
1124011291
type RecurringOrderStartsAtSet implements MessagePayload {
1124111292
startsAt: DateTime!
1124211293
oldStartsAt: DateTime!
@@ -11285,6 +11336,15 @@ input RecurringOrderUpdateAction {
1128511336
transitionState: TransitionRecurringOrderState
1128611337
}
1128711338

11339+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11340+
type RecurringOrdersOnly implements RecurringOrderScope {
11341+
type: RecurringOrderScopeType!
11342+
}
11343+
11344+
input RecurringOrdersOnlyInput {
11345+
dummy: String
11346+
}
11347+
1128811348
type Reference {
1128911349
typeId: String!
1129011350
id: String!
@@ -12629,6 +12689,10 @@ input SetCartDiscountKey {
1262912689
key: String
1263012690
}
1263112691

12692+
input SetCartDiscountRecurringOrderScope {
12693+
recurringOrderScope: RecurringOrderScopeInput!
12694+
}
12695+
1263212696
input SetCartDiscountStores {
1263312697
stores: [ResourceIdentifierInput!]
1263412698
}

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscount.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.commercetools.api.models.common.LocalizedString;
1616
import com.commercetools.api.models.common.Reference;
1717
import com.commercetools.api.models.discount_group.DiscountGroupReference;
18+
import com.commercetools.api.models.recurring_order.RecurringOrderScope;
1819
import com.commercetools.api.models.store.StoreKeyReference;
1920
import com.commercetools.api.models.type.CustomFields;
2021
import com.fasterxml.jackson.annotation.*;
@@ -46,6 +47,7 @@
4647
* .requiresDiscountCode(true)
4748
* .plusReferences(referencesBuilder -> referencesBuilder)
4849
* .stackingMode(StackingMode.STACKING)
50+
* .recurringOrderScope(recurringOrderScopeBuilder -> recurringOrderScopeBuilder)
4951
* .build()
5052
* </code></pre>
5153
* </div>
@@ -244,6 +246,16 @@ public interface CartDiscount
244246
@JsonProperty("discountGroup")
245247
public DiscountGroupReference getDiscountGroup();
246248

249+
/**
250+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
251+
* <p>The default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnly" rel="nofollow">NonRecurringOrdersOnly</a>.</p>
252+
* @return recurringOrderScope
253+
*/
254+
@NotNull
255+
@Valid
256+
@JsonProperty("recurringOrderScope")
257+
public RecurringOrderScope getRecurringOrderScope();
258+
247259
/**
248260
* <p>Unique identifier of the CartDiscount.</p>
249261
* @param id value to be set
@@ -423,6 +435,14 @@ public interface CartDiscount
423435

424436
public void setDiscountGroup(final DiscountGroupReference discountGroup);
425437

438+
/**
439+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
440+
* <p>The default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnly" rel="nofollow">NonRecurringOrdersOnly</a>.</p>
441+
* @param recurringOrderScope value to be set
442+
*/
443+
444+
public void setRecurringOrderScope(final RecurringOrderScope recurringOrderScope);
445+
426446
/**
427447
* factory method
428448
* @return instance of CartDiscount
@@ -460,6 +480,7 @@ public static CartDiscount of(final CartDiscount template) {
460480
instance.setStackingMode(template.getStackingMode());
461481
instance.setCustom(template.getCustom());
462482
instance.setDiscountGroup(template.getDiscountGroup());
483+
instance.setRecurringOrderScope(template.getRecurringOrderScope());
463484
return instance;
464485
}
465486

@@ -510,6 +531,8 @@ public static CartDiscount deepCopy(@Nullable final CartDiscount template) {
510531
instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom()));
511532
instance.setDiscountGroup(
512533
com.commercetools.api.models.discount_group.DiscountGroupReference.deepCopy(template.getDiscountGroup()));
534+
instance.setRecurringOrderScope(com.commercetools.api.models.recurring_order.RecurringOrderScope
535+
.deepCopy(template.getRecurringOrderScope()));
513536
return instance;
514537
}
515538

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountBuilder.java

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* .requiresDiscountCode(true)
3030
* .plusReferences(referencesBuilder -> referencesBuilder)
3131
* .stackingMode(StackingMode.STACKING)
32+
* .recurringOrderScope(recurringOrderScopeBuilder -> recurringOrderScopeBuilder)
3233
* .build()
3334
* </code></pre>
3435
* </div>
@@ -89,6 +90,8 @@ public class CartDiscountBuilder implements Builder<CartDiscount> {
8990
@Nullable
9091
private com.commercetools.api.models.discount_group.DiscountGroupReference discountGroup;
9192

93+
private com.commercetools.api.models.recurring_order.RecurringOrderScope recurringOrderScope;
94+
9295
/**
9396
* <p>Unique identifier of the CartDiscount.</p>
9497
* @param id value to be set
@@ -662,6 +665,34 @@ public CartDiscountBuilder discountGroup(
662665
return this;
663666
}
664667

668+
/**
669+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
670+
* <p>The default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnly" rel="nofollow">NonRecurringOrdersOnly</a>.</p>
671+
* @param recurringOrderScope value to be set
672+
* @return Builder
673+
*/
674+
675+
public CartDiscountBuilder recurringOrderScope(
676+
final com.commercetools.api.models.recurring_order.RecurringOrderScope recurringOrderScope) {
677+
this.recurringOrderScope = recurringOrderScope;
678+
return this;
679+
}
680+
681+
/**
682+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
683+
* <p>The default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnly" rel="nofollow">NonRecurringOrdersOnly</a>.</p>
684+
* @param builder function to build the recurringOrderScope value
685+
* @return Builder
686+
*/
687+
688+
public CartDiscountBuilder recurringOrderScope(
689+
Function<com.commercetools.api.models.recurring_order.RecurringOrderScopeBuilder, Builder<? extends com.commercetools.api.models.recurring_order.RecurringOrderScope>> builder) {
690+
this.recurringOrderScope = builder
691+
.apply(com.commercetools.api.models.recurring_order.RecurringOrderScopeBuilder.of())
692+
.build();
693+
return this;
694+
}
695+
665696
/**
666697
* <p>Unique identifier of the CartDiscount.</p>
667698
* @return id
@@ -875,6 +906,16 @@ public com.commercetools.api.models.discount_group.DiscountGroupReference getDis
875906
return this.discountGroup;
876907
}
877908

909+
/**
910+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
911+
* <p>The default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnly" rel="nofollow">NonRecurringOrdersOnly</a>.</p>
912+
* @return recurringOrderScope
913+
*/
914+
915+
public com.commercetools.api.models.recurring_order.RecurringOrderScope getRecurringOrderScope() {
916+
return this.recurringOrderScope;
917+
}
918+
878919
/**
879920
* builds CartDiscount with checking for non-null required values
880921
* @return CartDiscount
@@ -893,9 +934,10 @@ public CartDiscount build() {
893934
Objects.requireNonNull(requiresDiscountCode, CartDiscount.class + ": requiresDiscountCode is missing");
894935
Objects.requireNonNull(references, CartDiscount.class + ": references is missing");
895936
Objects.requireNonNull(stackingMode, CartDiscount.class + ": stackingMode is missing");
937+
Objects.requireNonNull(recurringOrderScope, CartDiscount.class + ": recurringOrderScope is missing");
896938
return new CartDiscountImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, name, key,
897939
description, value, cartPredicate, target, sortOrder, stores, isActive, validFrom, validUntil,
898-
requiresDiscountCode, references, stackingMode, custom, discountGroup);
940+
requiresDiscountCode, references, stackingMode, custom, discountGroup, recurringOrderScope);
899941
}
900942

901943
/**
@@ -905,7 +947,7 @@ public CartDiscount build() {
905947
public CartDiscount buildUnchecked() {
906948
return new CartDiscountImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, name, key,
907949
description, value, cartPredicate, target, sortOrder, stores, isActive, validFrom, validUntil,
908-
requiresDiscountCode, references, stackingMode, custom, discountGroup);
950+
requiresDiscountCode, references, stackingMode, custom, discountGroup, recurringOrderScope);
909951
}
910952

911953
/**
@@ -945,6 +987,7 @@ public static CartDiscountBuilder of(final CartDiscount template) {
945987
builder.stackingMode = template.getStackingMode();
946988
builder.custom = template.getCustom();
947989
builder.discountGroup = template.getDiscountGroup();
990+
builder.recurringOrderScope = template.getRecurringOrderScope();
948991
return builder;
949992
}
950993

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountDraft.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import com.commercetools.api.models.common.LocalizedString;
1313
import com.commercetools.api.models.discount_group.DiscountGroupResourceIdentifier;
14+
import com.commercetools.api.models.recurring_order.RecurringOrderScopeDraft;
1415
import com.commercetools.api.models.store.StoreResourceIdentifier;
1516
import com.commercetools.api.models.type.CustomFieldsDraft;
1617
import com.fasterxml.jackson.annotation.*;
@@ -171,6 +172,15 @@ public interface CartDiscountDraft extends com.commercetools.api.models.Customiz
171172
@JsonProperty("discountGroup")
172173
public DiscountGroupResourceIdentifier getDiscountGroup();
173174

175+
/**
176+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
177+
* <p>If not set, the default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnlyDraft" rel="nofollow">NonRecurringOrdersOnlyDraft</a>.</p>
178+
* @return recurringOrderScope
179+
*/
180+
@Valid
181+
@JsonProperty("recurringOrderScope")
182+
public RecurringOrderScopeDraft getRecurringOrderScope();
183+
174184
/**
175185
* <p>Name of the CartDiscount.</p>
176186
* @param name value to be set
@@ -297,6 +307,14 @@ public interface CartDiscountDraft extends com.commercetools.api.models.Customiz
297307

298308
public void setDiscountGroup(final DiscountGroupResourceIdentifier discountGroup);
299309

310+
/**
311+
* <p>Scope of the Cart Discount for Recurring Orders.</p>
312+
* <p>If not set, the default is <a href="https://docs.commercetools.com/apis/ctp:api:type:NonRecurringOrdersOnlyDraft" rel="nofollow">NonRecurringOrdersOnlyDraft</a>.</p>
313+
* @param recurringOrderScope value to be set
314+
*/
315+
316+
public void setRecurringOrderScope(final RecurringOrderScopeDraft recurringOrderScope);
317+
300318
/**
301319
* factory method
302320
* @return instance of CartDiscountDraft
@@ -327,6 +345,7 @@ public static CartDiscountDraft of(final CartDiscountDraft template) {
327345
instance.setStackingMode(template.getStackingMode());
328346
instance.setCustom(template.getCustom());
329347
instance.setDiscountGroup(template.getDiscountGroup());
348+
instance.setRecurringOrderScope(template.getRecurringOrderScope());
330349
return instance;
331350
}
332351

@@ -366,6 +385,8 @@ public static CartDiscountDraft deepCopy(@Nullable final CartDiscountDraft templ
366385
instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom()));
367386
instance.setDiscountGroup(com.commercetools.api.models.discount_group.DiscountGroupResourceIdentifier
368387
.deepCopy(template.getDiscountGroup()));
388+
instance.setRecurringOrderScope(com.commercetools.api.models.recurring_order.RecurringOrderScopeDraft
389+
.deepCopy(template.getRecurringOrderScope()));
369390
return instance;
370391
}
371392

0 commit comments

Comments
 (0)