-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Adventure-Tech/feature/new-amounts-object
Feature/new amounts object
- Loading branch information
Showing
47 changed files
with
876 additions
and
483 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
get: | ||
description: Returns a single availability based on its ID | ||
tags: [ Availabilities API ] | ||
parameters: | ||
- $ref: '../../parameters/path/AvailabilityId.yaml' | ||
responses: | ||
200: | ||
description: Successfully retrieved the availability from the server | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/availabilities/AvailabilityWrapped.yaml' | ||
404: | ||
$ref: '../../responses/404NotFound.yaml' | ||
patch: | ||
description: Patch a specific availability based on its ID. This is inspired by the JSON patch syntax with some modifications such as custom operations and modified array referencing | ||
tags: [ Availabilities API ] | ||
parameters: | ||
- $ref: '../../parameters/path/AvailabilityId.yaml' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '../../schemas/jsonpatch/PatchObject.yaml' | ||
responses: | ||
200: | ||
description: Successfully updated the availability on the server | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/availabilities/AvailabilityWrapped.yaml' | ||
delete: | ||
description: Delete a specific availability based on its ID | ||
tags: [ Availabilities API ] | ||
parameters: | ||
- $ref: '../../parameters/path/AvailabilityID.yaml' | ||
responses: | ||
200: | ||
description: Successfully deleted the availability on the server |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
get: | ||
description: Returns a single vat model based on its ID | ||
tags: [ VAT API ] | ||
parameters: | ||
- $ref: '../../parameters/path/VatModelId.yaml' | ||
responses: | ||
200: | ||
description: Successfully retrieved the vat model from the server | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: [ data ] | ||
properties: | ||
data: | ||
$ref: '../../schemas/vat/VatModel.yaml' | ||
404: | ||
$ref: '../../responses/404NotFound.yaml' | ||
patch: | ||
description: Patch a specific vat model based on its ID. This is inspired by the JSON patch syntax with some modifications such as custom operations and modified array referencing | ||
tags: [ VAT API ] | ||
parameters: | ||
- $ref: '../../parameters/path/VatModelId.yaml' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '../../schemas/jsonpatch/PatchObject.yaml' | ||
responses: | ||
200: | ||
description: Successfully updated the vat model on the server | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: [ data ] | ||
properties: | ||
data: | ||
$ref: '../../schemas/vat/VatModel.yaml' | ||
delete: | ||
description: Soft-delete a specific vat model based on its ID | ||
tags: [ VAT API ] | ||
parameters: | ||
- $ref: '../../parameters/path/VatModelId.yaml' | ||
responses: | ||
200: | ||
description: Successfully deleted the vat model on the server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
get: | ||
description: Returns paginated list of vat models | ||
tags: [ VAT API ] | ||
parameters: | ||
- $ref: '../../parameters/query/PageCursor.yaml' | ||
- $ref: '../../parameters/query/PerPage.yaml' | ||
responses: | ||
200: | ||
description: Successfully retrieved vat models from the server | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: '../../schemas/vat/VatModel.yaml' | ||
links: | ||
$ref: '../../schemas/pagination/Links.yaml' | ||
post: | ||
description: Creates new vat model | ||
tags: [ VAT API ] | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/vat/VatModel.yaml' | ||
responses: | ||
201: | ||
description: Successfully created new vat model on the server | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: [ data ] | ||
properties: | ||
data: | ||
$ref: '../../schemas/vat/VatModel.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: availability | ||
in: path | ||
required: true | ||
description: The availability ID | ||
schema: | ||
type: integer | ||
minimum: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: vat | ||
in: path | ||
required: true | ||
description: The vat model ID | ||
schema: | ||
type: integer | ||
minimum: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
type: object | ||
required: | ||
- productId | ||
- ticketOptionId | ||
- bookableId | ||
- availability | ||
required: [productId, ticketOptionId, productId, availability, price, maxCapacity] | ||
properties: | ||
productId: | ||
type: integer | ||
id: | ||
$ref: '../types/ID.yaml' | ||
createdAt: | ||
$ref: '../types/CreatedAt.yaml' | ||
ticketOptionId: | ||
type: integer | ||
bookableId: | ||
productId: | ||
type: integer | ||
readOnly: true | ||
availability: | ||
type: integer | ||
readOnly: true | ||
minimum: 0 | ||
start: | ||
type: string | ||
format: date-time | ||
end: | ||
type: string | ||
format: date-time | ||
price: | ||
$ref: '../prices/Price.yaml' | ||
maxCapacity: | ||
type: integer | ||
minimum: 0 | ||
# cutoff, refund policy, price, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ type: object | |
required: [data] | ||
properties: | ||
data: | ||
$ref: './Product.yaml' | ||
$ref: './Availability.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
type: object | ||
required: [firstName, lastName, email, phone] | ||
properties: | ||
firstName: | ||
type: string | ||
nullable: true | ||
lastName: | ||
type: string | ||
nullable: true | ||
email: | ||
type: string | ||
format: email | ||
nullable: true | ||
phone: | ||
allOf: | ||
- $ref: '../types/PhoneNumber.yaml' | ||
- nullable: true | ||
allOf: | ||
- type: object | ||
required: [firstName, lastName, email, phone] | ||
properties: | ||
firstName: | ||
type: string | ||
nullable: true | ||
lastName: | ||
type: string | ||
nullable: true | ||
email: | ||
type: string | ||
format: email | ||
nullable: true | ||
phone: | ||
allOf: | ||
- $ref: '../types/PhoneNumber.yaml' | ||
- nullable: true | ||
- $ref: '../types/Address.yaml' # TODO: nullability |
Oops, something went wrong.