Skip to content

Commit

Permalink
build(codegen): updating SDK (#753)
Browse files Browse the repository at this point in the history
Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
  • Loading branch information
ct-sdks[bot] authored Jul 9, 2024
1 parent 376ebea commit 8b1c0bf
Show file tree
Hide file tree
Showing 28 changed files with 246 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ export class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnit
* Creates a [Cart](ctp:api:type:Cart) in the [BusinessUnit](ctp:api:type:BusinessUnit) referenced by `businessUnitKey`. As such, the `businessUnit` field on [CartDraft](ctp:api:type:CartDraft) is ignored for this request.
* Creating a Cart can fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) if the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match the Cart.
*
* Specific Error Codes:
*
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export class ByProjectKeyCartsRequestBuilder {
* [ShippingMethod](ctp:api:type:ShippingMethod) referenced in the CartDraft
* has a `predicate` that does not match the Cart.
*
* Specific Error Codes:
*
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ export class ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder {
* When using this endpoint the Cart's `store` field is always set to the [Store](ctp:api:type:Store) specified in the path parameter.
* If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
*
* Specific Error Codes:
*
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
* - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
*
*/
public post(methodArgs: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder {
*
* The `store` field in the created [Cart](ctp:api:type:Cart) is set to the Store specified by the `storeKey` path parameter.
*
* Specific Error Codes: [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
* Specific Error Codes:
*
* - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ export class ByProjectKeyMeCartsRequestBuilder {
/**
* Creates a Cart for a given `customerId` or `anonymousId`.
*
* Specific Error Codes:
*
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyLoginRequestBuilder {
/**
* Authenticates a Customer associated with a [Store](ctp:api:type:Store). For more information, see [Global versus Store-specific Customers](/../api/customers-overview#global-versus-store-specific-customers).
*
* A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
* Triggers [Cart merge during sign-in](/../api/customers-overview#cart-merge-during-sign-in).
*
* If the Customer exists in the Project but the `stores` field references a different [Store](ctp:api:type:Store), this method returns an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeLoginRequestBuilder {
* - If the Customer does not have a Cart, the most recently modified anonymous cart becomes the Customer's Cart.
* - If the Customer already has a Cart, the most recently modified anonymous cart is handled according to [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode).
*
* If a Cart is returned as part of [CustomerSignInResult](ctp:api:type:CustomerSignInResult), it has been [recalculated](ctp:api:type:MyCartRecalculateAction) with up-to-date prices, taxes, discounts, and invalid line items removed.
* A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
* If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export class ByProjectKeyLoginRequestBuilder {
*
* Triggers [Cart merge during sign-in](/../api/customers-overview#cart-merge-during-sign-in).
*
* A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
* If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ByProjectKeyMeLoginRequestBuilder {
* - If the Customer does not have a Cart yet, the most recently modified anonymous cart becomes the Customer's Cart.
* - If the Customer already has a Cart, the most recently modified anonymous cart is handled in accordance with [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode).
*
* A Cart returned as part of the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) is [recalculated](ctp:api:type:MyCartRecalculateAction) with up-to-date prices, taxes, discounts, and invalid line items removed.
* A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
* If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ export class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnit
* The Cart must have a shipping address set before creating an Order.
* Creating an Order fails with an [InvalidOperation](ctp:api:type:InvalidOperationError) if the Cart does not reference the same BusinessUnit as the `businessUnitKey` path parameter.
*
* Specific Error Codes:
*
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [OutOfStock](ctp:api:type:OutOfStockError)
* - [PriceChanged](ctp:api:type:PriceChangedError)
* - [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeOrdersRequestBuilder {
*
* Specific Error Codes:
*
* - [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)
* - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
* - [OutOfStock](ctp:api:type:OutOfStockError)
* - [PriceChanged](ctp:api:type:PriceChangedError)
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
* - [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)
* - [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError)
*
*/
public post(methodArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export class ByProjectKeyInStoreKeyByStoreKeyOrdersRequestBuilder {
* The shipping address is used for tax calculation for a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode).
*
* Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
*
* If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned.
* If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ export class ByProjectKeyMeOrdersRequestBuilder {
*
* Specific Error Codes:
*
* - [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [OutOfStock](ctp:api:type:OutOfStockError)
* - [PriceChanged](ctp:api:type:PriceChangedError)
* - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
* - [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)
* - [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError)
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnit
* Creates an Order from a [Quote](ctp:api:type:Cart) in a [BusinessUnit](ctp:api:type:BusinessUnit).
* Creating an Order fails with an [InvalidOperation](ctp:api:type:InvalidOperationError) if the Quote does not reference the same BusinessUnit as the `businessUnitKey` path parameter.
*
* Specific Error Codes:
*
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [OutOfStock](ctp:api:type:OutOfStockError)
*
*/
public post(methodArgs: {
body: OrderFromQuoteDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export class ByProjectKeyOrdersQuotesRequestBuilder {
*
* Specific Error Codes:
*
* - [OutOfStock](ctp:api:type:OutOfStockError)
* - [PriceChanged](ctp:api:type:PriceChangedError)
* - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
* - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
* - [InvalidOperation](ctp:api:type:InvalidOperationError)
* - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
* - [OutOfStock](ctp:api:type:OutOfStockError)
* - [PriceChanged](ctp:api:type:PriceChangedError)
*
*/
public post(methodArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnit
*
* If the Cart exists in the [Project](ctp:api:type:Project) but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
*
* Specific Error Codes:
*
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
body: ReplicaCartDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export class ByProjectKeyCartsReplicateRequestBuilder {
*
* The new Cart does not contain Payments or Deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
*
* Specific Error Codes:
*
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
body: ReplicaCartDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export class ByProjectKeyInStoreKeyByStoreKeyCartsReplicateRequestBuilder {
*
* The new Cart does not contain payments or deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
*
* Specific Error Codes:
*
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
body: ReplicaCartDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export class ByProjectKeyMeCartsReplicateRequestBuilder {
*
* If the Cart or Order to be replicated does not belong to the authenticated Customer, the API returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error
*
* Specific Error Codes:
*
* - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
* - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
*
*/
public post(methodArgs: {
body: ReplicaMyCartDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeSignupRequestBuilder {
/**
* If omitted in the request body, the [Customer](ctp:api:type:Customer) `stores` field is set to the [Store](ctp:api:type:Store) specified in the path parameter.
*
* A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
* Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message.
*
*/
Expand Down
12 changes: 8 additions & 4 deletions packages/platform-sdk/src/generated/models/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ export interface CartChangeTaxRoundingModeAction {
}
/**
* Changes the [CartState](ctp:api:type:CartState) from `Active` to `Frozen`. Results in a [Frozen Cart](ctp:api:type:FrozenCarts).
* Fails with [InvalidOperation](ctp:api:type:InvalidOperation) error when the Cart is empty.
* Fails with [InvalidOperation](ctp:api:type:InvalidOperationError) error when the Cart is empty.
*
*/
export interface CartFreezeCartAction {
Expand Down Expand Up @@ -2756,6 +2756,10 @@ export interface CartRemoveShippingMethodAction {
*/
readonly shippingKey: string
}
/**
* If the Cart is already associated with a Customer, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
*
*/
export interface CartSetAnonymousIdAction {
readonly action: 'setAnonymousId'
/**
Expand Down Expand Up @@ -3083,10 +3087,10 @@ export interface CartSetCustomerEmailAction {
readonly email?: string
}
/**
* This update action can only be used if a Customer is not assigned to a Cart.
* If a Customer is already assigned, the Cart has the same Customer Group as the assigned Customer.
* This update action can only be used if a Customer is not assigned to the Cart.
* If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.
*
* Setting the Customer Group also updates the [LineItem](ctp:api:type:LineItem) `prices` according to the Customer Group.
* To reflect the new Customer Group, this update action can result in [updates to the Cart](/api/carts-orders-overview#cart-updates). When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
*/
export interface CartSetCustomerGroupAction {
Expand Down
2 changes: 2 additions & 0 deletions packages/platform-sdk/src/generated/models/customer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,8 @@ export interface CustomerSetCustomTypeAction {
/**
* Setting the Customer Group of the Customer produces the [CustomerGroupSet](ctp:api:type:CustomerGroupSetMessage) Message.
*
* To reflect the new Customer Group, this update action can result in [updates](/api/carts-orders-overview#cart-updates) to the most recently modified active Cart. When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
*
*/
export interface CustomerSetCustomerGroupAction {
readonly action: 'setCustomerGroup'
Expand Down
Loading

0 comments on commit 8b1c0bf

Please sign in to comment.