Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Mar 14, 2024
1 parent 0a5047d commit c0c3333
Show file tree
Hide file tree
Showing 25 changed files with 339 additions and 66 deletions.
7 changes: 7 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,10 @@
- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring`
</details>


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

- added property `taxPortions` to type `TaxedItemPrice`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -2978,19 +2978,6 @@ input CreateProductSelectionDraft {
custom: CustomFieldsDraft
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
input ProductTailoringDraft {
product: ResourceIdentifierInput!
name: [LocalizedStringItemInputType!]
key: String
description: [LocalizedStringItemInputType!]
slug: [LocalizedStringItemInputType!]
metaTitle: [LocalizedStringItemInputType!]
metaDescription: [LocalizedStringItemInputType!]
metaKeywords: [LocalizedStringItemInputType!]
publish: Boolean
}

input CreateStandalonePrice {
key: String
sku: String!
Expand Down Expand Up @@ -4392,6 +4379,51 @@ input GoogleCloudPubSubDestinationInput {
topic: String!
}

interface HasProductTailoringData {
name(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
nameAllLocales: [LocalizedString!]
description(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
descriptionAllLocales: [LocalizedString!]
slug(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
slugAllLocales: [LocalizedString!]
metaTitle(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
metaTitleAllLocales: [LocalizedString!]
metaDescription(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
metaDescriptionAllLocales: [LocalizedString!]
metaKeywords(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
metaKeywordsAllLocales: [LocalizedString!]
}

type HighPrecisionMoney implements BaseMoney {
type: String!
currencyCode: Currency!
Expand Down Expand Up @@ -5958,9 +5990,7 @@ type Mutation {
id: String,

"Queries with specified key"
key: String,

actions: [ProductTailoringUpdateAction!]!, version: Long!): ProductTailoring
key: String, actions: [ProductTailoringUpdateAction!]!, version: Long!): ProductTailoring

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
deleteProductTailoring(
Expand Down Expand Up @@ -6755,8 +6785,8 @@ type OrderLineItemDiscountSet implements MessagePayload & OrderMessagePayload {
lineItemKey: String
discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]!
totalPrice: Money!
taxedPrice: TaxedItemPrice
taxedPricePortions: [MethodTaxedPrice!]!
taxedPrice: TaxedItemPrice
type: String!
}

Expand All @@ -6775,9 +6805,9 @@ type OrderLineItemRemoved implements MessagePayload & OrderMessagePayload {
newQuantity: Long!
newState: Set!
newTotalPrice: Money!
newTaxedPrice: TaxedItemPrice
newPrice: ProductPrice
newShippingDetails: ItemShippingDetails
newTaxedPrice: TaxedItemPrice
type: String!
}

Expand Down Expand Up @@ -7621,6 +7651,7 @@ type ProductImageAdded implements MessagePayload {
type ProductLimitsProjection {
pricesPerVariant: Limit!
variants: Limit!
productTailoring: Limit!
}

type ProductOfSelection {
Expand Down Expand Up @@ -8167,38 +8198,59 @@ type ProductTailoring implements Versioned {
lastModifiedBy: Initiator
}

type ProductTailoringCreated implements MessagePayload {
publish: Boolean!
type ProductTailoringCreated implements MessagePayload & HasProductTailoringData {
type: String!
storeRef: KeyReference!
productRef: Reference!
key: String
productKey: String
publish: Boolean!
name(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
nameAllLocales: [LocalizedString!]
description(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
descriptionAllLocales: [LocalizedString!]
slug(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
nameAllLocales: [LocalizedString!]
slugAllLocales: [LocalizedString!]
descriptionAllLocales: [LocalizedString!]
type: String!
metaTitle(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
metaTitleAllLocales: [LocalizedString!]
metaDescription(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
metaDescriptionAllLocales: [LocalizedString!]
metaKeywords(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,

"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
metaKeywordsAllLocales: [LocalizedString!]
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type ProductTailoringData {
type ProductTailoringData implements HasProductTailoringData {
name(
"String is defined for different locales. This argument specifies the desired locale."
locale: Locale,
Expand Down Expand Up @@ -8271,6 +8323,19 @@ type ProductTailoringDescriptionSet implements MessagePayload {
type: String!
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
input ProductTailoringDraft {
product: ResourceIdentifierInput!
name: [LocalizedStringItemInputType!]
key: String
description: [LocalizedStringItemInputType!]
slug: [LocalizedStringItemInputType!]
metaTitle: [LocalizedStringItemInputType!]
metaDescription: [LocalizedStringItemInputType!]
metaKeywords: [LocalizedStringItemInputType!]
publish: Boolean
}

type ProductTailoringNameSet implements MessagePayload {
storeRef: KeyReference!
productRef: Reference!
Expand Down Expand Up @@ -8303,8 +8368,6 @@ type ProductTailoringQueryResult {
offset: Int!
count: Int!
total: Long!

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
exists: Boolean!
results: [ProductTailoring!]!
}
Expand Down Expand Up @@ -8659,13 +8722,13 @@ input ProjectSettingsUpdateAction {
changeMyBusinessUnitStatusOnCreation: ChangeProjectSettingsMyBusinessUnitStatusOnCreation
changeName: ChangeProjectSettingsName
changeOrderSearchStatus: ChangeProjectSettingsOrderSearchStatus
changeProductSearchIndexingEnabled: ChangeProjectSettingsProductSearchIndexingEnabled
changeShoppingListsConfiguration: ChangeProjectSettingsShoppingListsConfiguration
setExternalOAuth: SetProjectSettingsExternalOAuth
setShippingRateInputType: SetProjectSettingsShippingRateInputType

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
setMyBusinessUnitAssociateRoleOnCreation: SetProjectSettingsMyBusinessUnitAssociateRoleOnCreation
changeProductSearchIndexingEnabled: ChangeProjectSettingsProductSearchIndexingEnabled
}

input PublishProduct {
Expand Down Expand Up @@ -8778,7 +8841,7 @@ type Query {
"Queries with specified key"
key: String): CartDiscount
cartDiscounts(where: String, sort: [String!], limit: Int, offset: Int): CartDiscountQueryResult!
discountCode(
discountCode(
"Queries with specified ID"
id: String,

Expand Down Expand Up @@ -12604,12 +12667,12 @@ type ShippingInfo {
taxRate: TaxRate
deliveries: [Delivery!]!
discountedPrice: DiscountedLineItemPrice
taxedPrice: TaxedItemPrice
shippingMethodState: ShippingMethodState!
shippingMethod: ShippingMethod
shippingMethodRef: Reference
taxCategory: TaxCategory
taxCategoryRef: Reference
taxedPrice: TaxedItemPrice
}

input ShippingInfoImportDraft {
Expand Down Expand Up @@ -13832,6 +13895,7 @@ input TaxRateInput {
type TaxedItemPrice {
totalNet: Money!
totalGross: Money!
taxPortions: [TaxPortion!]!
totalTax: Money
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.time.*;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

import javax.annotation.Nullable;
import javax.validation.Valid;
Expand All @@ -25,6 +26,7 @@
* TaxedItemPrice taxedItemPrice = TaxedItemPrice.builder()
* .totalNet(totalNetBuilder -> totalNetBuilder)
* .totalGross(totalGrossBuilder -> totalGrossBuilder)
* .plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
* .build()
* </code></pre>
* </div>
Expand All @@ -51,6 +53,16 @@ public interface TaxedItemPrice {
@JsonProperty("totalGross")
public CentPrecisionMoney getTotalGross();

/**
* <p>Taxable portions added to the total net price.</p>
* <p>Calculated from the TaxRates.</p>
* @return taxPortions
*/
@NotNull
@Valid
@JsonProperty("taxPortions")
public List<TaxPortion> getTaxPortions();

/**
* <p>Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the <code>totalGross</code> and <code>totalNet</code> values.</p>
* @return totalTax
Expand All @@ -73,6 +85,23 @@ public interface TaxedItemPrice {

public void setTotalGross(final CentPrecisionMoney totalGross);

/**
* <p>Taxable portions added to the total net price.</p>
* <p>Calculated from the TaxRates.</p>
* @param taxPortions values to be set
*/

@JsonIgnore
public void setTaxPortions(final TaxPortion... taxPortions);

/**
* <p>Taxable portions added to the total net price.</p>
* <p>Calculated from the TaxRates.</p>
* @param taxPortions values to be set
*/

public void setTaxPortions(final List<TaxPortion> taxPortions);

/**
* <p>Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the <code>totalGross</code> and <code>totalNet</code> values.</p>
* @param totalTax value to be set
Expand All @@ -97,6 +126,7 @@ public static TaxedItemPrice of(final TaxedItemPrice template) {
TaxedItemPriceImpl instance = new TaxedItemPriceImpl();
instance.setTotalNet(template.getTotalNet());
instance.setTotalGross(template.getTotalGross());
instance.setTaxPortions(template.getTaxPortions());
instance.setTotalTax(template.getTotalTax());
return instance;
}
Expand All @@ -115,6 +145,11 @@ public static TaxedItemPrice deepCopy(@Nullable final TaxedItemPrice template) {
instance.setTotalNet(com.commercetools.api.models.common.CentPrecisionMoney.deepCopy(template.getTotalNet()));
instance.setTotalGross(
com.commercetools.api.models.common.CentPrecisionMoney.deepCopy(template.getTotalGross()));
instance.setTaxPortions(Optional.ofNullable(template.getTaxPortions())
.map(t -> t.stream()
.map(com.commercetools.api.models.cart.TaxPortion::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
instance.setTotalTax(com.commercetools.api.models.common.CentPrecisionMoney.deepCopy(template.getTotalTax()));
return instance;
}
Expand Down
Loading

0 comments on commit c0c3333

Please sign in to comment.