Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add list mandates for customer #3592

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/openapi/src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::customers::customers_list,
routes::customers::customers_update,
routes::customers::customers_delete,
routes::customers::customers_mandates_list,

//Routes for payment methods
routes::payment_method::create_payment_method_api,
Expand Down
16 changes: 16 additions & 0 deletions crates/openapi/src/routes/customers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,19 @@ pub async fn customers_delete() {}
security(("api_key" = []))
)]
pub async fn customers_list() {}

/// Customers - Mandates List
///
/// Lists all the mandates for a particular customer id.
#[utoipa::path(
post,
path = "/customers/{customer_id}/mandates",
responses(
(status = 200, description = "List of retrieved mandates for a customer", body = Vec<MandateResponse>),
(status = 400, description = "Invalid Data"),
),
tag = "Customers Mandates List",
operation_id = "List all Mandates for a Customer",
security(("api_key" = []))
)]
pub async fn customers_mandates_list() {}
33 changes: 33 additions & 0 deletions openapi/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,39 @@
]
}
},
"/customers/{customer_id}/mandates": {
"post": {
"tags": [
"Customers Mandates List"
],
"summary": "Customers - Mandates List",
"description": "Customers - Mandates List\n\nLists all the mandates for a particular customer id.",
"operationId": "List all Mandates for a Customer",
"responses": {
"200": {
"description": "List of retrieved mandates for a customer",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MandateResponse"
}
}
}
}
},
"400": {
"description": "Invalid Data"
}
},
"security": [
{
"api_key": []
}
]
}
},
"/customers/{customer_id}/payment_methods": {
"get": {
"tags": [
Expand Down
Loading