Skip to content

Commit

Permalink
Add list managed integration by account id (#1053)
Browse files Browse the repository at this point in the history
* feat: add list managed integration by account id

* fix: fix grammar

* fix: change from payap to paypal-referral integration type

* refactor: add pageKey to list doc

* test: add snapshot
  • Loading branch information
pupato13 committed Sep 4, 2024
1 parent 6b46bb7 commit d9454a5
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/__tests__/__snapshots__/links.integration.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ exports[`the build should not break any links 1`] = `
"/api/managed-integrations#create-or-update-managed-integration",
"/api/managed-integrations#get-managed-integration",
"/api/managed-integrations#invitation-summary-model",
"/api/managed-integrations#list-managed-integration",
"/api/managed-integrations#managed-integration-model",
"/api/managed-integrations#merchant-model",
"/api/managed-integrations#params-model",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
export default {
method: 'GET',
path: '/api/accounts/Jaim1Cu1Q55uooxSens6yk/managed-integrations',
request: {
headers: {
'X-Api-Key': '<TOKEN>',
},
queryString: {
pageKey: 'Collection#k9oBPAOgjz4k6a9MXNfRlFzn|#Collection|4xb2jbtvgr07eax9259od5he'
}
},
response: {
nextPageKey: 'Collection#ujk6nDuqFueXNGndXj8Qp9hU|#Collection',
items: [
{
id: '5ee0c486308f590260d9a07f',
type: 'paypal-referral',
externalId: 'DKTs3U38hdhfEqwF1JKoT2',
enabled: true,
params: {
centrapayMerchantId: '5ffcaf432003060007b98343',
email: 'test@centrapay.com'
},
status: 'provisioning',
claimedByAccountId: 'Jaim1Cu1Q55uooxSens6yk',
claimedBy: 'crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey',
claimedAt: '2020-06-12T01:17:46.499Z',
inProgress: true,
createdAt: '2020-06-11T01:17:46.499Z',
createdBy: 'crn:BIj211vFs9cNACwBb04vQw:api-key:MyApiKey',
updatedAt: '2020-06-12T01:17:46.499Z',
updatedBy: 'crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey'
},
{
id: '4maj50b6fdhmv0v38yrgjzdh',
type: 'paypal-referral',
externalId: 'alL3YQEGeY5WLu5uSFbM0tb3',
enabled: true,
params: {
centrapayMerchantId: '7aqasjid5kbcp7wquopoe4dg',
email: 'test2@centrapay.com'
},
status: 'provisioning',
claimedByAccountId: 'Jaim1Cu1Q55uooxSens6yk',
claimedBy: 'crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey',
claimedAt: '2020-07-12T01:18:46.499Z',
inProgress: true,
createdAt: '2020-07-11T01:18:46.499Z',
createdBy: 'crn:BIj211vFs9cNACwBb04vQw:api-key:MyApiKey',
updatedAt: '2020-07-12T01:18:46.499Z',
updatedBy: 'crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey'
}
]
}
};
18 changes: 18 additions & 0 deletions src/content/api/managed-integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,21 @@ A summary of the [Invitation](/api/invitations) for a Managed Integration.

This endpoint allows you to retrieve a Managed Integration by type and external id.
</Endpoint>

---

<Endpoint
path="/api/accounts/{accountId}/managed-integrations"
filename="managed-integrations-list-by-accountId"
>
## List Managed Integration

This endpoint allows you to retrieve the list of managed integrations for an account.
Returns a [paginated](/api/pagination/) list of [Managed Integrations](#managed-integration-model) for an Account.

<Properties>
<Property name="pageKey" type="string">
Used to retrieve the next page of items.
</Property>
</Properties>
</Endpoint>

0 comments on commit d9454a5

Please sign in to comment.