Skip to content

Commit 9493b87

Browse files
committed
build(codegen): updating SDK
1 parent 6ce761e commit 9493b87

File tree

82 files changed

+7580
-18
lines changed

Some content is hidden

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

82 files changed

+7580
-18
lines changed

changes.md

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

6+
- added type `BusinessUnitAddCustomerGroupAssignmentAction`
7+
- added type `BusinessUnitRemoveCustomerGroupAssignmentAction`
8+
- added type `BusinessUnitSetCustomerGroupAssignmentsAction`
69
- added type `AddressRole`
10+
- added type `BusinessUnitCustomerGroupAssignmentAddedMessage`
11+
- added type `BusinessUnitCustomerGroupAssignmentRemovedMessage`
12+
- added type `BusinessUnitCustomerGroupAssignmentsSetMessage`
713
- added type `CustomerBillingAddressAddedMessage`
814
- added type `CustomerBillingAddressRemovedMessage`
915
- added type `CustomerExternalIdSetMessage`
1016
- added type `CustomerShippingAddressAddedMessage`
1117
- added type `CustomerShippingAddressRemovedMessage`
18+
- added type `BusinessUnitCustomerGroupAssignmentAddedMessagePayload`
19+
- added type `BusinessUnitCustomerGroupAssignmentRemovedMessagePayload`
20+
- added type `BusinessUnitCustomerGroupAssignmentsSetMessagePayload`
1221
- added type `CustomerBillingAddressAddedMessagePayload`
1322
- added type `CustomerBillingAddressRemovedMessagePayload`
1423
- added type `CustomerExternalIdSetMessagePayload`
@@ -43,6 +52,12 @@
4352
<details>
4453
<summary>Added Property(s)</summary>
4554

