Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit aea9fb3

Browse files
authored
feat: Updated base API urls (#821)
1 parent 2ae1080 commit aea9fb3

37 files changed

+39
-39
lines changed

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Config {
3535
this.client_id = client_id
3636
this.client_secret = client_secret
3737
this.store_id = store_id
38-
this.host = host || 'api.moltin.com'
38+
this.host = host || 'euwest.api.elasticpath.com'
3939
this.protocol = protocol || 'https'
4040
this.version = 'v2'
4141
this.currency = currency

test/unit/account-addresses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
attributeResponse
88
} from '../factories'
99

10-
const apiUrl = 'https://api.moltin.com/v2'
10+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1111

1212
describe('Moltin addresses', () => {
1313
const Moltin = MoltinGateway({

test/unit/account-authentication-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Moltin Account Authentication Settings', () => {
88
const Moltin = MoltinGateway({

test/unit/account-members.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com'
5+
const apiUrl = 'https://euwest.api.elasticpath.com'
66

77
describe('Moltin Account Members', () => {
88
const Moltin = MoltinGateway({

test/unit/account-membership-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Moltin Account Membership Settings', () => {
88
const Moltin = MoltinGateway({

test/unit/account-memberships.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from '../../src/moltin'
77
import { accountMembershipsArray } from '../factories'
88

9-
const apiUrl = 'https://api.moltin.com'
9+
const apiUrl = 'https://euwest.api.elasticpath.com'
1010

1111
describe('Moltin Account Memberships', () => {
1212
const Moltin = MoltinGateway({

test/unit/accounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com'
5+
const apiUrl = 'https://euwest.api.elasticpath.com'
66

77
describe('Moltin Accounts', () => {
88
const Moltin = MoltinGateway({

test/unit/application-keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { ApplicationKeyBase, gateway as MoltinGateway } from '../../src/moltin'
44
import { applicationKeysArray as applicationKeys } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Store Application Keys', () => {
99
it('should return an array of application keys', () => {

test/unit/authentication-realm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Moltin Authentication Realms', () => {
88
const Moltin = MoltinGateway({

test/unit/authentication-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Moltin Authentication Settings', () => {
88
const Moltin = MoltinGateway({

test/unit/authentication.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import fetch from 'cross-fetch'
44
import { gateway as MoltinGateway } from '../../src/moltin'
55

6-
const apiUrl = 'https://api.moltin.com'
6+
const apiUrl = 'https://euwest.api.elasticpath.com'
77
const authExpire = 9999999999
88

99
describe('Moltin authentication', () => {
@@ -84,7 +84,7 @@ describe('Moltin authentication', () => {
8484
host: undefined
8585
})
8686

87-
assert.equal(Moltin.config.host, 'api.moltin.com')
87+
assert.equal(Moltin.config.host, 'euwest.api.elasticpath.com')
8888
})
8989

9090
it('should use a custom API host', () => {

test/unit/brands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
attributeResponse
99
} from '../factories'
1010

11-
const apiUrl = 'https://api.moltin.com/v2'
11+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1212
const authHeaders = {
1313
reqheaders: {
1414
Authorization: 'Bearer a550d8cbd4a4627013452359ab69694cd446615a'

test/unit/cart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
customCartData as customData
1111
} from '../factories'
1212

13-
const apiUrl = 'https://api.moltin.com/v2'
13+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1414

1515
describe('Moltin cart', () => {
1616
const Moltin = MoltinGateway({
@@ -114,7 +114,7 @@ describe('Moltin cart', () => {
114114
},
115115
links: {
116116
product:
117-
'https://api.moltin.com/v2/products/8361826f-84c2-4e90-9dca-f9f2ea325de3'
117+
'https://euwest.api.elasticpath.com/v2/products/8361826f-84c2-4e90-9dca-f9f2ea325de3'
118118
},
119119
meta: {
120120
display_price: {

test/unit/categories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
productsArray as products
88
} from '../factories'
99

10-
const apiUrl = 'https://api.moltin.com/v2'
10+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1111

1212
describe('Moltin categories', () => {
1313
const Moltin = MoltinGateway({

test/unit/collections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
productsArray as products
88
} from '../factories'
99

10-
const apiUrl = 'https://api.moltin.com/v2'
10+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1111

1212
describe('Moltin collections', () => {
1313
const Moltin = MoltinGateway({

test/unit/currencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { attributeResponse, currenciesArray as currencies } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin currencies', () => {
99
const Moltin = MoltinGateway({

test/unit/customer-addresses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import {gateway as MoltinGateway} from '../../src/moltin'
44
import {customerAddressesArray as addresses, addressUpdate, attributeResponse} from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin addresses', () => {
99
const Moltin = MoltinGateway({

test/unit/customers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { attributeResponse, customersArray as customers } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin customers', () => {
99
const Moltin = MoltinGateway({

test/unit/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
productsArray as products
88
} from '../factories'
99

10-
const apiUrl = 'https://api.moltin.com/v2'
10+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1111

1212
describe('Moltin error handling', () => {
1313
const Moltin = MoltinGateway({

test/unit/fields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { attributeResponse } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin flow fields', () => {
99
it('should create a field', () => {

test/unit/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { filesArray as files, productsArray as products } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin files', () => {
99
const Moltin = MoltinGateway({

test/unit/flows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
attributeResponse
88
} from '../factories'
99

10-
const apiUrl = 'https://api.moltin.com/v2'
10+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1111

1212
describe('Moltin flows', () => {
1313
it('should create a flow', () => {

test/unit/gateways.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { gatewaysArray as gateways, attributeResponse } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin gateways', () => {
99
const Moltin = MoltinGateway({

test/unit/integrations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
integrationsArray as integrations
88
} from '../factories'
99

10-
const apiUrl = 'https://api.moltin.com/v2'
10+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1111

1212
describe('Moltin integrations', () => {
1313
const Moltin = MoltinGateway({

test/unit/inventories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
stockTransactionsArray as transactions
77
} from '../factories'
88

9-
const apiUrl = 'https://api.moltin.com/v2'
9+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1010

1111
describe('Moltin inventories', () => {
1212
it('should return an array of inventories', () => {

test/unit/jobs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { jobsArray as jobs } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin jobs', () => {
99
const Moltin = MoltinGateway({

test/unit/oidc-profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Oidc Profiles', () => {
88
const Moltin = MoltinGateway({

test/unit/orders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
orderItemsArray as orderItems
77
} from '../factories'
88

9-
const apiUrl = 'https://api.moltin.com/v2'
9+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1010

1111
describe('Moltin orders', () => {
1212
it('should return an array of orders', () => {

test/unit/password-profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Password Profiles', () => {
88
const Moltin = MoltinGateway({

test/unit/products.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { productsArray as products } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin products', () => {
99
it('should return an array of products', () => {

test/unit/promotions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
promotionCodesArray as promotionCodes
1111
} from '../factories'
1212

13-
const apiUrl = 'https://api.moltin.com/v2'
13+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1414
const accessToken = 'testaccesstoken'
1515

1616
describe('Moltin promotions', () => {

test/unit/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('Moltin settings', () => {
88
const Moltin = MoltinGateway({

test/unit/transactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44
import { orderTransactionsArray as transactions } from '../factories'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Moltin order transactions', () => {
99
const Moltin = MoltinGateway({

test/unit/user-authentication-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('User Authentication Info', () => {
88
const Moltin = MoltinGateway({

test/unit/user-authentication-password-profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from 'chai'
22
import nock from 'nock'
33
import { gateway as MoltinGateway } from '../../src/moltin'
44

5-
const apiUrl = 'https://api.moltin.com/v2'
5+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
66

77
describe('User Authentication Password Profile Info', () => {
88
const Moltin = MoltinGateway({

test/unit/variations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
auth
1212
} from '../factories'
1313

14-
const apiUrl = 'https://api.moltin.com/v2'
14+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
1515
const accessToken = 'testaccesstoken'
1616

1717
describe('Moltin variations', () => {

test/utils/throttle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import '../../src/utils/fetch-polyfill'
33
import throttleMod from '../../src/utils/throttle.js'
44
import { gateway as MoltinGateway } from '../../src/moltin'
55

6-
const apiUrl = 'https://api.moltin.com/v2'
6+
const apiUrl = 'https://euwest.api.elasticpath.com/v2'
77

88
describe('Build throttle mechanism', () => {
99
const Moltin = MoltinGateway({

0 commit comments

Comments
 (0)