Skip to content

Commit

Permalink
TASK: Updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Oct 12, 2023
1 parent 7ccc2dc commit 6432569
Show file tree
Hide file tree
Showing 284 changed files with 1,516 additions and 712 deletions.
25 changes: 8 additions & 17 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
**Api changes**

<details>
<summary>Changed MethodResponseBody(s)</summary>
<summary>Added Enum(s)</summary>

- :warning: changed response body for `200: application/json` of method `get /{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-rules` from type `<<resourceQueryType>>` to `ApprovalRulePagedQueryResponse`
- :warning: changed response body for `200: application/json` of method `get /{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/approval-flows` from type `<<resourceQueryType>>` to `ApprovalFlowPagedQueryResponse`
- added enum `customer-email-token` to type `ReferenceTypeId`
- added enum `customer-password-token` to type `ReferenceTypeId`
- added enum `customer-email-token` to type `MessageSubscriptionResourceTypeId`
- added enum `customer-group` to type `MessageSubscriptionResourceTypeId`
- added enum `customer-password-token` to type `MessageSubscriptionResourceTypeId`
</details>


<details>
<summary>Added Type(s)</summary>

- added type `ApprovalFlowPagedQueryResponse`
- added type `ApprovalRulePagedQueryResponse`
- added type `CustomerEmailTokenCreatedMessage`
- added type `CustomerPasswordTokenCreatedMessage`
- added type `CustomerEmailTokenCreatedMessagePayload`
- added type `CustomerPasswordTokenCreatedMessagePayload`
</details>

**Import changes**

<details>
<summary>Added Property(s)</summary>

- added property `product` to type `ProductVariantPatch`
- added type `CustomerEmailTokenReference`
- added type `CustomerPasswordTokenReference`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import com.commercetools.api.models.category.CategoryReference;
import com.commercetools.api.models.channel.ChannelReference;
import com.commercetools.api.models.custom_object.CustomObjectReference;
import com.commercetools.api.models.customer.CustomerEmailTokenReference;
import com.commercetools.api.models.customer.CustomerPasswordTokenReference;
import com.commercetools.api.models.customer.CustomerReference;
import com.commercetools.api.models.customer_group.CustomerGroupReference;
import com.commercetools.api.models.discount_code.DiscountCodeReference;
Expand Down Expand Up @@ -67,7 +69,9 @@
@JsonSubTypes.Type(value = com.commercetools.api.models.category.CategoryReferenceImpl.class, name = CategoryReference.CATEGORY),
@JsonSubTypes.Type(value = com.commercetools.api.models.channel.ChannelReferenceImpl.class, name = ChannelReference.CHANNEL),
@JsonSubTypes.Type(value = com.commercetools.api.models.custom_object.CustomObjectReferenceImpl.class, name = CustomObjectReference.KEY_VALUE_DOCUMENT),
@JsonSubTypes.Type(value = com.commercetools.api.models.customer.CustomerEmailTokenReferenceImpl.class, name = CustomerEmailTokenReference.CUSTOMER_EMAIL_TOKEN),
@JsonSubTypes.Type(value = com.commercetools.api.models.customer_group.CustomerGroupReferenceImpl.class, name = CustomerGroupReference.CUSTOMER_GROUP),
@JsonSubTypes.Type(value = com.commercetools.api.models.customer.CustomerPasswordTokenReferenceImpl.class, name = CustomerPasswordTokenReference.CUSTOMER_PASSWORD_TOKEN),
@JsonSubTypes.Type(value = com.commercetools.api.models.customer.CustomerReferenceImpl.class, name = CustomerReference.CUSTOMER),
@JsonSubTypes.Type(value = com.commercetools.api.models.cart.DirectDiscountReferenceImpl.class, name = DirectDiscountReference.DIRECT_DISCOUNT),
@JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeReferenceImpl.class, name = DiscountCodeReference.DISCOUNT_CODE),
Expand Down Expand Up @@ -161,10 +165,18 @@ public static Reference deepCopy(@Nullable final Reference template) {
return com.commercetools.api.models.custom_object.CustomObjectReference
.deepCopy((com.commercetools.api.models.custom_object.CustomObjectReference) template);
}
if (template instanceof com.commercetools.api.models.customer.CustomerEmailTokenReference) {
return com.commercetools.api.models.customer.CustomerEmailTokenReference
.deepCopy((com.commercetools.api.models.customer.CustomerEmailTokenReference) template);
}
if (template instanceof com.commercetools.api.models.customer_group.CustomerGroupReference) {
return com.commercetools.api.models.customer_group.CustomerGroupReference
.deepCopy((com.commercetools.api.models.customer_group.CustomerGroupReference) template);
}
if (template instanceof com.commercetools.api.models.customer.CustomerPasswordTokenReference) {
return com.commercetools.api.models.customer.CustomerPasswordTokenReference
.deepCopy((com.commercetools.api.models.customer.CustomerPasswordTokenReference) template);
}
if (template instanceof com.commercetools.api.models.customer.CustomerReference) {
return com.commercetools.api.models.customer.CustomerReference
.deepCopy((com.commercetools.api.models.customer.CustomerReference) template);
Expand Down Expand Up @@ -326,6 +338,14 @@ public static com.commercetools.api.models.custom_object.CustomObjectReferenceBu
return com.commercetools.api.models.custom_object.CustomObjectReferenceBuilder.of();
}

