Skip to content

Commit 6859877

Browse files
committed
update admin api specs
1 parent 6f9fd5c commit 6859877

3 files changed

Lines changed: 492 additions & 219 deletions

File tree

static/api/admin/2023-02-10.yaml

Lines changed: 164 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ components:
10881088
pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
10891089
type: string
10901090
user:
1091-
$ref: '#/components/schemas/CreateOrderUser'
1091+
$ref: '#/components/schemas/CreateUser'
10921092
required:
10931093
- currency
10941094
- initial
@@ -1287,7 +1287,7 @@ components:
12871287
default: false
12881288
type: boolean
12891289
user:
1290-
$ref: '#/components/schemas/CreateOrderUser'
1290+
$ref: '#/components/schemas/CreateUser'
12911291
vouchers:
12921292
items:
12931293
type: string
@@ -1358,75 +1358,6 @@ components:
13581358
- interval
13591359
- interval_count
13601360
type: object
1361-
CreateOrderUser:
1362-
properties:
1363-
accepts_marketing:
1364-
title: Subscribe to Marketing Emails
1365-
type: boolean
1366-
email:
1367-
format: email
1368-
title: Email address
1369-
type:
1370-
- string
1371-
- 'null'
1372-
first_name:
1373-
maxLength: 255
1374-
type: string
1375-
id:
1376-
type:
1377-
- integer
1378-
- 'null'
1379-
ip:
1380-
title: Ip address
1381-
type:
1382-
- string
1383-
- 'null'
1384-
language:
1385-
description: "* `en` - English\n* `fr` - Fran\xE7ais\n* `th` - \u0E20\u0E32\
1386-
\u0E29\u0E32\u0E44\u0E17\u0E22\n* `de` - Deutsch\n* `sv` - Svenska\n*\
1387-
\ `no` - Norsk\n* `it` - Italiano\n* `es` - Espa\xF1ol\n* `nl` - Nederlands\n\
1388-
* `pt` - Portugu\xEAs\n* `da` - Dansk\n* `fi` - Suomi"
1389-
enum:
1390-
- en
1391-
- fr
1392-
- th
1393-
- de
1394-
- sv
1395-
- 'no'
1396-
- it
1397-
- es
1398-
- nl
1399-
- pt
1400-
- da
1401-
- fi
1402-
- null
1403-
type:
1404-
- string
1405-
- 'null'
1406-
x-spec-enum-id: 70ceea9c8488568b
1407-
last_name:
1408-
maxLength: 255
1409-
type: string
1410-
metadata:
1411-
oneOf:
1412-
- {}
1413-
- type: 'null'
1414-
phone_number:
1415-
description: 'required : E164'
1416-
type:
1417-
- string
1418-
- 'null'
1419-
tags:
1420-
items:
1421-
type:
1422-
- string
1423-
- 'null'
1424-
type: array
1425-
user_agent:
1426-
type:
1427-
- string
1428-
- 'null'
1429-
type: object
14301361
CreateProduct:
14311362
properties:
14321363
categories:
@@ -1742,7 +1673,7 @@ components:
17421673
default: false
17431674
type: boolean
17441675
user:
1745-
$ref: '#/components/schemas/CreateOrderUser'
1676+
$ref: '#/components/schemas/CreateUser'
17461677
required:
17471678
- interval
17481679
- interval_count
@@ -1953,6 +1884,75 @@ components:
19531884
- id
19541885
- updated_at
19551886
type: object
1887+
CreateUser:
1888+
properties:
1889+
accepts_marketing:
1890+
title: Subscribe to Marketing Emails
1891+
type: boolean
1892+
email:
1893+
format: email
1894+
title: Email address
1895+
type:
1896+
- string
1897+
- 'null'
1898+
first_name:
1899+
maxLength: 255
1900+
type: string
1901+
id:
1902+
type:
1903+
- integer
1904+
- 'null'
1905+
ip:
1906+
title: Ip address
1907+
type:
1908+
- string
1909+
- 'null'
1910+
language:
1911+
description: "* `en` - English\n* `fr` - Fran\xE7ais\n* `th` - \u0E20\u0E32\
1912+
\u0E29\u0E32\u0E44\u0E17\u0E22\n* `de` - Deutsch\n* `sv` - Svenska\n*\
1913+
\ `no` - Norsk\n* `it` - Italiano\n* `es` - Espa\xF1ol\n* `nl` - Nederlands\n\
1914+
* `pt` - Portugu\xEAs\n* `da` - Dansk\n* `fi` - Suomi"
1915+
enum:
1916+
- en
1917+
- fr
1918+
- th
1919+
- de
1920+
- sv
1921+
- 'no'
1922+
- it
1923+
- es
1924+
- nl
1925+
- pt
1926+
- da
1927+
- fi
1928+
- null
1929+
type:
1930+
- string
1931+
- 'null'
1932+
x-spec-enum-id: 70ceea9c8488568b
1933+
last_name:
1934+
maxLength: 255
1935+
type: string
1936+
metadata:
1937+
oneOf:
1938+
- {}
1939+
- type: 'null'
1940+
phone_number:
1941+
description: 'required : E164'
1942+
type:
1943+
- string
1944+
- 'null'
1945+
tags:
1946+
items:
1947+
type:
1948+
- string
1949+
- 'null'
1950+
type: array
1951+
user_agent:
1952+
type:
1953+
- string
1954+
- 'null'
1955+
type: object
19561956
CreateUserAddress:
19571957
properties:
19581958
country:
@@ -5344,7 +5344,7 @@ components:
53445344
- string
53455345
- 'null'
53465346
user:
5347-
$ref: '#/components/schemas/CreateOrderUser'
5347+
$ref: '#/components/schemas/CreateUser'
53485348
type: object
53495349
PatchedUpdateOrder:
53505350
properties:
@@ -6075,6 +6075,7 @@ components:
60756075
readOnly: true
60766076
type: array
60776077
certificate_token:
6078+
readOnly: true
60786079
type: string
60796080
environment_key:
60806081
type: string
@@ -6240,6 +6241,23 @@ components:
62406241
- label
62416242
- supported_currencies
62426243
type: object
6244+
PreferredPaymentGateway:
6245+
properties:
6246+
gateway_type:
6247+
maxLength: 100
6248+
type: string
6249+
id:
6250+
readOnly: true
6251+
type: integer
6252+
name:
6253+
description: Used for reporting and transaction references.
6254+
maxLength: 100
6255+
type: string
6256+
required:
6257+
- gateway_type
6258+
- id
6259+
- name
6260+
type: object
62436261
Product:
62446262
properties:
62456263
categories:
@@ -9661,6 +9679,42 @@ components:
96619679
- type
96629680
- value
96639681
type: object
9682+
VerifyTransaction:
9683+
properties:
9684+
card_token:
9685+
maxLength: 128
9686+
type: string
9687+
currency:
9688+
maxLength: 12
9689+
type: string
9690+
payment_gateway:
9691+
type:
9692+
- integer
9693+
- 'null'
9694+
payment_gateway_group:
9695+
type:
9696+
- integer
9697+
- 'null'
9698+
user:
9699+
$ref: '#/components/schemas/CreateUser'
9700+
required:
9701+
- card_token
9702+
- currency
9703+
- user
9704+
type: object
9705+
VerifyTransactionResponse:
9706+
properties:
9707+
card_token:
9708+
type: string
9709+
preferred_payment_gateway:
9710+
$ref: '#/components/schemas/PreferredPaymentGateway'
9711+
user:
9712+
$ref: '#/components/schemas/CreateUser'
9713+
required:
9714+
- card_token
9715+
- preferred_payment_gateway
9716+
- user
9717+
type: object
96649718
Voucher:
96659719
properties:
96669720
code:
@@ -16719,6 +16773,43 @@ paths:
1671916773
- transactions:read
1672016774
tags:
1672116775
- payments
16776+
/transactions/verify/:
16777+
post:
16778+
description: Verify a card token.
16779+
operationId: transactionsVerifyCreate
16780+
parameters:
16781+
- in: header
16782+
name: X-29next-API-Version
16783+
required: true
16784+
schema:
16785+
default: '2023-02-10'
16786+
enum:
16787+
- '2023-02-10'
16788+
type: string
16789+
requestBody:
16790+
content:
16791+
application/json:
16792+
schema:
16793+
$ref: '#/components/schemas/VerifyTransaction'
16794+
application/x-www-form-urlencoded:
16795+
schema:
16796+
$ref: '#/components/schemas/VerifyTransaction'
16797+
multipart/form-data:
16798+
schema:
16799+
$ref: '#/components/schemas/VerifyTransaction'
16800+
required: true
16801+
responses:
16802+
'200':
16803+
content:
16804+
application/json:
16805+
schema:
16806+
$ref: '#/components/schemas/VerifyTransactionResponse'
16807+
description: ''
16808+
security:
16809+
- oauth2:
16810+
- transactions:write
16811+
tags:
16812+
- payments
1672216813
/transactions/{id}/:
1672316814
get:
1672416815
description: Retrieve a transaction.

0 commit comments

Comments
 (0)