add hs-office-coopshares API+controller
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
|
||||
components:
|
||||
|
||||
schemas:
|
||||
|
||||
HsOfficeCoopSharesTransactionType:
|
||||
type: string
|
||||
enum:
|
||||
- ADJUSTMENT
|
||||
- SUBSCRIPTION
|
||||
- CANCELLATION;
|
||||
|
||||
HsOfficeCoopSharesTransaction:
|
||||
type: object
|
||||
properties:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
transactionType:
|
||||
$ref: '#/components/schemas/HsOfficeCoopSharesTransactionType'
|
||||
sharesCount:
|
||||
type: integer
|
||||
valueDate:
|
||||
type: string
|
||||
format: date
|
||||
reference:
|
||||
type: string
|
||||
comment:
|
||||
type: string
|
||||
|
||||
HsOfficeCoopSharesTransactionInsert:
|
||||
type: object
|
||||
properties:
|
||||
membershipUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
transactionType:
|
||||
$ref: '#/components/schemas/HsOfficeCoopSharesTransactionType'
|
||||
sharesCount:
|
||||
type: integer
|
||||
valueDate:
|
||||
type: string
|
||||
format: date
|
||||
reference:
|
||||
type: string
|
||||
comment:
|
||||
type: string
|
||||
required:
|
||||
- transactionType
|
||||
- sharesCount
|
||||
- valueDate
|
||||
- reference
|
||||
additionalProperties: false
|
@ -0,0 +1,78 @@
|
||||
get:
|
||||
summary: Returns a list of (optionally filtered) cooperative share transactions.
|
||||
description: Returns the list of (optionally filtered) cooperative share transactions which are visible to the current user or any of it's assumed roles.
|
||||
tags:
|
||||
- hs-office-coopShares
|
||||
operationId: listCoopShares
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
- name: membershipUuid
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Optional UUID of the related membership.
|
||||
- name: memberNumber
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Optional member number of the related membership.
|
||||
- name: fromValueDate
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
description: Optional value date range start (inclusive).
|
||||
- name: toValueDate
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
description: Optional value date range end (inclusive).
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: './hs-office-coopshares-schemas.yaml#/components/schemas/HsOfficeCoopSharesTransaction'
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
|
||||
post:
|
||||
summary: Adds a new cooperative share transaction.
|
||||
tags:
|
||||
- hs-office-coopShares
|
||||
operationId: addCoopSharesTransaction
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
requestBody:
|
||||
description: A JSON object describing the new cooperative shares transaction.
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '/hs-office-coopshares-schemas.yaml#/components/schemas/HsOfficeCoopSharesTransactionInsert'
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-coopshares-schemas.yaml#/components/schemas/HsOfficeCoopSharesTransaction'
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
"409":
|
||||
$ref: './error-responses.yaml#/components/responses/Conflict'
|
@ -78,3 +78,9 @@ paths:
|
||||
|
||||
/api/hs/office/memberships/{membershipUUID}:
|
||||
$ref: "./hs-office-memberships-with-uuid.yaml"
|
||||
|
||||
|
||||
# Coop Shares Transaction
|
||||
|
||||
/api/hs/office/coopsharestransactions:
|
||||
$ref: "./hs-office-coopshares.yaml"
|
||||
|
Reference in New Issue
Block a user