55+
- added property `customerGroupAssignments` to type `BusinessUnit`
56+
- added property `customerGroupAssignments` to type `BusinessUnitDraft`
57+
- added property `customerGroupAssignments` to type `Company`
58+
- added property `customerGroupAssignments` to type `CompanyDraft`
59+
- added property `customerGroupAssignments` to type `Division`
60+
- added property `customerGroupAssignments` to type `DivisionDraft`
4661
- added property `addressRoles` to type `BusinessUnitAddressChangedMessage`
4762
- added property `addressRoles` to type `BusinessUnitAddressRemovedMessage`
4863
- added property `addressRoles` to type `CustomerAddressChangedMessage`

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,9 @@ type BusinessUnit implements Versioned & ReferenceExpandable {
14051405
topLevelUnitRef: KeyReference
14061406
topLevelUnit: BusinessUnit!
14071407
approvalRuleMode: BusinessUnitApprovalRuleMode!
1408+
1409+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1410+
customerGroupAssignments: [CustomerGroupAssignment!]
14081411
id: String!
14091412
version: Long!
14101413
createdAt: DateTime!
@@ -1570,6 +1573,25 @@ type BusinessUnitCustomTypeSet implements MessagePayload {
15701573
type: String!
15711574
}
15721575

1576+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1577+
type BusinessUnitCustomerGroupAssignmentAdded implements MessagePayload {
1578+
customerGroupAssignment: CustomerGroupAssignment!
1579+
type: String!
1580+
}
1581+
1582+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1583+
type BusinessUnitCustomerGroupAssignmentRemoved implements MessagePayload {
1584+
customerGroupAssignment: CustomerGroupAssignment!
1585+
type: String!
1586+
}
1587+
1588+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1589+
type BusinessUnitCustomerGroupAssignmentsSet implements MessagePayload {
1590+
customerGroupAssignments: [CustomerGroupAssignment!]
1591+
oldCustomerGroupAssignments: [CustomerGroupAssignment!]
1592+
type: String!
1593+
}
1594+
15731595
type BusinessUnitDefaultBillingAddressSet implements MessagePayload {
15741596
address: Address
15751597
type: String!
@@ -1609,6 +1631,9 @@ input BusinessUnitDraft {
16091631
associates: [AssociateDraft!]
16101632
associateMode: BusinessUnitAssociateMode
16111633
approvalRuleMode: BusinessUnitApprovalRuleMode
1634+
1635+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1636+
customerGroupAssignments: [CustomerGroupAssignmentDraft!]
16121637
}
16131638

16141639
type BusinessUnitNameChanged implements MessagePayload {
@@ -1751,6 +1776,15 @@ input BusinessUnitUpdateAction {
17511776

17521777
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
17531778
setUnitType: SetBusinessUnitUnitType
1779+
1780+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1781+
addCustomerGroupAssignment: AddCustomerGroupAssignment
1782+
1783+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1784+
removeCustomerGroupAssignment: RemoveCustomerGroupAssignment
1785+
1786+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1787+
setCustomerGroupAssignments: SetCustomerGroupAssignments
17541788
}
17551789

17561790
input CancelQuoteRequest {

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnit.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.commercetools.api.models.common.BaseResource;
1414
import com.commercetools.api.models.common.CreatedBy;
1515
import com.commercetools.api.models.common.LastModifiedBy;
16+
import com.commercetools.api.models.customer.CustomerGroupAssignment;
1617
import com.commercetools.api.models.store.StoreKeyReference;
1718
import com.commercetools.api.models.type.CustomFields;
1819
import com.fasterxml.jackson.annotation.*;
@@ -175,6 +176,15 @@ public interface BusinessUnit extends BaseResource, com.commercetools.api.models
175176
@JsonProperty("custom")
176177
public CustomFields getCustom();
177178

179+
/**
180+
* <p>Customer Groups assigned to the Business Unit.</p>
181+
* <p>They are considered during <span>line Item price selection</span>, if provided (non-null).</p>
182+
* @return customerGroupAssignments
183+
*/
184+
@Valid
185+
@JsonProperty("customerGroupAssignments")
186+
public List<CustomerGroupAssignment> getCustomerGroupAssignments();
187+
178188
/**
179189
* <p>Addresses used by the Business Unit.</p>
180190
* @return addresses
@@ -384,6 +394,23 @@ public interface BusinessUnit extends BaseResource, com.commercetools.api.models
384394

385395
public void setCustom(final CustomFields custom);
386396

397+
/**
398+
* <p>Customer Groups assigned to the Business Unit.</p>
399+
* <p>They are considered during <span>line Item price selection</span>, if provided (non-null).</p>
400+
* @param customerGroupAssignments values to be set
401+
*/
402+
403+
@JsonIgnore
404+
public void setCustomerGroupAssignments(final CustomerGroupAssignment... customerGroupAssignments);
405+
406+
/**
407+
* <p>Customer Groups assigned to the Business Unit.</p>
408+
* <p>They are considered during <span>line Item price selection</span>, if provided (non-null).</p>
409+
* @param customerGroupAssignments values to be set
410+
*/
411+
412+
public void setCustomerGroupAssignments(final List<CustomerGroupAssignment> customerGroupAssignments);
413+
387414
/**
388415
* <p>Addresses used by the Business Unit.</p>
389416
* @param addresses values to be set
@@ -541,6 +568,11 @@ public static BusinessUnit deepCopy(@Nullable final BusinessUnit template) {
541568
instance.setName(template.getName());
542569
instance.setContactEmail(template.getContactEmail());
543570
instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom()));
571+
instance.setCustomerGroupAssignments(Optional.ofNullable(template.getCustomerGroupAssignments())
572+
.map(t -> t.stream()
573+
.map(com.commercetools.api.models.customer.CustomerGroupAssignment::deepCopy)
574+
.collect(Collectors.toList()))
575+
.orElse(null));
544576
instance.setAddresses(Optional.ofNullable(template.getAddresses())
545577
.map(t -> t.stream()
546578
.map(com.commercetools.api.models.common.Address::deepCopy)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
2+
package com.commercetools.api.models.business_unit;
3+
4+
import java.time.*;
5+
import java.util.*;
6+
import java.util.function.Function;
7+
8+
import javax.annotation.Nullable;
9+
10+
import com.commercetools.api.models.customer.CustomerGroupAssignmentDraft;
11+
import com.fasterxml.jackson.annotation.*;
12+
import com.fasterxml.jackson.databind.annotation.*;
13+
14+
import io.vrap.rmf.base.client.utils.Generated;
15+
16+
import jakarta.validation.Valid;
17+
import jakarta.validation.constraints.NotNull;
18+
19+
/**
20+
* <p>Assigns a Customer Group to a Business Unit.</p>
21+
* <p>This action generates the <a href="https://docs.commercetools.com/apis/ctp:api:type:BusinessUnitCustomerGroupAssignmentAddedMessage" rel="nofollow">BusinessUnitCustomerGroupAssignmentAdded</a> Message.</p>
22+
*
23+
* <hr>
24+
* Example to create an instance using the builder pattern
25+
* <div class=code-example>
26+
* <pre><code class='java'>
27+
* BusinessUnitAddCustomerGroupAssignmentAction businessUnitAddCustomerGroupAssignmentAction = BusinessUnitAddCustomerGroupAssignmentAction.builder()
28+
* .customerGroupAssignment(customerGroupAssignmentBuilder -> customerGroupAssignmentBuilder)
29+
* .build()
30+
* </code></pre>
31+
* </div>
32+
*/
33+
@io.vrap.rmf.base.client.utils.json.SubType("addCustomerGroupAssignment")
34+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
35+
@JsonDeserialize(as = BusinessUnitAddCustomerGroupAssignmentActionImpl.class)
36+
public interface BusinessUnitAddCustomerGroupAssignmentAction extends BusinessUnitUpdateAction {
37+
38+
/**
39+
* discriminator value for BusinessUnitAddCustomerGroupAssignmentAction
40+
*/
41+
String ADD_CUSTOMER_GROUP_ASSIGNMENT = "addCustomerGroupAssignment";
42+
43+
/**
44+
* <p>Customer Group to assign the Business Unit to.</p>
45+
* @return customerGroupAssignment
46+
*/
47+
@NotNull
48+
@Valid
49+
@JsonProperty("customerGroupAssignment")
50+
public CustomerGroupAssignmentDraft getCustomerGroupAssignment();
51+
52+
/**
53+
* <p>Customer Group to assign the Business Unit to.</p>
54+
* @param customerGroupAssignment value to be set
55+
*/
56+
57+
public void setCustomerGroupAssignment(final CustomerGroupAssignmentDraft customerGroupAssignment);
58+
59+
/**
60+
* factory method
61+
* @return instance of BusinessUnitAddCustomerGroupAssignmentAction
62+
*/
63+
public static BusinessUnitAddCustomerGroupAssignmentAction of() {
64+
return new BusinessUnitAddCustomerGroupAssignmentActionImpl();
65+
}
66+
67+
/**
68+
* factory method to create a shallow copy BusinessUnitAddCustomerGroupAssignmentAction
69+
* @param template instance to be copied
70+
* @return copy instance
71+
*/
72+
public static BusinessUnitAddCustomerGroupAssignmentAction of(
73+
final BusinessUnitAddCustomerGroupAssignmentAction template) {
74+
BusinessUnitAddCustomerGroupAssignmentActionImpl instance = new BusinessUnitAddCustomerGroupAssignmentActionImpl();
75+
instance.setCustomerGroupAssignment(template.getCustomerGroupAssignment());
76+
return instance;
77+
}
78+
79+
public BusinessUnitAddCustomerGroupAssignmentAction copyDeep();
80+
81+
/**
82+
* factory method to create a deep copy of BusinessUnitAddCustomerGroupAssignmentAction
83+
* @param template instance to be copied
84+
* @return copy instance
85+
*/
86+
@Nullable
87+
public static BusinessUnitAddCustomerGroupAssignmentAction deepCopy(
88+
@Nullable final BusinessUnitAddCustomerGroupAssignmentAction template) {
89+
if (template == null) {
90+
return null;
91+
}
92+
BusinessUnitAddCustomerGroupAssignmentActionImpl instance = new BusinessUnitAddCustomerGroupAssignmentActionImpl();
93+
instance.setCustomerGroupAssignment(com.commercetools.api.models.customer.CustomerGroupAssignmentDraft
94+
.deepCopy(template.getCustomerGroupAssignment()));
95+
return instance;
96+
}
97+
98+
/**
99+
* builder factory method for BusinessUnitAddCustomerGroupAssignmentAction
100+
* @return builder
101+
*/
102+
public static BusinessUnitAddCustomerGroupAssignmentActionBuilder builder() {
103+
return BusinessUnitAddCustomerGroupAssignmentActionBuilder.of();
104+
}
105+
106+
/**
107+
* create builder for BusinessUnitAddCustomerGroupAssignmentAction instance
108+
* @param template instance with prefilled values for the builder
109+
* @return builder
110+
*/
111+
public static BusinessUnitAddCustomerGroupAssignmentActionBuilder builder(
112+
final BusinessUnitAddCustomerGroupAssignmentAction template) {
113+
return BusinessUnitAddCustomerGroupAssignmentActionBuilder.of(template);
114+
}
115+
116+
/**
117+
* accessor map function
118+
* @param <T> mapped type
119+
* @param helper function to map the object
120+
* @return mapped value
121+
*/
122+
default <T> T withBusinessUnitAddCustomerGroupAssignmentAction(
123+
Function<BusinessUnitAddCustomerGroupAssignmentAction, T> helper) {
124+
return helper.apply(this);
125+
}
126+
127+
/**
128+
* gives a TypeReference for usage with Jackson DataBind
129+
* @return TypeReference
130+
*/
131+
public static com.fasterxml.jackson.core.type.TypeReference<BusinessUnitAddCustomerGroupAssignmentAction> typeReference() {
132+
return new com.fasterxml.jackson.core.type.TypeReference<BusinessUnitAddCustomerGroupAssignmentAction>() {
133+
@Override
134+
public String toString() {
135+
return "TypeReference<BusinessUnitAddCustomerGroupAssignmentAction>";
136+
}
137+
};
138+
}
139+
}

0 commit comments

Comments
 (0)