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 Feb 12, 2025
1 parent 5891e93 commit a2fc551
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 24 deletions.
26 changes: 17 additions & 9 deletions lib/commercetools-api/docs/RequestBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,10 @@ $request = $builder
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->orders()->orderQuote()->post(null)`

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.

Creates an Order from a [Quote](ctp:api:type:Quote) in a [BusinessUnit](ctp:api:type:BusinessUnit).

The Quote must reference the same Business Unit as the `businessUnitKey` path parameter, must have the `Pending` [state](ctp:api:type:QuoteState), and must be valid (not past the `validTo` date). If these criteria are not met, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.

Specific Error Codes:

Expand Down Expand Up @@ -5326,12 +5328,14 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->orders()->orderQuote()->post(null)`

Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.

Creates an Order from a [Quote](ctp:api:type:Quote) in a [Store](ctp:api:type:Store). The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.

Produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.

Specific Error Codes:

- [OutOfStock](ctp:api:type:OutOfStockError)
- [PriceChanged](ctp:api:type:PriceChangedError)
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
- [InvalidOperation](ctp:api:type:InvalidOperationError)
- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
Expand Down Expand Up @@ -7154,14 +7158,16 @@ $request = $builder
```
## `withProjectKey("projectKey")->me()->orders()->orderQuote()->post(null)`

When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyQuotes` [Permission](ctp:api:type:Permission).

Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
Creates an Order from a [Quote](ctp:api:type:Quote). To create [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyQuotes` [Permission](ctp:api:type:Permission).

The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.

Produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.

Specific Error Codes:

- [OutOfStock](ctp:api:type:OutOfStockError)
- [PriceChanged](ctp:api:type:PriceChangedError)
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
- [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)
Expand Down Expand Up @@ -8309,15 +8315,17 @@ $request = $builder
```
## `withProjectKey("projectKey")->orders()->orderQuote()->post(null)`

Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.

Creates an Order from a Quote. The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.

Produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.

Specific Error Codes:

- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
- [InvalidOperation](ctp:api:type:InvalidOperationError)
- [OutOfStock](ctp:api:type:OutOfStockError)
- [PriceChanged](ctp:api:type:PriceChangedError)


### Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ interface OrderFromQuoteDraft extends JsonObject
public const FIELD_STATE = 'state';

/**
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to the Quote from which the Order is created.
* If the referenced <a href="ctp:api:type:Quote">Quote</a> has expired (<code>validTo</code> check) or its <code>quoteState</code> is <code>Accepted</code>, <code>Declined</code>, or <code>Withdrawn</code>, the Order creation will fail.</p>
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to the Quote from which the Order is created.</p>
* <p>The <a href="ctp:api:type:Quote">Quote</a> must have the <code>Pending</code> <a href="ctp:api:type:QuoteState">state</a> and must be valid (not past the <code>validTo</code> date).</p>
*
* @return null|QuoteResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ final class OrderFromQuoteDraftBuilder implements Builder
private $state;

/**
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to the Quote from which the Order is created.
* If the referenced <a href="ctp:api:type:Quote">Quote</a> has expired (<code>validTo</code> check) or its <code>quoteState</code> is <code>Accepted</code>, <code>Declined</code>, or <code>Withdrawn</code>, the Order creation will fail.</p>
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to the Quote from which the Order is created.</p>
* <p>The <a href="ctp:api:type:Quote">Quote</a> must have the <code>Pending</code> <a href="ctp:api:type:QuoteState">state</a> and must be valid (not past the <code>validTo</code> date).</p>
*
* @return null|QuoteResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function __construct(
}

/**
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to the Quote from which the Order is created.
* If the referenced <a href="ctp:api:type:Quote">Quote</a> has expired (<code>validTo</code> check) or its <code>quoteState</code> is <code>Accepted</code>, <code>Declined</code>, or <code>Withdrawn</code>, the Order creation will fail.</p>
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to the Quote from which the Order is created.</p>
* <p>The <a href="ctp:api:type:Quote">Quote</a> must have the <code>Pending</code> <a href="ctp:api:type:QuoteState">state</a> and must be valid (not past the <code>validTo</code> date).</p>
*
*
* @return null|QuoteResourceIdentifier
Expand Down
2 changes: 1 addition & 1 deletion lib/commercetools-api/src/Models/Quote/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getCustomer();
public function getCustomerGroup();

/**
* <p>Expiration date for the Quote.</p>
* <p>Expiration date for the Quote. Once a Quote expires, it cannot be ordered.</p>
*
* @return null|DateTimeImmutable
Expand Down
2 changes: 1 addition & 1 deletion lib/commercetools-api/src/Models/Quote/QuoteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function getCustomerGroup()
}

/**
* <p>Expiration date for the Quote.</p>
* <p>Expiration date for the Quote. Once a Quote expires, it cannot be ordered.</p>
*
* @return null|DateTimeImmutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface QuoteChangeQuoteStateAction extends QuoteUpdateAction
public const FIELD_QUOTE_STATE = 'quoteState';

/**
* <p>New state to be set for the Quote.</p>
* <p>New state to be set for the Quote, except <code>DeclinedForRenegotiation</code>. The <code>DeclinedForRenegotiation</code> state can be set only when performing a <a href="ctp:api:type:QuoteRequestQuoteRenegotiationAction">renegotiation request</a>.</p>
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class QuoteChangeQuoteStateActionBuilder implements Builder
private $quoteState;

/**
* <p>New state to be set for the Quote.</p>
* <p>New state to be set for the Quote, except <code>DeclinedForRenegotiation</code>. The <code>DeclinedForRenegotiation</code> state can be set only when performing a <a href="ctp:api:type:QuoteRequestQuoteRenegotiationAction">renegotiation request</a>.</p>
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getAction()
}

/**
* <p>New state to be set for the Quote.</p>
* <p>New state to be set for the Quote, except <code>DeclinedForRenegotiation</code>. The <code>DeclinedForRenegotiation</code> state can be set only when performing a <a href="ctp:api:type:QuoteRequestQuoteRenegotiationAction">renegotiation request</a>.</p>
*
*
* @return null|string
Expand Down
2 changes: 1 addition & 1 deletion lib/commercetools-api/src/Models/Quote/QuoteModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public function getCustomerGroup()
}

/**
* <p>Expiration date for the Quote.</p>
* <p>Expiration date for the Quote. Once a Quote expires, it cannot be ordered.</p>
*
*
* @return null|DateTimeImmutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function getQuoteRequest();
public function getQuotationCart();

/**
* <p>Expiration date for the Quote.</p>
* <p>Expiration date for the Quote. Once a Quote expires, it cannot be ordered.</p>
*
* @return null|DateTimeImmutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function getQuotationCart()
}

/**
* <p>Expiration date for the Quote.</p>
* <p>Expiration date for the Quote. Once a Quote expires, it cannot be ordered.</p>
*
* @return null|DateTimeImmutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function getQuotationCart()
}

/**
* <p>Expiration date for the Quote.</p>
* <p>Expiration date for the Quote. Once a Quote expires, it cannot be ordered.</p>
*
*
* @return null|DateTimeImmutable
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,4 @@ b71e64cba7a81b26a5892daca52a9715fd32c05f
159b6f682f761a18daea978cdb2760e7713e0000
f9fa3e30e9bc44b50bdaa5be496b94b37e607a0e
3a34fc63e5128798a8c1c3e426f4775a075d9d62
cf0f702598daf6d644ae327099b96b83f5539dfb

0 comments on commit a2fc551

Please sign in to comment.