Skip to content

Commit

Permalink
feat: add GET _/info on swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Jan 12, 2023
1 parent 383b710 commit 6b1bfb7
Showing 1 changed file with 329 additions and 0 deletions.
329 changes: 329 additions & 0 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ info:
version: "PAYMENTS_VERSION"

paths:
/_info:
get:
summary: Get server info
operationId: getServerInfo
responses:
200:
description: Server information
content:
application/json:
schema:
type: object
properties:
version:
type: string
/payments:
get:
summary: List payments
Expand Down Expand Up @@ -986,3 +1000,318 @@ components:
description: The creation date of the more recent BalanceTransaction fetched from stripe for this account
noMoreHistory:
type: boolean
DummyPayConfig:
type: object
required:
- directory
properties:
filePollingPeriod:
type: string
example: '60s'
description: The frequency at which the connector will try to fetch new payment objects from the directory
default: '10s'
fileGenerationPeriod:
type: string
example: '60s'
description: The frequency at which the connector will create new payment objects in the directory
default: '10s'
directory:
type: string
example: '/tmp/dummypay'
WiseConfig:
type: object
required:
- apiKey
properties:
apiKey:
type: string
example: 'XXX'
ModulrConfig:
type: object
required:
- apiKey
- apiSecret
properties:
apiKey:
type: string
example: 'XXX'
apiSecret:
type: string
example: 'XXX'
endpoint:
type: string
example: 'XXX'
BankingCircleConfig:
type: object
required:
- username
- password
- endpoint
- authorizationEndpoint
properties:
username:
type: string
example: 'XXX'
password:
type: string
example: 'XXX'
endpoint:
type: string
example: 'XXX'
authorizationEndpoint:
type: string
example: 'XXX'
CurrencyCloudConfig:
type: object
required:
- apiKey
- loginID
properties:
apiKey:
type: string
example: 'XXX'
loginID:
type: string
example: 'XXX'
description: 'Username of the API Key holder'
pollingPeriod:
type: string
example: '60s'
description: The frequency at which the connector will fetch transactions
endpoint:
type: string
example: 'XXX'
description: 'The endpoint to use for the API. Defaults to https://devapi.currencycloud.com'
ListPaymentsResponse:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/Payment'
GetPaymentResponse:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Payment'
Payment:
type: object
required:
- provider
- status
- asset
- amount
- date
- id
- type
- scheme
properties:
provider:
type: string
reference:
type: string
scheme:
type: string
enum:
- visa
- mastercard
- apple pay
- google pay
- sepa debit
- sepa credit
- sepa
- a2a
- ach debit
- ach
- rtp
- other
status:
type: string
type:
type: string
enum:
- pay-in
- payout
- other
id:
type: string
example: XXX
amount:
type: integer
example: 100
asset:
type: string
example: USD
date:
type: string
format: date-time
raw:
nullable: true

ListConnectorsResponse:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/ConnectorBaseInfo'

ListConnectorsConfigsResponse:
type: object
properties:
connector:
type: object
properties:
key:
type: object
properties:
datatype:
type: string
required:
type: boolean

ConnectorBaseInfo:
type: object
properties:
provider:
type: string
example: stripe
disabled:
type: boolean
example: false

StripeTransferRequest:
type: object
properties:
amount:
type: integer
example: 100
asset:
type: string
example: USD
destination:
type: string
example: acct_1Gqj58KZcSIg2N2q
metadata:
type: object
description: |
A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
example:
order_id: '6735'

ConnectorTaskBase:
type: object
properties:
provider:
type: string
description: The connector code
example: stripe
createdAt:
type: string
format: date-time
description: The date when the task was created
example: '2020-01-01T00:00:00.000Z'
status:
type: string
description: The task status
example: stopped
enum:
- stopped
- pending
- terminated
- active
- failed
error:
type: string
description: The error message if the task failed
example: 'Error: Something went wrong'
state:
type: object
description: The task state
example: {}

TaskDescriptorStripe:
allOf:
- $ref: '#/components/schemas/ConnectorTaskBase'
- type: object
properties:
descriptor:
type: object
properties:
name:
type: string
main:
type: boolean
account:
type: string
TaskDescriptorWise:
allOf:
- $ref: '#/components/schemas/ConnectorTaskBase'
- type: object
properties:
descriptor:
type: object
properties:
name:
type: string
key:
type: string
profileID:
type: integer
TaskDescriptorModulr:
allOf:
- $ref: '#/components/schemas/ConnectorTaskBase'
- type: object
properties:
descriptor:
type: object
properties:
name:
type: string
key:
type: string
accountID:
type: string
TaskDescriptorDummyPay:
allOf:
- $ref: '#/components/schemas/ConnectorTaskBase'
- type: object
properties:
descriptor:
type: object
properties:
name:
type: string
key:
type: string
fileName:
type: string
TaskDescriptorCurrencyCloud:
allOf:
- $ref: '#/components/schemas/ConnectorTaskBase'
- type: object
properties:
descriptor:
type: object
properties:
name:
type: string
TaskDescriptorBankingCircle:
allOf:
- $ref: '#/components/schemas/ConnectorTaskBase'
- type: object
properties:
descriptor:
type: object
properties:
name:
type: string
key:
type: string

0 comments on commit 6b1bfb7

Please sign in to comment.