Skip to content

Commit

Permalink
feat: updated sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
demeyerthom committed Aug 13, 2024
1 parent 4e7fb8f commit c1cf318
Show file tree
Hide file tree
Showing 333 changed files with 12,329 additions and 2,323 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20240813-083004.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Updated SDK to 12-08-2024 version
time: 2024-08-13T08:30:04.437105095+02:00
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ type ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder struct {
}

/**
* Retrieves the Customer's most recently modified active Cart in the Store specified by the `storeKey` path parameter.
* Retrieves the Customer's most recently modified [active Cart](ctp:api:type:CartState) in a Store. Returns a `200 OK` status if successful.
*
* Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
*
* If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists.
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder) Get() *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet {
Expand All @@ -28,7 +32,14 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder) Get() *ByP
}

/**
* Checks if an active Cart exists. Returns a `200 OK` status if an active Cart exists or a `404 Not Found` otherwise.
* Checks if an active Cart exists in a Store. Returns `200 OK` status if successful.
*
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists in a Store.
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
* - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder) Head() *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead {
return &ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet) WithHead
}

/**
* Retrieves the Customer's most recently modified active Cart in the Store specified by the `storeKey` path parameter.
* Retrieves the Customer's most recently modified [active Cart](ctp:api:type:CartState) in a Store. Returns a `200 OK` status if successful.
*
* Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
*
* If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists.
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet) Execute(ctx context.Context) (result *Cart, err error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead) WithHea
}

/**
* Checks if an active Cart exists. Returns a `200 OK` status if an active Cart exists or a `404 Not Found` otherwise.
* Checks if an active Cart exists in a Store. Returns `200 OK` status if successful.
*
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists in a Store.
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
* - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead) Execute(ctx context.Context) error {
queryParams := url.Values{}
Expand Down
16 changes: 13 additions & 3 deletions platform/client_active_cart_by_project_key_me_active_cart.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ type ByProjectKeyMeActiveCartRequestBuilder struct {
}

/**
* Retrieves the Customer's most recently modified active Cart.
* Retrieves the Customer's most recently modified [active Cart](ctp:api:type:CartState). Returns a `200 OK` status if successful.
*
* Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
*
* If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists.
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyMeActiveCartRequestBuilder) Get() *ByProjectKeyMeActiveCartRequestMethodGet {
Expand All @@ -26,7 +30,13 @@ func (rb *ByProjectKeyMeActiveCartRequestBuilder) Get() *ByProjectKeyMeActiveCar
}

/**
* Checks if an active Cart exists. Returns a `200 OK` status if an active Cart exists or a `404 Not Found` otherwise.
* Checks if an active Cart exists. Returns a `200 OK` status if successful.
*
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists.
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyMeActiveCartRequestBuilder) Head() *ByProjectKeyMeActiveCartRequestMethodHead {
return &ByProjectKeyMeActiveCartRequestMethodHead{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ func (rb *ByProjectKeyMeActiveCartRequestMethodGet) WithHeaders(headers http.Hea
}

/**
* Retrieves the Customer's most recently modified active Cart.
* Retrieves the Customer's most recently modified [active Cart](ctp:api:type:CartState). Returns a `200 OK` status if successful.
*
* Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
*
* If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists.
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyMeActiveCartRequestMethodGet) Execute(ctx context.Context) (result *Cart, err error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ func (rb *ByProjectKeyMeActiveCartRequestMethodHead) WithHeaders(headers http.He
}

/**
* Checks if an active Cart exists. Returns a `200 OK` status if an active Cart exists or a `404 Not Found` otherwise.
* Checks if an active Cart exists. Returns a `200 OK` status if successful.
*
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
*
* - If no active Cart exists.
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
*
*/
func (rb *ByProjectKeyMeActiveCartRequestMethodHead) Execute(ctx context.Context) error {
queryParams := url.Values{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ func (rb *ByProjectKeyMeBusinessUnitsRequestBuilder) WithKey(key string) *ByProj
client: rb.client,
}
}

