Skip to content

Commit

Permalink
fix: BREAKING-CHANGE: Change function sendOrderMessage to sendChargeM…
Browse files Browse the repository at this point in the history
…essage
  • Loading branch information
icleitoncosta committed Jul 17, 2024
1 parent ba553d0 commit cf3dca0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/chat/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export {
} from './prepareMessageButtons';
export { prepareRawMessage } from './prepareRawMessage';
export { requestPhoneNumber } from './requestPhoneNumber';
export {
OrderItems,
OrderMessageOptions,
sendChargeMessage,
} from './sendChargeMessage';
export {
PoolMessageOptions,
sendCreatePollMessage,
Expand All @@ -82,11 +87,6 @@ export {
LocationMessageOptions,
sendLocationMessage,
} from './sendLocationMessage';
export {
OrderItems,
OrderMessageOptions,
sendOrderMessage,
} from './sendOrderMessage';
export { sendPixKeyMessage } from './sendPixKeyMessage';
export { sendRawMessage } from './sendRawMessage';
export { sendReactionToMessage } from './sendReactionToMessage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@ export interface OrderMessageOptions extends SendMessageOptions {
*
* @example
* ```javascript
* // Send Order with a product
* WPP.chat.sendOrderMessage('[number]@c.us', [
* // Send charge with a product
* WPP.chat.sendChargeMessage('[number]@c.us', [
* { type: 'product', id: '67689897878', qnt: 2 },
* { type: 'product', id: '37878774457', qnt: 1 },
* ]
*
* // Send Order with a custom item
* WPP.chat.sendOrderMessage('[number]@c.us', [
* // Send charge with a custom item
* WPP.chat.sendChargeMessage('[number]@c.us', [
* { type: 'custom', name: 'Item de cost test', price: 120000, qnt: 2 },
* ]
*
* // Send Order with custom options
* WPP.chat.sendOrderMessage('[number]@c.us', [
* // Send charge with custom options
* WPP.chat.sendChargeMessage('[number]@c.us', [
* { type: 'product', id: '37878774457', qnt: 1 },
* { type: 'custom', name: 'Item de cost test', price: 120000, qnt: 2 },
* ],
* { tax: 10000, shipping: 4000, discount: 10000 }
* ```
* @category Message
*/
export async function sendOrderMessage(
export async function sendChargeMessage(
chatId: any,
items: OrderItems[],
options?: OrderMessageOptions
Expand Down

0 comments on commit cf3dca0

Please sign in to comment.