Skip to content

Commit

Permalink
[Auto Generated] 1.4.15-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Nov 23, 2024
1 parent 33e00c8 commit 8cc3b48
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
- [Added] property <code>cart.items[].promotions_applied[].float_amount</code> of schema <code>AppliedPromotion</code> in response with status code 200


#### getPromotions

- ##### What's New
- [Added] method <code>getPromotions</code>



### Logistic


Expand Down
2 changes: 1 addition & 1 deletion dist/application.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions sdk/application/Cart/CartApplicationClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ declare class Cart {
getLadderOffers: string;
getPromotionOffers: string;
getPromotionPaymentOffers: string;
getPromotions: string;
getShipments: string;
removeAddress: string;
removeCoupon: string;
Expand Down Expand Up @@ -206,6 +207,15 @@ declare class Cart {
* @description: Use this API to get top 5 payment offers available for current product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionPaymentOffers/).
*/
getPromotionPaymentOffers({ id, uid, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PromotionPaymentOffersResult>;
/**
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
* @param {import("../ApplicationAPIClient").Options} - Options
* @returns {Promise<Promotions>} - Success response
* @name getPromotions
* @summary: List all available promotions of the sales channel
* @description: List all promotional offers available for the sales channel, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotions/).
*/
getPromotions({ pageSize, pageNo, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<Promotions>;
/**
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
* @param {import("../ApplicationAPIClient").Options} - Options
Expand Down
40 changes: 40 additions & 0 deletions sdk/application/Cart/CartApplicationClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Cart {
getPromotionOffers: "/service/application/cart/v1.0/available-promotions",
getPromotionPaymentOffers:
"/service/application/cart/v1.0/available-payment-offers",
getPromotions: "/service/application/cart/v1.0/promotion",
getShipments: "/service/application/cart/v1.0/shipment",
removeAddress: "/service/application/cart/v1.0/address/{id}",
removeCoupon: "/service/application/cart/v1.0/coupon",
Expand Down Expand Up @@ -863,6 +864,45 @@ class Cart {
return response;
}

/**
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
* @param {import("../ApplicationAPIClient").Options} - Options
* @returns {Promise<Promotions>} - Success response
* @name getPromotions
* @summary: List all available promotions of the sales channel
* @description: List all promotional offers available for the sales channel, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotions/).
*/
async getPromotions(
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
{ responseHeaders } = { responseHeaders: false }
) {
const query_params = {};
query_params["page_size"] = pageSize;
query_params["page_no"] = pageNo;

const xHeaders = {};

const response = await ApplicationAPIClient.execute(
this._conf,
"get",
constructUrl({
url: this._urls["getPromotions"],
params: {},
}),
query_params,
undefined,
{ ...xHeaders, ...requestHeaders },
{ responseHeaders }
);

let responseData = response;
if (responseHeaders) {
responseData = response[0];
}

return response;
}

/**
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
* @param {import("../ApplicationAPIClient").Options} - Options
Expand Down

0 comments on commit 8cc3b48

Please sign in to comment.