feat(#14): Wire manual buy/sell to the mammon acquire/consume endpoints
This commit is contained in:
+128
-1
@@ -350,6 +350,46 @@ paths:
|
||||
description: New activities fetched and stored
|
||||
"400":
|
||||
description: No character with this id
|
||||
/activity/consume:
|
||||
post:
|
||||
tags:
|
||||
- activity
|
||||
summary: Manually record a consumption (sell) of an item. Call POST /activities/process
|
||||
to fold it into acquisitions.
|
||||
operationId: consume
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ManualActivityRequest"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: Consumption recorded
|
||||
"400":
|
||||
description: Invalid request (e.g. CORPORATION source)
|
||||
"404":
|
||||
description: Source not owned by the caller
|
||||
/activity/acquire:
|
||||
post:
|
||||
tags:
|
||||
- activity
|
||||
summary: Manually record an acquisition (buy) of an item. Call POST /activities/process
|
||||
to fold it into acquisitions.
|
||||
operationId: acquire
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ManualActivityRequest"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: Acquisition recorded
|
||||
"400":
|
||||
description: Invalid request (e.g. CORPORATION source)
|
||||
"404":
|
||||
description: Source not owned by the caller
|
||||
/activities/process:
|
||||
post:
|
||||
tags:
|
||||
@@ -1123,6 +1163,84 @@ components:
|
||||
required:
|
||||
- memberLedgerIds
|
||||
- name
|
||||
ActivitySourceRequest:
|
||||
type: object
|
||||
description: "Where a manual activity is attributed: a character, a ledger,\
|
||||
\ or nothing. CORPORATION is not accepted."
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The kind of source.
|
||||
enum:
|
||||
- CHARACTER
|
||||
- LEDGER
|
||||
- NONE
|
||||
example: CHARACTER
|
||||
characterId:
|
||||
type:
|
||||
- integer
|
||||
- "null"
|
||||
format: int64
|
||||
description: "EVE character id, when the source is a character."
|
||||
example: 2112625428
|
||||
ledgerId:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: uuid
|
||||
description: "Ledger id, when the source is a ledger."
|
||||
example: 0199a1b2-c3d4-7e5f-8a90-1b2c3d4e5f60
|
||||
required:
|
||||
- characterId
|
||||
- ledgerId
|
||||
- type
|
||||
ManualActivityRequest:
|
||||
type: object
|
||||
description: Request to manually record an acquisition (buy) or consumption
|
||||
(sell) of an item.
|
||||
properties:
|
||||
source:
|
||||
$ref: "#/components/schemas/ActivitySourceRequest"
|
||||
description: Where the activity is attributed.
|
||||
marketTypeId:
|
||||
type: integer
|
||||
format: int64
|
||||
description: EVE type id of the traded item.
|
||||
example: 34
|
||||
quantity:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of units.
|
||||
example: 1000
|
||||
unitPrice:
|
||||
type: number
|
||||
description: Price per unit.
|
||||
example: 5.42
|
||||
datetime:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: date-time
|
||||
description: When the activity happened. Defaults to now when omitted.
|
||||
taxes:
|
||||
type:
|
||||
- number
|
||||
- "null"
|
||||
description: Taxes paid. Defaults to 0 when omitted.
|
||||
example: 0
|
||||
description:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
description: Free-form description.
|
||||
required:
|
||||
- datetime
|
||||
- description
|
||||
- marketTypeId
|
||||
- quantity
|
||||
- source
|
||||
- taxes
|
||||
- unitPrice
|
||||
CharacterResponse:
|
||||
type: object
|
||||
description: An EVE Online character.
|
||||
@@ -1507,7 +1625,7 @@ components:
|
||||
ActivitySourceResponse:
|
||||
type: object
|
||||
description: "Where an activity or transaction came from: a character, a corporation\
|
||||
\ wallet, or nothing (a manual entry)."
|
||||
\ wallet, a ledger, or nothing (a manual entry)."
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
@@ -1515,6 +1633,7 @@ components:
|
||||
enum:
|
||||
- CHARACTER
|
||||
- CORPORATION
|
||||
- LEDGER
|
||||
- NONE
|
||||
example: CHARACTER
|
||||
characterId:
|
||||
@@ -1539,10 +1658,18 @@ components:
|
||||
description: "Corporation wallet division (1-7), when the source is a corporation\
|
||||
\ and it is known."
|
||||
example: 4
|
||||
ledgerId:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: uuid
|
||||
description: "Ledger id, when the source is a ledger."
|
||||
example: 0199a1b2-c3d4-7e5f-8a90-1b2c3d4e5f60
|
||||
required:
|
||||
- characterId
|
||||
- corporationId
|
||||
- division
|
||||
- ledgerId
|
||||
- type
|
||||
IskTransferResponse:
|
||||
allOf:
|
||||
|
||||
Reference in New Issue
Block a user