/**
* Returns all of the authenticated Customer’s Business Units in a Project. Returns a `200 OK` status if successful, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsRequestBuilder) Get() *ByProjectKeyMeBusinessUnitsRequestMethodGet {
return &ByProjectKeyMeBusinessUnitsRequestMethodGet{
url: fmt.Sprintf("/%s/me/business-units", rb.projectKey),
Expand All @@ -33,7 +38,8 @@ func (rb *ByProjectKeyMeBusinessUnitsRequestBuilder) Get() *ByProjectKeyMeBusine
}

/**
* Checks if a BusinessUnit exists for a given Query Predicate. Returns a `200 OK` status if any BusinessUnits match the Query Predicate or a `404 Not Found` otherwise.
* Checks if a BusinessUnit exists for a given Query Predicate. Returns a `200 OK` status if any BusinessUnits match the Query Predicate and the Customer has access to them, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsRequestBuilder) Head() *ByProjectKeyMeBusinessUnitsRequestMethodHead {
return &ByProjectKeyMeBusinessUnitsRequestMethodHead{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ type ByProjectKeyMeBusinessUnitsByIDRequestBuilder struct {
client *Client
}

/**
* Returns a Business Unit for a given `id`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsByIDRequestBuilder) Get() *ByProjectKeyMeBusinessUnitsByIDRequestMethodGet {
return &ByProjectKeyMeBusinessUnitsByIDRequestMethodGet{
url: fmt.Sprintf("/%s/me/business-units/%s", rb.projectKey, rb.id),
Expand All @@ -20,7 +24,7 @@ func (rb *ByProjectKeyMeBusinessUnitsByIDRequestBuilder) Get() *ByProjectKeyMeBu
}

/**
* Checks if a BusinessUnit exists for a given `id`. Returns a `200 OK` status if the BusinessUnit exists or a `404 Not Found` otherwise.
* Checks if a BusinessUnit exists for a given `id`. Returns a `200 OK` status if the BusinessUnit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsByIDRequestBuilder) Head() *ByProjectKeyMeBusinessUnitsByIDRequestMethodHead {
return &ByProjectKeyMeBusinessUnitsByIDRequestMethodHead{
Expand All @@ -29,17 +33,14 @@ func (rb *ByProjectKeyMeBusinessUnitsByIDRequestBuilder) Head() *ByProjectKeyMeB
}
}

/**
* Updates a Business Unit for a given `id`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsByIDRequestBuilder) Post(body MyBusinessUnitUpdate) *ByProjectKeyMeBusinessUnitsByIDRequestMethodPost {
return &ByProjectKeyMeBusinessUnitsByIDRequestMethodPost{
body: body,
url: fmt.Sprintf("/%s/me/business-units/%s", rb.projectKey, rb.id),
client: rb.client,
}
}

func (rb *ByProjectKeyMeBusinessUnitsByIDRequestBuilder) Delete() *ByProjectKeyMeBusinessUnitsByIDRequestMethodDelete {
return &ByProjectKeyMeBusinessUnitsByIDRequestMethodDelete{
url: fmt.Sprintf("/%s/me/business-units/%s", rb.projectKey, rb.id),
client: rb.client,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func (rb *ByProjectKeyMeBusinessUnitsByIDRequestMethodGet) WithHeaders(headers h
rb.headers = headers
return rb
}

/**
* Returns a Business Unit for a given `id`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsByIDRequestMethodGet) Execute(ctx context.Context) (result *BusinessUnit, err error) {
var queryParams url.Values
if rb.params != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (rb *ByProjectKeyMeBusinessUnitsByIDRequestMethodHead) WithHeaders(headers
}

/**
* Checks if a BusinessUnit exists for a given `id`. Returns a `200 OK` status if the BusinessUnit exists or a `404 Not Found` otherwise.
* Checks if a BusinessUnit exists for a given `id`. Returns a `200 OK` status if the BusinessUnit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsByIDRequestMethodHead) Execute(ctx context.Context) error {
queryParams := url.Values{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ func (rb *ByProjectKeyMeBusinessUnitsByIDRequestMethodPost) WithHeaders(headers
rb.headers = headers
return rb
}

/**
* Updates a Business Unit for a given `id`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsByIDRequestMethodPost) Execute(ctx context.Context) (result *BusinessUnit, err error) {
data, err := serializeInput(rb.body)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ func (rb *ByProjectKeyMeBusinessUnitsRequestMethodGet) WithHeaders(headers http.
rb.headers = headers
return rb
}

/**
* Returns all of the authenticated Customer’s Business Units in a Project. Returns a `200 OK` status if successful, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsRequestMethodGet) Execute(ctx context.Context) (result *BusinessUnitPagedQueryResponse, err error) {
var queryParams url.Values
if rb.params != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func (rb *ByProjectKeyMeBusinessUnitsRequestMethodHead) WithHeaders(headers http
}

/**
* Checks if a BusinessUnit exists for a given Query Predicate. Returns a `200 OK` status if any BusinessUnits match the Query Predicate or a `404 Not Found` otherwise.
* Checks if a BusinessUnit exists for a given Query Predicate. Returns a `200 OK` status if any BusinessUnits match the Query Predicate and the Customer has access to them, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*
*/
func (rb *ByProjectKeyMeBusinessUnitsRequestMethodHead) Execute(ctx context.Context) error {
var queryParams url.Values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ type ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder struct {
client *Client
}

/**
* Returns a Business Unit for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder) Get() *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodGet {
return &ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodGet{
url: fmt.Sprintf("/%s/me/business-units/key=%s", rb.projectKey, rb.key),
Expand All @@ -20,7 +23,7 @@ func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder) Get() *ByProjectKey
}

/**
* Checks if a BusinessUnit exists for a given `key`. Returns a `200 OK` status if the BusinessUnit exists or a `404 Not Found` otherwise.
* Checks if a BusinessUnit exists for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder) Head() *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodHead {
return &ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodHead{
Expand All @@ -29,17 +32,13 @@ func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder) Head() *ByProjectKe
}
}

/**
* Updates a Business Unit for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder) Post(body MyBusinessUnitUpdate) *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodPost {
return &ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodPost{
body: body,
url: fmt.Sprintf("/%s/me/business-units/key=%s", rb.projectKey, rb.key),
client: rb.client,
}
}

func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder) Delete() *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodDelete {
return &ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodDelete{
url: fmt.Sprintf("/%s/me/business-units/key=%s", rb.projectKey, rb.key),
client: rb.client,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodGet) WithHeaders(heade
rb.headers = headers
return rb
}

/**
* Returns a Business Unit for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodGet) Execute(ctx context.Context) (result *BusinessUnit, err error) {
var queryParams url.Values
if rb.params != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodHead) WithHeaders(head
}

/**
* Checks if a BusinessUnit exists for a given `key`. Returns a `200 OK` status if the BusinessUnit exists or a `404 Not Found` otherwise.
* Checks if a BusinessUnit exists for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodHead) Execute(ctx context.Context) error {
queryParams := url.Values{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodPost) WithHeaders(head
rb.headers = headers
return rb
}

/**
* Updates a Business Unit for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise.
*/
func (rb *ByProjectKeyMeBusinessUnitsKeyByKeyRequestMethodPost) Execute(ctx context.Context) (result *BusinessUnit, err error) {
data, err := serializeInput(rb.body)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
/**
* 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)
*
*/
func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsRequestBuilder) Post(body CartDraft) *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsRequestMethodPost {
Expand Down
Loading

0 comments on commit c1cf318

Please sign in to comment.