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 Jun 12, 2024
1 parent 101a31e commit d490518
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder {
}

/**
* Queries carts in a specific [Store](ctp:api:type:Store).
* Queries Carts in a specific [Store](ctp:api:type:Store).
*/
public get(methodArgs?: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder {
baseUri?: string
}
) {}
/**
* Returns a Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
* If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public get(methodArgs?: {
queryArgs?: {
expand?: string | string[]
Expand All @@ -44,9 +52,6 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder {
this.args.executeRequest
)
}
/**
* Checks ifa My Cart exists for a given `id`. Returns a `200 OK` status if the My Cart exists or a `404 Not Found` otherwise.
*/
public head(methodArgs?: {
headers?: {
[key: string]: string | string[]
Expand All @@ -66,7 +71,11 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder {
)
}
/**
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* Updates the Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
* If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public post(methodArgs: {
Expand Down Expand Up @@ -95,6 +104,14 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder {
this.args.executeRequest
)
}
/**
* Deletes the Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
* If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public delete(methodArgs: {
queryArgs: {
version: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder {
})
}

/**
* Returns all Carts that match a given Query Predicate and contain either a matching `customerId` or `anonymousId` in a Store.
*
*/
public get(methodArgs?: {
queryArgs?: {
expand?: string | string[]
Expand Down Expand Up @@ -63,7 +67,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder {
)
}
/**
* Checks if a Cart exists for a given Query Predicate. Returns a `200 OK` status if any Carts match the Query Predicate or a `404 Not Found` otherwise.
* Checks if a Cart exists for a Store that matches the given Query Predicate, and contains a matching `customerId` or `anonymousId`. Returns a `200 OK` status if any Carts match these conditions, or a `404 Not Found` otherwise.
*
*/
public head(methodArgs?: {
queryArgs?: {
Expand All @@ -89,6 +94,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder {
)
}
/**
* Creates a Cart in the specified Store for a given `customerId` or `anonymousId`.
*
* 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export class ByProjectKeyMeCartsByIDRequestBuilder {
baseUri?: string
}
) {}
/**
* Returns a Cart for a given `id`. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public get(methodArgs?: {
queryArgs?: {
expand?: string | string[]
Expand All @@ -44,7 +50,10 @@ export class ByProjectKeyMeCartsByIDRequestBuilder {
)
}
/**
* Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise.
* Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists, or a `404 Not Found` otherwise.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public head(methodArgs?: {
headers?: {
Expand All @@ -64,6 +73,12 @@ export class ByProjectKeyMeCartsByIDRequestBuilder {
this.args.executeRequest
)
}
/**
* Updates the Cart for a given `id`. Returns a `200 OK` status if the Cart exists, or a `404 Not Found` otherwise.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public post(methodArgs: {
queryArgs?: {
expand?: string | string[]
Expand All @@ -90,6 +105,12 @@ export class ByProjectKeyMeCartsByIDRequestBuilder {
this.args.executeRequest
)
}
/**
* Deletes the Cart for a given `id`. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
* If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
public delete(methodArgs: {
queryArgs: {
version: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export class ByProjectKeyMeCartsRequestBuilder {
})
}

/**
* Returns all Carts that match a given Query Predicate and contain either a matching `customerId` or `anonymousId`.
*
*/
public get(methodArgs?: {
queryArgs?: {
expand?: string | string[]
Expand Down Expand Up @@ -85,7 +89,8 @@ export class ByProjectKeyMeCartsRequestBuilder {
)
}
/**
* Checks if a Cart exists for a given Query Predicate. Returns a `200 OK` status if any Carts match the Query Predicate or a `404 Not Found` otherwise.
* Checks if a Cart exists that matches a given Query Predicate and contains either a matching `customerId` or `anonymousId`. Returns a `200 OK` status if the Cart exists, or a `404 Not Found` otherwise.
*
*/
public head(methodArgs?: {
queryArgs?: {
Expand All @@ -110,6 +115,10 @@ export class ByProjectKeyMeCartsRequestBuilder {
this.args.executeRequest
)
}
/**
* Creates a Cart for a given `customerId` or `anonymousId`.
*
*/
public post(methodArgs: {
queryArgs?: {
expand?: string | string[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ByProjectKeyMeCartsReplicateRequestBuilder {
*
* 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`.
*
* In case the Cart or Order to be replicated does not belong to the authenticaed Customer, the API returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error
* 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
*
*/
public post(methodArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ describe('Custom middleware', () => {
}
}
const client = new ClientBuilder()
.withClientCredentialsFlow(authMiddlewareOptions)
.withHttpMiddleware(httpMiddlewareOptionsV3)
.withMiddleware(createMiddleware())
.build()
.withClientCredentialsFlow(authMiddlewareOptions)
.withHttpMiddleware(httpMiddlewareOptionsV3)
.withMiddleware(createMiddleware())
.build()

const apiRootV3 = createApiBuilderFromCtpClient(client).withProjectKey({
projectKey,
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,4 @@ fc9f29f7bfe0e51e1f89d69d7dc0e7674e1b2e30
d83eac0dbaa727c9b21149b44a8635d81e9c183b
8afe41daa313a78d7cdf64bfa93eb23e14a1f206
2273e75a0c1a7108e2303fb345fe33af4fac70b1
e823fd2dd5228a125ad014c7733fb2e33269c734

0 comments on commit d490518

Please sign in to comment.