mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(router): Move organization_id to request header from request body for v2 (#6277)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com>
This commit is contained in:
@ -154,7 +154,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::organization::OrganizationCreateRequest,
|
||||
api_models::organization::OrganizationUpdateRequest,
|
||||
api_models::organization::OrganizationResponse,
|
||||
api_models::admin::MerchantAccountCreate,
|
||||
api_models::admin::MerchantAccountCreateWithoutOrgId,
|
||||
api_models::admin::MerchantAccountUpdate,
|
||||
api_models::admin::MerchantAccountDeleteResponse,
|
||||
api_models::admin::MerchantConnectorDeleteResponse,
|
||||
|
||||
@ -51,6 +51,13 @@ pub async fn merchant_account_create() {}
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/v2/merchant_accounts",
|
||||
params(
|
||||
(
|
||||
"X-Organization-Id" = String, Header,
|
||||
description = "Organization ID for which the merchant account has to be created.",
|
||||
example = json!({"X-Organization-Id": "org_abcdefghijklmnop"})
|
||||
),
|
||||
),
|
||||
request_body(
|
||||
content = MerchantAccountCreate,
|
||||
examples(
|
||||
@ -58,7 +65,6 @@ pub async fn merchant_account_create() {}
|
||||
"Create a merchant account with minimal fields" = (
|
||||
value = json!({
|
||||
"merchant_name": "Cloth Store",
|
||||
"organization_id": "org_abcdefghijklmnop"
|
||||
})
|
||||
)
|
||||
),
|
||||
@ -66,7 +72,6 @@ pub async fn merchant_account_create() {}
|
||||
"Create a merchant account with merchant details" = (
|
||||
value = json!({
|
||||
"merchant_name": "Cloth Store",
|
||||
"organization_id": "org_abcdefghijklmnop",
|
||||
"merchant_details": {
|
||||
"primary_contact_person": "John Doe",
|
||||
"primary_email": "example@company.com"
|
||||
@ -78,7 +83,6 @@ pub async fn merchant_account_create() {}
|
||||
"Create a merchant account with metadata" = (
|
||||
value = json!({
|
||||
"merchant_name": "Cloth Store",
|
||||
"organization_id": "org_abcdefghijklmnop",
|
||||
"metadata": {
|
||||
"key_1": "John Doe",
|
||||
"key_2": "Trends"
|
||||
|
||||
Reference in New Issue
Block a user