Skip to content

Commit

Permalink
Merge pull request #2 from andreagostinho-meli/docs/update-amount
Browse files Browse the repository at this point in the history
Update amount documentation
  • Loading branch information
andreagostinho-meli authored Aug 16, 2023
2 parents e22d5a6 + 18ffbb5 commit 76742fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mercadopago/sdk-react",
"version": "0.0.13",
"version": "0.0.14",
"description": "Mercado Pago SDK React",
"main": "index.js",
"keywords": [
Expand Down
10 changes: 10 additions & 0 deletions src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ declare global {
MercadoPago: any;
paymentBrickController: {
unmount: () => void;
/**
* Updates data in Payment Brick preserving the current instance.
*
* @see {@link https://www.mercadopago.com/developers/en/docs/checkout-bricks/payment-brick/additional-customization/update-data Payment Brick # Default rendering} documentation.
*/
update: (updateValues: UpdateValues) => boolean;
};
cardPaymentBrickController: {
unmount: () => void;
getFormData: () => Promise<void>;
/**
* Updates data in Card Payment Brick preserving the current instance.
*
* @see {@link https://www.mercadopago.com/developers/en/docs/checkout-bricks/card-payment-brick/additional-customization/update-data Payment Brick # Default rendering} documentation.
*/
update: (updateValues: UpdateValues) => boolean;
};
walletBrickController: {
Expand Down
3 changes: 3 additions & 0 deletions src/bricks/util/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ export interface IBrickCustomVariables {
formPadding?: string;
}

/**
* Available update values.
*/
export type UpdateValues = {
amount: number;
};

0 comments on commit 76742fa

Please sign in to comment.