mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(router): serve OpenAPI docs at /docs (#698)
Co-authored-by: bernard eugine <bernard.eugine@bernard.eugine-MacBookPro> Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
This commit is contained in:
151
Cargo.lock
generated
151
Cargo.lock
generated
@ -1398,6 +1398,26 @@ dependencies = [
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "4.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
|
||||
dependencies = [
|
||||
"dirs-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys"
|
||||
version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"redox_users",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dlv-list"
|
||||
version = "0.3.0"
|
||||
@ -2360,6 +2380,16 @@ version = "0.3.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
|
||||
|
||||
[[package]]
|
||||
name = "mime_guess"
|
||||
version = "2.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
|
||||
dependencies = [
|
||||
"mime",
|
||||
"unicase",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "minimal-lexical"
|
||||
version = "0.2.1"
|
||||
@ -3064,6 +3094,17 @@ dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
|
||||
dependencies = [
|
||||
"getrandom 0.2.8",
|
||||
"redox_syscall",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.7.1"
|
||||
@ -3237,6 +3278,7 @@ dependencies = [
|
||||
"toml 0.7.2",
|
||||
"url",
|
||||
"utoipa",
|
||||
"utoipa-swagger-ui",
|
||||
"uuid",
|
||||
"wiremock",
|
||||
]
|
||||
@ -3280,6 +3322,41 @@ dependencies = [
|
||||
"vergen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-embed"
|
||||
version = "6.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "283ffe2f866869428c92e0d61c2f35dfb4355293cdfdc48f49e895c15f1333d1"
|
||||
dependencies = [
|
||||
"rust-embed-impl",
|
||||
"rust-embed-utils",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-embed-impl"
|
||||
version = "6.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31ab23d42d71fb9be1b643fe6765d292c5e14d46912d13f3ae2815ca048ea04d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rust-embed-utils",
|
||||
"shellexpand",
|
||||
"syn",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-embed-utils"
|
||||
version = "7.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1669d81dfabd1b5f8e2856b8bbe146c6192b0ba22162edc738ac0a5de18f054"
|
||||
dependencies = [
|
||||
"sha2",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-ini"
|
||||
version = "0.18.0"
|
||||
@ -3362,6 +3439,15 @@ version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "schannel"
|
||||
version = "0.1.21"
|
||||
@ -3612,6 +3698,15 @@ dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shellexpand"
|
||||
version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4"
|
||||
dependencies = [
|
||||
"dirs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook"
|
||||
version = "0.3.14"
|
||||
@ -4248,6 +4343,15 @@ version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
|
||||
dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi"
|
||||
version = "0.3.8"
|
||||
@ -4301,9 +4405,9 @@ checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9"
|
||||
|
||||
[[package]]
|
||||
name = "utoipa"
|
||||
version = "3.0.1"
|
||||
version = "3.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3920fa753064b1be7842bea26175ffa0dfc4a8f30bcb52b8ff03fddf8889914c"
|
||||
checksum = "a15f6da6a2b471134ca44b7d18e8a76d73035cf8b3ed24c4dd5ca6a63aa439c5"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
@ -4313,9 +4417,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "utoipa-gen"
|
||||
version = "3.0.1"
|
||||
version = "3.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "720298fac6efca20df9e457e67a1eab41a20d1c3101380b5c4dca1ca60ae0062"
|
||||
checksum = "6f2e33027986a4707b3f5c37ed01b33d0e5a53da30204b52ff18f80600f1d0ec"
|
||||
dependencies = [
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
@ -4323,6 +4427,22 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utoipa-swagger-ui"
|
||||
version = "3.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae3d4f4da6408f0f20ff58196ed619c94306ab32635aeca3d3fa0768c0bd0de2"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"mime_guess",
|
||||
"regex",
|
||||
"rust-embed",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"utoipa",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.2.2"
|
||||
@ -4379,6 +4499,17 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "want"
|
||||
version = "0.3.0"
|
||||
@ -4660,6 +4791,18 @@ version = "1.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f"
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"crc32fast",
|
||||
"crossbeam-utils",
|
||||
"flate2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd"
|
||||
version = "0.12.2+zstd.1.5.2"
|
||||
|
||||
@ -17,7 +17,7 @@ serde_json = "1.0.91"
|
||||
strum = { version = "0.24.1", features = ["derive"] }
|
||||
time = { version = "0.3.17", features = ["serde", "serde-well-known", "std"] }
|
||||
url = { version = "2.3.1", features = ["serde"] }
|
||||
utoipa = { version = "3.0.1", features = ["preserve_order"] }
|
||||
utoipa = { version = "3.0.3", features = ["preserve_order"] }
|
||||
|
||||
# First party crates
|
||||
common_utils = { version = "0.1.0", path = "../common_utils" }
|
||||
|
||||
@ -10,7 +10,7 @@ license = "Apache-2.0"
|
||||
build = "src/build.rs"
|
||||
|
||||
[features]
|
||||
default = ["kv_store", "stripe", "oltp", "olap","accounts_cache"]
|
||||
default = ["kv_store", "stripe", "oltp", "olap", "accounts_cache"]
|
||||
kms = ["aws-config", "aws-sdk-kms"]
|
||||
basilisk = ["josekit"]
|
||||
stripe = ["dep:serde_qs"]
|
||||
@ -74,7 +74,8 @@ thiserror = "1.0.38"
|
||||
time = { version = "0.3.17", features = ["serde", "serde-well-known", "std"] }
|
||||
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
|
||||
url = { version = "2.3.1", features = ["serde"] }
|
||||
utoipa = { version = "3.0.1", features = ["preserve_order", "time"] }
|
||||
utoipa = { version = "3.0.3", features = ["preserve_order", "time"] }
|
||||
utoipa-swagger-ui = { version = "3.0.2", features = ["actix-web"] }
|
||||
uuid = { version = "1.2.2", features = ["serde", "v4"] }
|
||||
|
||||
# First party crates
|
||||
|
||||
@ -78,6 +78,15 @@ pub fn mk_app(
|
||||
> {
|
||||
let mut server_app = get_application_builder(request_body_limit);
|
||||
|
||||
#[cfg(feature = "openapi")]
|
||||
{
|
||||
use utoipa::OpenApi;
|
||||
server_app = server_app.service(
|
||||
utoipa_swagger_ui::SwaggerUi::new("/docs/{_:.*}")
|
||||
.url("/docs/openapi.json", openapi::ApiDoc::openapi()),
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "olap", feature = "oltp"))]
|
||||
{
|
||||
server_app = server_app
|
||||
|
||||
@ -57,7 +57,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
(name = "Mandates", description = "Manage mandates"),
|
||||
(name = "Customers", description = "Create and manage customers"),
|
||||
(name = "Payment Methods", description = "Create and manage payment methods of customers"),
|
||||
(name = "API Key", description = "Create and manage API Keys"),
|
||||
// (name = "API Key", description = "Create and manage API Keys"),
|
||||
),
|
||||
paths(
|
||||
crate::routes::refunds::refunds_create,
|
||||
@ -95,11 +95,11 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
crate::routes::customers::customers_retrieve,
|
||||
crate::routes::customers::customers_update,
|
||||
crate::routes::customers::customers_delete,
|
||||
crate::routes::api_keys::api_key_create,
|
||||
crate::routes::api_keys::api_key_retrieve,
|
||||
crate::routes::api_keys::api_key_update,
|
||||
crate::routes::api_keys::api_key_revoke,
|
||||
crate::routes::api_keys::api_key_list,
|
||||
// crate::routes::api_keys::api_key_create,
|
||||
// crate::routes::api_keys::api_key_retrieve,
|
||||
// crate::routes::api_keys::api_key_update,
|
||||
// crate::routes::api_keys::api_key_revoke,
|
||||
// crate::routes::api_keys::api_key_list,
|
||||
),
|
||||
components(schemas(
|
||||
crate::types::api::refunds::RefundRequest,
|
||||
|
||||
@ -8,8 +8,7 @@ use crate::{
|
||||
types::api::admin,
|
||||
};
|
||||
|
||||
// ### Merchant Account - Create
|
||||
|
||||
/// Merchant Account - Create
|
||||
///
|
||||
/// Create a new account for a merchant and the merchant could be a seller or retailer or client who likes to receive and send payments.
|
||||
#[utoipa::path(
|
||||
@ -40,8 +39,7 @@ pub async fn merchant_account_create(
|
||||
.await
|
||||
}
|
||||
|
||||
// Merchant Account - Retrieve
|
||||
|
||||
/// Merchant Account - Retrieve
|
||||
///
|
||||
/// Retrieve a merchant account details.
|
||||
#[utoipa::path(
|
||||
@ -76,8 +74,7 @@ pub async fn retrieve_merchant_account(
|
||||
.await
|
||||
}
|
||||
|
||||
// Merchant Account - Update
|
||||
|
||||
/// Merchant Account - Update
|
||||
///
|
||||
/// To update an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc
|
||||
#[utoipa::path(
|
||||
@ -111,8 +108,7 @@ pub async fn update_merchant_account(
|
||||
.await
|
||||
}
|
||||
|
||||
// Merchant Account - Delete
|
||||
|
||||
/// Merchant Account - Delete
|
||||
///
|
||||
/// To delete a merchant account
|
||||
#[utoipa::path(
|
||||
@ -148,8 +144,7 @@ pub async fn delete_merchant_account(
|
||||
.await
|
||||
}
|
||||
|
||||
// PaymentsConnectors - Create
|
||||
|
||||
/// PaymentsConnectors - Create
|
||||
///
|
||||
/// Create a new Payment Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc."
|
||||
#[utoipa::path(
|
||||
@ -182,8 +177,7 @@ pub async fn payment_connector_create(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Connector - Retrieve
|
||||
|
||||
/// Payment Connector - Retrieve
|
||||
///
|
||||
/// Retrieve Payment Connector Details
|
||||
#[utoipa::path(
|
||||
@ -226,8 +220,7 @@ pub async fn payment_connector_retrieve(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Connector - List
|
||||
|
||||
/// Payment Connector - List
|
||||
///
|
||||
/// List Payment Connector Details for the merchant
|
||||
#[utoipa::path(
|
||||
@ -262,8 +255,7 @@ pub async fn payment_connector_list(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Connector - Update
|
||||
|
||||
/// Payment Connector - Update
|
||||
///
|
||||
/// To update an existing Payment Connector. Helpful in enabling / disabling different payment methods and other settings for the connector etc.
|
||||
#[utoipa::path(
|
||||
@ -303,8 +295,7 @@ pub async fn payment_connector_update(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Connector - Delete
|
||||
|
||||
/// Payment Connector - Delete
|
||||
///
|
||||
/// Delete or Detach a Payment Connector from Merchant Account
|
||||
#[utoipa::path(
|
||||
@ -347,8 +338,7 @@ pub async fn payment_connector_delete(
|
||||
.await
|
||||
}
|
||||
|
||||
// Merchant Account - Toggle KV
|
||||
|
||||
/// Merchant Account - Toggle KV
|
||||
///
|
||||
/// Toggle KV mode for the Merchant Account
|
||||
#[instrument(skip_all)]
|
||||
@ -372,8 +362,7 @@ pub async fn merchant_account_toggle_kv(
|
||||
.await
|
||||
}
|
||||
|
||||
// Merchant Account - KV Status
|
||||
|
||||
/// Merchant Account - KV Status
|
||||
///
|
||||
/// Toggle KV mode for the Merchant Account
|
||||
#[instrument(skip_all)]
|
||||
|
||||
@ -8,8 +8,7 @@ use crate::{
|
||||
types::api::customers,
|
||||
};
|
||||
|
||||
// Create Customer
|
||||
|
||||
/// Create Customer
|
||||
///
|
||||
/// Create a customer object and store the customer details to be reused for future payments. Incase the customer already exists in the system, this API will respond with the customer details.
|
||||
#[utoipa::path(
|
||||
@ -40,8 +39,7 @@ pub async fn customers_create(
|
||||
.await
|
||||
}
|
||||
|
||||
// Retrieve Customer
|
||||
|
||||
/// Retrieve Customer
|
||||
///
|
||||
/// Retrieve a customer's details.
|
||||
#[utoipa::path(
|
||||
@ -83,8 +81,7 @@ pub async fn customers_retrieve(
|
||||
.await
|
||||
}
|
||||
|
||||
// Update Customer
|
||||
|
||||
/// Update Customer
|
||||
///
|
||||
/// Updates the customer's details in a customer object.
|
||||
#[utoipa::path(
|
||||
@ -119,8 +116,7 @@ pub async fn customers_update(
|
||||
.await
|
||||
}
|
||||
|
||||
// Delete Customer
|
||||
|
||||
/// Delete Customer
|
||||
///
|
||||
/// Delete a customer record.
|
||||
#[utoipa::path(
|
||||
|
||||
@ -8,8 +8,7 @@ use crate::{
|
||||
types::api::mandates,
|
||||
};
|
||||
|
||||
// Mandates - Retrieve Mandate
|
||||
|
||||
/// Mandates - Retrieve Mandate
|
||||
///
|
||||
/// Retrieve a mandate
|
||||
#[utoipa::path(
|
||||
@ -46,8 +45,7 @@ pub async fn get_mandate(
|
||||
.await
|
||||
}
|
||||
|
||||
// Mandates - Revoke Mandate
|
||||
|
||||
/// Mandates - Revoke Mandate
|
||||
///
|
||||
/// Revoke a mandate
|
||||
#[utoipa::path(
|
||||
|
||||
@ -8,8 +8,7 @@ use crate::{
|
||||
types::api::payment_methods::{self, PaymentMethodId},
|
||||
};
|
||||
|
||||
// PaymentMethods - Create
|
||||
|
||||
/// PaymentMethods - Create
|
||||
///
|
||||
/// To create a payment method against a customer object. In case of cards, this API could be used only by PCI compliant merchants
|
||||
#[utoipa::path(
|
||||
@ -42,8 +41,7 @@ pub async fn create_payment_method_api(
|
||||
.await
|
||||
}
|
||||
|
||||
// List payment methods for a Merchant
|
||||
|
||||
/// List payment methods for a Merchant
|
||||
///
|
||||
/// To filter and list the applicable payment methods for a particular Merchant ID
|
||||
#[utoipa::path(
|
||||
@ -90,8 +88,7 @@ pub async fn list_payment_method_api(
|
||||
.await
|
||||
}
|
||||
|
||||
// List payment methods for a Customer
|
||||
|
||||
/// List payment methods for a Customer
|
||||
///
|
||||
/// To filter and list the applicable payment methods for a particular Customer ID
|
||||
#[utoipa::path(
|
||||
@ -142,8 +139,7 @@ pub async fn list_customer_payment_method_api(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Method - Retrieve
|
||||
|
||||
/// Payment Method - Retrieve
|
||||
///
|
||||
/// To retrieve a payment method
|
||||
#[utoipa::path(
|
||||
@ -181,8 +177,7 @@ pub async fn payment_method_retrieve_api(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Method - Update
|
||||
|
||||
/// Payment Method - Update
|
||||
///
|
||||
/// To update an existing payment method attached to a customer object. This API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments
|
||||
#[utoipa::path(
|
||||
@ -226,8 +221,7 @@ pub async fn payment_method_update_api(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payment Method - Delete
|
||||
|
||||
/// Payment Method - Delete
|
||||
///
|
||||
/// Delete payment method
|
||||
#[utoipa::path(
|
||||
|
||||
@ -9,8 +9,7 @@ use crate::{
|
||||
types::api::{self as api_types, enums as api_enums, payments as payment_types},
|
||||
};
|
||||
|
||||
// Payments - Create
|
||||
|
||||
/// Payments - Create
|
||||
///
|
||||
/// To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture
|
||||
#[utoipa::path(
|
||||
@ -105,8 +104,7 @@ pub async fn payments_start(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - Retrieve
|
||||
|
||||
/// Payments - Retrieve
|
||||
///
|
||||
/// To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment
|
||||
#[utoipa::path(
|
||||
@ -163,8 +161,7 @@ pub async fn payments_retrieve(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - Update
|
||||
|
||||
/// Payments - Update
|
||||
///
|
||||
/// To update the properties of a PaymentIntent object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created
|
||||
#[utoipa::path(
|
||||
@ -223,8 +220,7 @@ pub async fn payments_update(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - Confirm
|
||||
|
||||
/// Payments - Confirm
|
||||
///
|
||||
/// This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments Create API
|
||||
#[utoipa::path(
|
||||
@ -284,8 +280,7 @@ pub async fn payments_confirm(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - Capture
|
||||
|
||||
/// Payments - Capture
|
||||
///
|
||||
/// To capture the funds for an uncaptured payment
|
||||
#[utoipa::path(
|
||||
@ -335,8 +330,7 @@ pub async fn payments_capture(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - Session token
|
||||
|
||||
/// Payments - Session token
|
||||
///
|
||||
/// To create the session object or to get session token for wallets
|
||||
#[utoipa::path(
|
||||
@ -434,8 +428,7 @@ pub async fn payments_redirect_response(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - Cancel
|
||||
|
||||
/// Payments - Cancel
|
||||
///
|
||||
/// A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action
|
||||
#[utoipa::path(
|
||||
@ -484,8 +477,7 @@ pub async fn payments_cancel(
|
||||
.await
|
||||
}
|
||||
|
||||
// Payments - List
|
||||
|
||||
/// Payments - List
|
||||
///
|
||||
/// To list the payments
|
||||
#[utoipa::path(
|
||||
|
||||
@ -8,8 +8,7 @@ use crate::{
|
||||
types::api::refunds,
|
||||
};
|
||||
|
||||
// Refunds - Create
|
||||
|
||||
/// Refunds - Create
|
||||
///
|
||||
/// To create a refund against an already processed payment
|
||||
#[utoipa::path(
|
||||
@ -41,8 +40,7 @@ pub async fn refunds_create(
|
||||
.await
|
||||
}
|
||||
|
||||
// Refunds - Retrieve
|
||||
|
||||
/// Refunds - Retrieve
|
||||
///
|
||||
/// To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment
|
||||
#[utoipa::path(
|
||||
@ -80,8 +78,7 @@ pub async fn refunds_retrieve(
|
||||
.await
|
||||
}
|
||||
|
||||
// Refunds - Update
|
||||
|
||||
/// Refunds - Update
|
||||
///
|
||||
/// To update the properties of a Refund object. This may include attaching a reason for the refund or metadata fields
|
||||
#[utoipa::path(
|
||||
@ -120,8 +117,7 @@ pub async fn refunds_update(
|
||||
.await
|
||||
}
|
||||
|
||||
// Refunds - List
|
||||
|
||||
/// Refunds - List
|
||||
///
|
||||
/// To list the refunds associated with a payment_id or with the merchant, if payment_id is not provided
|
||||
#[utoipa::path(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user