Skip to content

Commit fa0339b

Browse files
committed
build(codegen): updating SDK
1 parent f44812e commit fa0339b

File tree

155 files changed

+9772
-924
lines changed

Some content is hidden

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

155 files changed

+9772
-924
lines changed

changes.md

Lines changed: 27 additions & 762 deletions
Large diffs are not rendered by default.

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

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,11 @@ input AddressInput {
661661
custom: CustomFieldsDraft
662662
}
663663

664+
enum AddressRole {
665+
Billing
666+
Shipping
667+
}
668+
664669
enum AnonymousCartSignInMode {
665670
"""
666671
`LineItem`s of the anonymous cart will be copied to the customer’s active cart that has been modified most recently.
@@ -1415,45 +1420,47 @@ type BusinessUnitAddressAdded implements MessagePayload {
14151420

14161421
type BusinessUnitAddressChanged implements MessagePayload {
14171422
address: Address!
1423+
addressRoles: [AddressRole!]!
14181424
type: String!
14191425
}
14201426

14211427
type BusinessUnitAddressCustomFieldAdded implements MessagePayload {
14221428
name: String!
14231429
value: Json!
1424-
addressId: String
1430+
addressId: String!
14251431
type: String!
14261432
}
14271433

14281434
type BusinessUnitAddressCustomFieldChanged implements MessagePayload {
14291435
name: String!
14301436
value: Json!
14311437
oldValue: Json
1432-
addressId: String
1438+
addressId: String!
14331439
type: String!
14341440
}
14351441

14361442
type BusinessUnitAddressCustomFieldRemoved implements MessagePayload {
14371443
name: String!
1438-
addressId: String
1444+
addressId: String!
14391445
type: String!
14401446
}
14411447

14421448
type BusinessUnitAddressCustomTypeRemoved implements MessagePayload {
14431449
oldTypeId: String
1444-
addressId: String
1450+
addressId: String!
14451451
type: String!
14461452
}
14471453

14481454
type BusinessUnitAddressCustomTypeSet implements MessagePayload {
14491455
customFields: CustomFieldsType!
14501456
oldTypeId: String
1451-
addressId: String
1457+
addressId: String!
14521458
type: String!
14531459
}
14541460

14551461
type BusinessUnitAddressRemoved implements MessagePayload {
14561462
address: Address!
1463+
addressRoles: [AddressRole!]!
14571464
type: String!
14581465
}
14591466

@@ -1667,8 +1674,12 @@ type BusinessUnitStoreModeChanged implements MessagePayload {
16671674
oldStoreMode: String!
16681675
stores: [Store!]
16691676
oldStores: [Store!]
1677+
inheritedStores: [Store!]
1678+
oldInheritedStores: [Store!]
16701679
storesRef: [KeyReference!]
16711680
oldStoresRef: [KeyReference!]
1681+
inheritedStoresRef: [KeyReference!]
1682+
oldInheritedStoresRef: [KeyReference!]
16721683
type: String!
16731684
}
16741685

@@ -3660,44 +3671,56 @@ type CustomerAddressAdded implements MessagePayload {
36603671

36613672
type CustomerAddressChanged implements MessagePayload {
36623673
address: Address!
3674+
addressRoles: [AddressRole!]!
36633675
type: String!
36643676
}
36653677

36663678
type CustomerAddressCustomFieldAdded implements MessagePayload {
36673679
name: String!
36683680
value: Json!
3669-
addressId: String
3681+
addressId: String!
36703682
type: String!
36713683
}
36723684

36733685
type CustomerAddressCustomFieldChanged implements MessagePayload {
36743686
name: String!
36753687
value: Json!
36763688
previousValue: Json
3677-
addressId: String
3689+
addressId: String!
36783690
type: String!
36793691
}
36803692

36813693
type CustomerAddressCustomFieldRemoved implements MessagePayload {
36823694
name: String!
3683-
addressId: String
3695+
addressId: String!
36843696
type: String!
36853697
}
36863698

36873699
type CustomerAddressCustomTypeRemoved implements MessagePayload {
36883700
previousTypeId: String
3689-
addressId: String
3701+
addressId: String!
36903702
type: String!
36913703
}
36923704

36933705
type CustomerAddressCustomTypeSet implements MessagePayload {
36943706
customFields: CustomFieldsType!
36953707
previousTypeId: String
3696-
addressId: String
3708+
addressId: String!
36973709
type: String!
36983710
}
36993711

37003712
type CustomerAddressRemoved implements MessagePayload {
3713+
address: Address!
3714+
addressRoles: [AddressRole!]!
3715+
type: String!
3716+
}
3717+
3718+
type CustomerBillingAddressAdded implements MessagePayload {
3719+
address: Address!
3720+
type: String!
3721+
}
3722+
3723+
type CustomerBillingAddressRemoved implements MessagePayload {
37013724
address: Address!
37023725
type: String!
37033726
}
@@ -3757,11 +3780,13 @@ type CustomerDefaultShippingAddressSet implements MessagePayload {
37573780
}
37583781

37593782
type CustomerDeleted implements MessagePayload {
3783+
email: String
37603784
type: String!
37613785
}
37623786

37633787
type CustomerEmailChanged implements MessagePayload {
37643788
email: String!
3789+
oldEmail: String!
37653790
type: String!
37663791
}
37673792

@@ -3790,6 +3815,11 @@ type CustomerEmailVerified implements MessagePayload {
37903815
type: String!
37913816
}
37923817

3818+
type CustomerExternalIdSet implements MessagePayload {
3819+
externalId: String
3820+
type: String!
3821+
}
3822+
37933823
type CustomerFirstNameSet implements MessagePayload {
37943824
firstName: String
37953825
type: String!
@@ -3829,6 +3859,7 @@ type CustomerGroupAssignmentRemoved implements MessagePayload {
38293859

38303860
type CustomerGroupAssignmentsSet implements MessagePayload {
38313861
customerGroupAssignments: [CustomerGroupAssignment!]!
3862+
oldCustomerGroupAssignments: [CustomerGroupAssignment!]!
38323863
type: String!
38333864
}
38343865

@@ -3979,6 +4010,16 @@ enum CustomerSearchStatus {
39794010
Deactivated
39804011
}
39814012

4013+
type CustomerShippingAddressAdded implements MessagePayload {
4014+
address: Address!
4015+
type: String!
4016+
}
4017+
4018+
type CustomerShippingAddressRemoved implements MessagePayload {
4019+
address: Address!
4020+
type: String!
4021+
}
4022+
39824023
input CustomerSignInDraft {
39834024
email: String!
39844025
password: String!
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
2+
package com.commercetools.api.models.common;
3+
4+
import java.util.Arrays;
5+
import java.util.Optional;
6+
7+
import com.fasterxml.jackson.annotation.JsonCreator;
8+
import com.fasterxml.jackson.annotation.JsonValue;
9+
10+
import io.vrap.rmf.base.client.JsonEnum;
11+
import io.vrap.rmf.base.client.utils.Generated;
12+
13+
/**
14+
* <p>Indicates the role of an address.</p>
15+
*/
16+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
17+
public interface AddressRole extends JsonEnum {
18+
19+
/**
20+
<p>The address is used as a shipping address.</p> */
21+
AddressRole SHIPPING = AddressRoleEnum.SHIPPING;
22+
/**
23+
<p>The address is used as a billing address.</p> */
24+
AddressRole BILLING = AddressRoleEnum.BILLING;
25+
26+
/**
27+
* possible values of AddressRole
28+
*/
29+
enum AddressRoleEnum implements AddressRole {
30+
/**
31+
* Shipping
32+
*/
33+
SHIPPING("Shipping"),
34+
35+
/**
36+
* Billing
37+
*/
38+
BILLING("Billing");
39+
private final String jsonName;
40+
41+
private AddressRoleEnum(final String jsonName) {
42+
this.jsonName = jsonName;
43+
}
44+
45+
public String getJsonName() {
46+
return jsonName;
47+
}
48+
49+
public String toString() {
50+
return jsonName;
51+
}
52+
}
53+
54+
/**
55+
* the JSON value
56+
* @return json value
57+
*/
58+
@JsonValue
59+
String getJsonName();
60+
61+
/**
62+
* the enum value
63+
* @return name
64+
*/
65+
String name();
66+
67+
/**
68+
* convert value to string
69+
* @return string representation
70+
*/
71+
String toString();
72+
73+
/**
74+
* factory method for a enum value of AddressRole
75+
* if no enum has been found an anonymous instance will be created
76+
* @param value the enum value to be wrapped
77+
* @return enum instance
78+
*/
79+
@JsonCreator
80+
public static AddressRole findEnum(String value) {
81+
return findEnumViaJsonName(value).orElse(new AddressRole() {
82+
@Override
83+
public String getJsonName() {
84+
return value;
85+
}
86+
87+
@Override
88+
public String name() {
89+
return value.toUpperCase();
90+
}
91+
92+
public String toString() {
93+
return value;
94+
}
95+
});
96+
}
97+
98+
/**
99+
* method to find enum using the JSON value
100+
* @param jsonName the json value to be wrapped
101+
* @return optional of enum instance
102+
*/
103+
public static Optional<AddressRole> findEnumViaJsonName(String jsonName) {
104+
return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst();
105+
}
106+
107+
/**
108+
* possible enum values
109+
* @return array of possible enum values
110+
*/
111+
public static AddressRole[] values() {
112+
return AddressRoleEnum.values();
113+
}
114+
115+
}

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerRemoveBillingAddressIdAction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import io.vrap.rmf.base.client.utils.Generated;
1414

1515
/**
16-
* <p>Removes a billing address from <code>billingAddressesIds</code>. If the billing address is the default billing address, the <code>defaultBillingAddressId</code> is unset. Either <code>addressId</code> or <code>addressKey</code> is required.</p>
16+
* <p>Removes a billing address from <code>billingAddressIds</code>. If the billing address is the default billing address, the <code>defaultBillingAddressId</code> is unset. Either <code>addressId</code> or <code>addressKey</code> is required.</p>
1717
*
1818
* <hr>
1919
* Example to create an instance using the builder pattern
@@ -35,30 +35,30 @@ public interface CustomerRemoveBillingAddressIdAction extends CustomerUpdateActi
3535
String REMOVE_BILLING_ADDRESS_ID = "removeBillingAddressId";
3636

3737
/**
38-
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
38+
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
3939
* @return addressId
4040
*/
4141

4242
@JsonProperty("addressId")
4343
public String getAddressId();
4444

4545
/**
46-
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
46+
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
4747
* @return addressKey
4848
*/
4949

5050
@JsonProperty("addressKey")
5151
public String getAddressKey();
5252

5353
/**
54-
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
54+
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
5555
* @param addressId value to be set
5656
*/
5757

5858
public void setAddressId(final String addressId);
5959

6060
/**
61-
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
61+
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
6262
* @param addressKey value to be set
6363
*/
6464

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerRemoveBillingAddressIdActionBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class CustomerRemoveBillingAddressIdActionBuilder implements Builder<Cust
2929
private String addressKey;
3030

3131
/**
32-
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
32+
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
3333
* @param addressId value to be set
3434
* @return Builder
3535
*/
@@ -40,7 +40,7 @@ public CustomerRemoveBillingAddressIdActionBuilder addressId(@Nullable final Str
4040
}
4141

4242
/**
43-
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
43+
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
4444
* @param addressKey value to be set
4545
* @return Builder
4646
*/
@@ -51,7 +51,7 @@ public CustomerRemoveBillingAddressIdActionBuilder addressKey(@Nullable final St
5151
}
5252

5353
/**
54-
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
54+
* <p><code>id</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
5555
* @return addressId
5656
*/
5757

@@ -61,7 +61,7 @@ public String getAddressId() {
6161
}
6262

6363
/**
64-
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressesIds</code>.</p>
64+
* <p><code>key</code> of the <a href="https://docs.commercetools.com/apis/ctp:api:type:Address" rel="nofollow">Address</a> to remove from <code>billingAddressIds</code>.</p>
6565
* @return addressKey
6666
*/
6767

0 commit comments

Comments
 (0)