/**
* builder for customerEmailToken subtype
* @return builder
*/
public static com.commercetools.api.models.customer.CustomerEmailTokenReferenceBuilder customerEmailTokenBuilder() {
return com.commercetools.api.models.customer.CustomerEmailTokenReferenceBuilder.of();
}

/**
* builder for customerGroup subtype
* @return builder
Expand All @@ -334,6 +354,14 @@ public static com.commercetools.api.models.customer_group.CustomerGroupReference
return com.commercetools.api.models.customer_group.CustomerGroupReferenceBuilder.of();
}

/**
* builder for customerPasswordToken subtype
* @return builder
*/
public static com.commercetools.api.models.customer.CustomerPasswordTokenReferenceBuilder customerPasswordTokenBuilder() {
return com.commercetools.api.models.customer.CustomerPasswordTokenReferenceBuilder.of();
}

/**
* builder for customer subtype
* @return builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ public com.commercetools.api.models.custom_object.CustomObjectReferenceBuilder k
return com.commercetools.api.models.custom_object.CustomObjectReferenceBuilder.of();
}

public com.commercetools.api.models.customer.CustomerEmailTokenReferenceBuilder customerEmailTokenBuilder() {
return com.commercetools.api.models.customer.CustomerEmailTokenReferenceBuilder.of();
}

public com.commercetools.api.models.customer_group.CustomerGroupReferenceBuilder customerGroupBuilder() {
return com.commercetools.api.models.customer_group.CustomerGroupReferenceBuilder.of();
}

public com.commercetools.api.models.customer.CustomerPasswordTokenReferenceBuilder customerPasswordTokenBuilder() {
return com.commercetools.api.models.customer.CustomerPasswordTokenReferenceBuilder.of();
}

public com.commercetools.api.models.customer.CustomerReferenceBuilder customerBuilder() {
return com.commercetools.api.models.customer.CustomerReferenceBuilder.of();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,21 @@ public interface ReferenceTypeId extends JsonEnum {
*/
ReferenceTypeId CUSTOMER = ReferenceTypeIdEnum.CUSTOMER;
/**
<p>References a <a href="ctp:api:type:CustomerToken">CustomerToken</a> for <a href="/../api/projects/customers#email-verification-of-customer">email verification</a>.</p>
*/
ReferenceTypeId CUSTOMER_EMAIL_TOKEN = ReferenceTypeIdEnum.CUSTOMER_EMAIL_TOKEN;
/**
<p>References a <a href="ctp:api:type:CustomerGroup">CustomerGroup</a>.</p>
*/
ReferenceTypeId CUSTOMER_GROUP = ReferenceTypeIdEnum.CUSTOMER_GROUP;
/**
<p>References a <a href="ctp:api:type:CustomerToken">CustomerToken</a> for <a href="/../api/projects/customers#password-reset-of-customer">password reset</a>.</p>
*/
ReferenceTypeId CUSTOMER_PASSWORD_TOKEN = ReferenceTypeIdEnum.CUSTOMER_PASSWORD_TOKEN;
/**
<p>References a <a href="ctp:api:type:DirectDiscount">DirectDiscount</a>.</p>
Expand Down Expand Up @@ -236,11 +246,21 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId {
*/
CUSTOMER("customer"),

/**
* customer-email-token
*/
CUSTOMER_EMAIL_TOKEN("customer-email-token"),

/**
* customer-group
*/
CUSTOMER_GROUP("customer-group"),

/**
* customer-password-token
*/
CUSTOMER_PASSWORD_TOKEN("customer-password-token"),

/**
* direct-discount
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@

package com.commercetools.api.models.customer;

import java.time.*;
import java.util.*;
import java.util.function.Function;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;

import com.commercetools.api.models.common.Reference;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

import io.vrap.rmf.base.client.utils.Generated;

/**
* <p>Reference to a CustomerToken for email verification.</p>
*
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* CustomerEmailTokenReference customerEmailTokenReference = CustomerEmailTokenReference.builder()
* .id("{id}")
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@JsonDeserialize(as = CustomerEmailTokenReferenceImpl.class)
public interface CustomerEmailTokenReference extends Reference {

/**
* discriminator value for CustomerEmailTokenReference
*/
String CUSTOMER_EMAIL_TOKEN = "customer-email-token";

