api-docs/models/Contract.yaml

104 lines
2.1 KiB
YAML
Raw Normal View History

description: ""
2022-03-10 04:16:02 +01:00
type: object
properties:
id:
type: string
minLength: 1
faction:
type: string
minLength: 1
type:
type: string
minLength: 1
terms:
type: object
properties:
deadline:
type: string
minLength: 1
payment:
type: object
properties:
onAccepted:
type: integer
2022-03-10 04:16:02 +01:00
onFulfilled:
type: integer
2022-03-10 04:16:02 +01:00
required:
- onAccepted
- onFulfilled
deliver:
type: array
uniqueItems: true
minItems: 1
items:
required:
- tradeSymbol
- destination
- units
- fulfilled
properties:
tradeSymbol:
type: string
minLength: 1
destination:
type: string
minLength: 1
units:
type: integer
2022-03-10 04:16:02 +01:00
fulfilled:
type: integer
2022-03-10 04:16:02 +01:00
required:
- deadline
- payment
- deliver
accepted:
type: boolean
fulfilled:
type: boolean
expiresAt:
type: string
minLength: 1
required:
- id
- faction
- type
- terms
- accepted
- fulfilled
- expiresAt
x-examples:
example-1:
id: cl0hok38t0014ks0jnoy8o5vh
faction: COMMERCE_REPUBLIC
type: PROCUREMENT
terms:
deadline: "2022-03-11T05:16:59.113Z"
2022-03-10 04:16:02 +01:00
payment:
onAccepted: 20000
onFulfilled: 100000
deliver:
- tradeSymbol: IRON_ORE
destination: X1-OE-PM
units: 10000
fulfilled: 0
accepted: false
fulfilled: false
expiresAt: "2022-03-09T05:16:59.112Z"
2022-03-10 04:16:02 +01:00
examples:
- id: cl0hok38t0014ks0jnoy8o5vh
faction: COMMERCE_REPUBLIC
type: PROCUREMENT
terms:
deadline: "2022-03-11T05:16:59.113Z"
2022-03-10 04:16:02 +01:00
payment:
onAccepted: 20000
onFulfilled: 100000
deliver:
- tradeSymbol: IRON_ORE
destination: X1-OE-PM
units: 10000
fulfilled: 0
accepted: false
fulfilled: false
expiresAt: "2022-03-09T05:16:59.112Z"