api-docs/models/Contract.yaml

104 lines
2.1 KiB
YAML
Raw Normal View History

2022-03-10 04:16:02 +01:00
description: ''
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: number
onFulfilled:
type: number
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: number
fulfilled:
type: number
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'
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'
examples:
- id: cl0hok38t0014ks0jnoy8o5vh
faction: COMMERCE_REPUBLIC
type: PROCUREMENT
terms:
deadline: '2022-03-11T05:16:59.113Z'
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'