Skip to content

Commit

Permalink
Merge pull request #280 from mercadopago/fix/raneme-mp-module
Browse files Browse the repository at this point in the history
rename module MercadoPago to MercadoPagoConfig
  • Loading branch information
lucmkz authored Oct 5, 2023
2 parents b892a0d + 54c0b07 commit 544b3e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ That's it! Mercado Pago SDK has been successfully installed.

```javascript
// Step 1: Import the parts of the module you want to use
import { MercadoPago, Payment } from 'mercadopago';
import { MercadoPagoConfig, Payment } from 'mercadopago';

// Step 2: Initialize the client object
const client = new MercadoPago({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
const client = new MercadoPagoConfig({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });

// Step 3: Initialize the API object
const payment = new Payment(client);
Expand All @@ -56,10 +56,10 @@ payment.create({ body }).then(console.log).catch(console.log);

### Step 1: Import the parts of the module you want to use

Import `MercadoPago` and API objects from the MercadoPago module.
Import `MercadoPagoConfig` and API objects from the MercadoPago module.

``` javascript
import { MercadoPago, Payment } from 'mercadopago';
import { MercadoPagoConfig, Payment } from 'mercadopago';
```

### Step 2: Initialize the client object
Expand All @@ -73,7 +73,7 @@ Initialize the client object, passing the following:
For example:

``` javascript
const client = new MercadoPago({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
const client = new MercadoPagoConfig({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
```

### Step 3: Initialize the API object
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MercadoPagoConfig as MercadoPago } from './mercadoPagoConfig';
export default MercadoPago;
export { MercadoPago };
import { MercadoPagoConfig } from './mercadoPagoConfig';
export default MercadoPagoConfig;
export { MercadoPagoConfig };

export { CardToken } from './clients/cardToken';
export { CustomerCard } from './clients/customerCard';
Expand Down

0 comments on commit 544b3e6

Please sign in to comment.