Skip to content

Commit 5fb9fbe

Browse files
authored
Merge pull request #91 from SettleAPI/promTo/prod
Changes by create-pull-request action
2 parents 200b59e + d00ffe9 commit 5fb9fbe

11 files changed

Lines changed: 105 additions & 29 deletions

File tree

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[![Netlify Status](https://api.netlify.com/api/v1/badges/f4516111-2bfc-4ae0-9fc3-626cfe56e954/deploy-status)](https://app.netlify.com/sites/settle-developer-docs/deploys)
2+
23
# Settle API Docs
34

45
## Introduction
56

67
This is the repo for the [Settle APIs Documentation](https://developer.settle.eu/) website. It's buildt using [Vuepress](https://vuepress.vuejs.org/) - a minimalistic Vue-powered static site generator from [Evan You](https://evanyou.me/), the creator of [Vue.js](https://vuejs.org/), and [Netlify CMS](https://www.netlifycms.org/) - an open source content management for your [Git workflow](https://guides.github.com/introduction/flow/).
78

8-
***TL;DR:*** *[Contributing and setting up local environment](#contributing)*
9+
**_TL;DR:_** _[Contributing and setting up local environment](#contributing)_
910

1011
## VuePress
1112

@@ -52,13 +53,19 @@ At its core, **Netlify CMS** is an open-source React app that acts as a wrapper
5253

5354
`yarn install`
5455

55-
4. ### Start the local dev server
56+
4. ### Add .env.local file
57+
58+
Create a new file in the root folder named `.env.local` and add the `GITHUB_TOKEN` environment variable found in the Netlify Deploy Settings.
59+
60+
Learn more about environment variables over in the [Netlify docs](https://docs.netlify.com/configure-builds/environment-variables/)
61+
62+
5. ### Start the local dev server
5663

5764
`yarn docs:dev`
5865

5966
By default, you should now see your scaffolded Settle APIs docs site at [https://localhost:8080](https://localhost:8080)🚀
6067

61-
5. ### Start the local CMS server
68+
6. ### Start the local CMS server
6269

6370
`npx netlify-cms-proxy-server`
6471

@@ -78,10 +85,10 @@ At its core, **Netlify CMS** is an open-source React app that acts as a wrapper
7885

7986
3. ### Push to the branch
8087

81-
`git push origin feat/my-awesome-feature`
88+
`git push origin feat/my-awesome-feature`
8289

8390
4. ### Open a Pull Request 🤓
8491

85-
`gh pr create --title "My Awesome feature" --body "This is my new awesome feature." --base dev`
92+
`gh pr create --title "My Awesome feature" --body "This is my new awesome feature." --base dev`
8693

87-
**NOTE:** Pull Requests are used to start conversation about proposed changes before they're code is reviewed and eventually merged into the main branch, and **we will only consider Pull Requests initiated towards the [dev branch](https://github.com/SettleAPI/settle-developer-docs/tree/dev)**. Pull Requests towards any other branch will be ignored and closed without any further notifications.
94+
**NOTE:** Pull Requests are used to start conversation about proposed changes before they're code is reviewed and eventually merged into the main branch, and **we will only consider Pull Requests initiated towards the [dev branch](https://github.com/SettleAPI/settle-developer-docs/tree/dev)**. Pull Requests towards any other branch will be ignored and closed without any further notifications.

docs/.vuepress/theme/components/PageResource.vue

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,17 @@
3939
<li>
4040
Required Auth Level:
4141
<router-link
42+
v-if="$frontmatter.authLevel === 'SECRET'"
4243
:to="'/guides/authentication/#authentication-using-secret'"
43-
>SECRET</router-link
44-
>
44+
>{{ $frontmatter.authLevel }}
45+
</router-link>
46+
<router-link
47+
v-if="$frontmatter.authLevel === 'KEY'"
48+
:to="'/guides/authentication/#authentication-using-key'"
49+
>{{ $frontmatter.authLevel }}
50+
</router-link>
4551
</li>
46-
<li>Authorized Roles: All</li>
52+
<li>Authorized Roles: {{ $frontmatter.authRoles }}</li>
4753
</ul>
4854
<h3 id="base-uris" v-if="servers">
4955
<a href="#base-uris" class="header-anchor">#</a> Base URIs
@@ -140,7 +146,7 @@
140146
<p class="custom-block-title">NOTE</p>
141147
<p>The request body can not be empty.</p>
142148
</div>
143-
149+
144150
<h2 id="response-body">
145151
<a href="#response-body" class="header-anchor">#</a> Response Body
146152
</h2>
@@ -152,7 +158,11 @@
152158
<div v-else>
153159
<div class="warning custom-block">
154160
<p class="custom-block-title">WARNING</p>
155-
<p>No reference found for method <strong>{{ $frontmatter.operationId }}</strong>.</p>
161+
<p>
162+
No reference found for method
163+
<strong>{{ $frontmatter.operationId }}</strong
164+
>.
165+
</p>
156166
</div>
157167
</div>
158168
</div>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
layout: SpecialLayout
3-
title: merchant.settlement.latest
3+
title: merchant.settlement.latest.get
44
description: Endpoint description...
55
api: merchant
66
schema: merchant.settlement.latest
7-
operationId: merchant.settlement.latest
7+
operationId: merchant.settlement.latest.get
88
operation: get
99
method: get
1010
authLevel: SECRET
1111
authRoles: Any
12-
---
12+
---

docs/api/reference/rest/v1/merchant.shortlink/index.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,49 @@ title: merchant.shortlink
44
description: Overview
55
schema: merchant.shortlink
66
api: merchant
7-
---
7+
---
8+
9+
## Shortlink Scan Handler
10+
11+
When user scans, Settle sends scan id and argstring, and can receive text and uri which can be transported back to the app. Uri will be opened in a web view inside the app if registered in list of trusted domains.
12+
13+
<div class="md-api_reference_FiraCode">
14+
<div class="md-api_reference_request_heading">
15+
<p>
16+
<span class="badge post">POST</span> http://merchant.server/callback/url
17+
</p>
18+
</div>
19+
</div>
20+
21+
<h2 id="schema">
22+
<a href="#schema" class="header-anchor">#</a> Schema
23+
</h2>
24+
25+
<div class="md-api_reference_FiraCode">
26+
27+
### id
28+
29+
- Type: `string`
30+
- Required: `true`
31+
32+
The scan token ID that can be used as recipient for payment and permission requests. Expires in one day.
33+
34+
### argstring
35+
36+
- Type: `string`
37+
- Required: `false`
38+
- Default: `null`
39+
40+
The string that was appended to the shortlink value in the QR code that was scanned.
41+
42+
</div>
43+
44+
## Trusted Domains
45+
46+
Because of security considerations when opening external URIs inside the Settle App, URIs or domains that will be opened in the app needs to be preapproved by Settle.
47+
48+
There are currently no API endpoints for managing trusted domains, please contact Settle support to register domain that should be visible inside app.
49+
50+
## Shortlink Management
51+
52+
To be able to receive scans, one must first register a shortlink.

docs/api/reference/rest/v1/merchant.statusCodes/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ title: merchant.statusCodes
44
description: Overview
55
schema: merchant.statusCodes
66
api: merchant
7-
---
7+
---
8+
9+
## Status Code
10+
11+
Some resources, such as the outcome resources (for payment request and permission request), have a status code field in the response body. The status_code resource lists and describes all possible status codes. Making a `GET /status_code/` request yields a list of status codes with corresponding names and descriptions. Making a `GET /status_code/{value}/` request (substituting `{value}` for a status code integer) yields the information for a particular status code.

docs/api/reference/rest/v1/merchant.users/create.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.users
77
operationId: merchant.users.create
88
operation: post
99
method: create
10-
authLevel: SECRET
11-
authRoles: Any
12-
---
10+
authLevel: KEY
11+
authRoles: All
12+
---

docs/api/reference/rest/v1/merchant.users/delete.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.users
77
operationId: merchant.users.delete
88
operation: delete
99
method: delete
10-
authLevel: SECRET
11-
authRoles: Any
12-
---
10+
authLevel: KEY
11+
authRoles: All
12+
---

docs/api/reference/rest/v1/merchant.users/get.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ operationId: merchant.users.get
88
operation: get
99
method: get
1010
authLevel: SECRET
11-
authRoles: Any
12-
---
11+
authRoles: All
12+
---

docs/api/reference/rest/v1/merchant.users/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ title: merchant.users
44
description: Overview
55
schema: merchant.users
66
api: merchant
7-
---
7+
---
8+
9+
## Mercant Users
10+
11+
In order to gain access to the [Merchant API](/api/reference/rest/v1/) a client must authenticate itself using the ID and the secret/public key of an existing user. This means that the first user for a merchant must be created in the Self Service Portal or by an integrator on behalf of the merchant.
12+
13+
Each user is created for a specific merchant, which ID is given by the value of the **X-Settle-Merchant** header when making a [ `merchant.users.create` ](/api/reference/rest/v1/merchant.users/create/) request. A user can only interact with the API on behalf of the merchant which it was created for. The user ID is chosen on create and is has to be unique for the parent Merchant.

docs/api/reference/rest/v1/merchant.users/update.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.users
77
operationId: merchant.users.update
88
operation: put
99
method: update
10-
authLevel: SECRET
11-
authRoles: Any
12-
---
10+
authLevel: KEY
11+
authRoles: All
12+
---

0 commit comments

Comments
 (0)