Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docusaurus/docs/api/definitions/regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Regions

This endpoint allows clients to retrieve a list of all regions associated to a specific user.

## GET /api/sdk/platform/v1/regions
## GET /cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions

Find a user's regions collection.

Expand All @@ -20,7 +20,7 @@ Find a user's regions collection.
### Example Request

```
GET https://apps.availity.com/api/sdk/platform/v1/regions?currentlySelected=true
GET https://essentials.availity.com/cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions?currentlySelected=true
```

### Example Response
Expand All @@ -44,7 +44,7 @@ Find a user's regions collection.
],
"links": {
"self": {
"href": "https://apps.availity.com/api/sdk/platform/v1/regions?currentlySelected=true"
"href": "https://essentials.availity.com/cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions?currentlySelected=true"
},
"user": {
"href": "https://apps.availity.com/api/sdk/platform/v1/users/aka01565563207"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be updated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured I would leave it the same as that endpoint hasn't been updated to the cloud yet, should I change it too?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what did your response have when you tested it?

Expand All @@ -54,7 +54,7 @@ Find a user's regions collection.
{
"links": {
"self": {
"href": "https://apps.availity.com/api/sdk/platform/v1/regions/FL"
"href": "https://essentials.availity.com/cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions/FL"
}
},
"id": "FL",
Expand All @@ -65,14 +65,14 @@ Find a user's regions collection.
}
```

## GET /api/sdk/platform/v1/regions/:id
## GET /cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions/:id

Allows the client to retrieve a region by id.

### Example Request

```
GET https://apps.availity.com/api/sdk/platform/v1/regions/NM
GET https://essentials.availity.com/cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions/NM
```

### Example Response
Expand All @@ -81,7 +81,7 @@ GET https://apps.availity.com/api/sdk/platform/v1/regions/NM
{
"links": {
"self": {
"href": "https://apps.availity.com/api/sdk/platform/v1/regions/NM"
"href": "https://essentials.availity.com/cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions/NM"
}
},
"id": "NM",
Expand Down
7 changes: 3 additions & 4 deletions packages/api-axios/src/resources/regions.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import AvApi from '../api';
import AvCloudApi from '../cloud';
import { avUserApi } from './user';

export default class AvRegionsApi extends AvApi {
export default class AvRegionsApi extends AvCloudApi {
constructor(config) {
super({
path: 'api/sdk/platform',
name: 'regions',
name: '/appl/customer-management/legacy/sdk/platform/v1/regions',
sessionBust: false,
pageBust: true,
...config,
Expand Down
2 changes: 1 addition & 1 deletion packages/api-axios/src/resources/tests/regions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('AvRegionsApi', () => {
});

test('url should be correct', () => {
expect(api.getUrl(api.config())).toBe('/api/sdk/platform/v1/regions');
expect(api.getUrl(api.config())).toBe('/cloud/web/appl/customer-management/legacy/sdk/platform/v1/regions');
});

test('afterUpdate should call setPageBust and return response', async () => {
Expand Down