/**
* <p>Unique identifier of the referenced CustomerToken.</p>
* @return id
*/
@NotNull
@JsonProperty("id")
public String getId();

/**
* <p>Unique identifier of the referenced CustomerToken.</p>
* @param id value to be set
*/

public void setId(final String id);

/**
* factory method
* @return instance of CustomerEmailTokenReference
*/
public static CustomerEmailTokenReference of() {
return new CustomerEmailTokenReferenceImpl();
}

/**
* factory method to create a shallow copy CustomerEmailTokenReference
* @param template instance to be copied
* @return copy instance
*/
public static CustomerEmailTokenReference of(final CustomerEmailTokenReference template) {
CustomerEmailTokenReferenceImpl instance = new CustomerEmailTokenReferenceImpl();
instance.setId(template.getId());
return instance;
}

/**
* factory method to create a deep copy of CustomerEmailTokenReference
* @param template instance to be copied
* @return copy instance
*/
@Nullable
public static CustomerEmailTokenReference deepCopy(@Nullable final CustomerEmailTokenReference template) {
if (template == null) {
return null;
}
CustomerEmailTokenReferenceImpl instance = new CustomerEmailTokenReferenceImpl();
instance.setId(template.getId());
return instance;
}

/**
* builder factory method for CustomerEmailTokenReference
* @return builder
*/
public static CustomerEmailTokenReferenceBuilder builder() {
return CustomerEmailTokenReferenceBuilder.of();
}

/**
* create builder for CustomerEmailTokenReference instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static CustomerEmailTokenReferenceBuilder builder(final CustomerEmailTokenReference template) {
return CustomerEmailTokenReferenceBuilder.of(template);
}

/**
* accessor map function
* @param <T> mapped type
* @param helper function to map the object
* @return mapped value
*/
default <T> T withCustomerEmailTokenReference(Function<CustomerEmailTokenReference, T> helper) {
return helper.apply(this);
}

/**
* gives a TypeReference for usage with Jackson DataBind
* @return TypeReference
*/
public static com.fasterxml.jackson.core.type.TypeReference<CustomerEmailTokenReference> typeReference() {
return new com.fasterxml.jackson.core.type.TypeReference<CustomerEmailTokenReference>() {
@Override
public String toString() {
return "TypeReference<CustomerEmailTokenReference>";
}
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

package com.commercetools.api.models.customer;

import java.util.*;

import io.vrap.rmf.base.client.Builder;
import io.vrap.rmf.base.client.utils.Generated;

/**
* CustomerEmailTokenReferenceBuilder
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* CustomerEmailTokenReference customerEmailTokenReference = CustomerEmailTokenReference.builder()
* .id("{id}")
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class CustomerEmailTokenReferenceBuilder implements Builder<CustomerEmailTokenReference> {

private String id;

/**
* <p>Unique identifier of the referenced CustomerToken.</p>
* @param id value to be set
* @return Builder
*/

public CustomerEmailTokenReferenceBuilder id(final String id) {
this.id = id;
return this;
}

/**
* <p>Unique identifier of the referenced CustomerToken.</p>
* @return id
*/

public String getId() {
return this.id;
}

/**
* builds CustomerEmailTokenReference with checking for non-null required values
* @return CustomerEmailTokenReference
*/
public CustomerEmailTokenReference build() {
Objects.requireNonNull(id, CustomerEmailTokenReference.class + ": id is missing");
return new CustomerEmailTokenReferenceImpl(id);
}

/**
* builds CustomerEmailTokenReference without checking for non-null required values
* @return CustomerEmailTokenReference
*/
public CustomerEmailTokenReference buildUnchecked() {
return new CustomerEmailTokenReferenceImpl(id);
}

/**
* factory method for an instance of CustomerEmailTokenReferenceBuilder
* @return builder
*/
public static CustomerEmailTokenReferenceBuilder of() {
return new CustomerEmailTokenReferenceBuilder();
}

/**
* create builder for CustomerEmailTokenReference instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static CustomerEmailTokenReferenceBuilder of(final CustomerEmailTokenReference template) {
CustomerEmailTokenReferenceBuilder builder = new CustomerEmailTokenReferenceBuilder();
builder.id = template.getId();
return builder;
}

}
Loading

0 comments on commit 6432569

Please sign in to comment.