Skip to content

Commit 3d4fd2f

Browse files
fix(router): change click_to_pay const to snake_case and remove camel_case serde rename for clicktopay metadata (#6852)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
1 parent 165ead6 commit 3d4fd2f

File tree

5 files changed

+37
-39
lines changed

5 files changed

+37
-39
lines changed

api-reference-v2/openapi_spec.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -6235,50 +6235,50 @@
62356235
"ClickToPaySessionResponse": {
62366236
"type": "object",
62376237
"required": [
6238-
"dpaId",
6239-
"dpaName",
6238+
"dpa_id",
6239+
"dpa_name",
62406240
"locale",
6241-
"cardBrands",
6242-
"acquirerBin",
6243-
"acquirerMerchantId",
6244-
"merchantCategoryCode",
6245-
"merchantCountryCode",
6246-
"transactionAmount",
6247-
"transactionCurrencyCode"
6241+
"card_brands",
6242+
"acquirer_bin",
6243+
"acquirer_merchant_id",
6244+
"merchant_category_code",
6245+
"merchant_country_code",
6246+
"transaction_amount",
6247+
"transaction_currency_code"
62486248
],
62496249
"properties": {
6250-
"dpaId": {
6250+
"dpa_id": {
62516251
"type": "string"
62526252
},
6253-
"dpaName": {
6253+
"dpa_name": {
62546254
"type": "string"
62556255
},
62566256
"locale": {
62576257
"type": "string"
62586258
},
6259-
"cardBrands": {
6259+
"card_brands": {
62606260
"type": "array",
62616261
"items": {
62626262
"type": "string"
62636263
}
62646264
},
6265-
"acquirerBin": {
6265+
"acquirer_bin": {
62666266
"type": "string"
62676267
},
6268-
"acquirerMerchantId": {
6268+
"acquirer_merchant_id": {
62696269
"type": "string"
62706270
},
6271-
"merchantCategoryCode": {
6271+
"merchant_category_code": {
62726272
"type": "string"
62736273
},
6274-
"merchantCountryCode": {
6274+
"merchant_country_code": {
62756275
"type": "string"
62766276
},
6277-
"transactionAmount": {
6277+
"transaction_amount": {
62786278
"type": "string",
62796279
"example": "38.02"
62806280
},
6281-
"transactionCurrencyCode": {
6281+
"transaction_currency_code": {
62826282
"$ref": "#/components/schemas/Currency"
62836283
}
62846284
}

api-reference/openapi_spec.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -8679,50 +8679,50 @@
86798679
"ClickToPaySessionResponse": {
86808680
"type": "object",
86818681
"required": [
8682-
"dpaId",
8683-
"dpaName",
8682+
"dpa_id",
8683+
"dpa_name",
86848684
"locale",
8685-
"cardBrands",
8686-
"acquirerBin",
8687-
"acquirerMerchantId",
8688-
"merchantCategoryCode",
8689-
"merchantCountryCode",
8690-
"transactionAmount",
8691-
"transactionCurrencyCode"
8685+
"card_brands",
8686+
"acquirer_bin",
8687+
"acquirer_merchant_id",
8688+
"merchant_category_code",
8689+
"merchant_country_code",
8690+
"transaction_amount",
8691+
"transaction_currency_code"
86928692
],
86938693
"properties": {
8694-
"dpaId": {
8694+
"dpa_id": {
86958695
"type": "string"
86968696
},
8697-
"dpaName": {
8697+
"dpa_name": {
86988698
"type": "string"
86998699
},
87008700
"locale": {
87018701
"type": "string"
87028702
},
8703-
"cardBrands": {
8703+
"card_brands": {
87048704
"type": "array",
87058705
"items": {
87068706
"type": "string"
87078707
}
87088708
},
8709-
"acquirerBin": {
8709+
"acquirer_bin": {
87108710
"type": "string"
87118711
},
8712-
"acquirerMerchantId": {
8712+
"acquirer_merchant_id": {
87138713
"type": "string"
87148714
},
8715-
"merchantCategoryCode": {
8715+
"merchant_category_code": {
87168716
"type": "string"
87178717
},
8718-
"merchantCountryCode": {
8718+
"merchant_country_code": {
87198719
"type": "string"
87208720
},
8721-
"transactionAmount": {
8721+
"transaction_amount": {
87228722
"type": "string",
87238723
"example": "38.02"
87248724
},
8725-
"transactionCurrencyCode": {
8725+
"transaction_currency_code": {
87268726
"$ref": "#/components/schemas/Currency"
87278727
}
87288728
}

crates/api_models/src/payments.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6984,7 +6984,6 @@ pub struct ExtendedCardInfoResponse {
69846984
}
69856985

69866986
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
6987-
#[serde(rename_all = "camelCase")]
69886987
pub struct ClickToPaySessionResponse {
69896988
pub dpa_id: String,
69906989
pub dpa_name: String,

crates/hyperswitch_domain_models/src/payments.rs

-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ pub struct HeaderPayload {
521521
}
522522

523523
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
524-
#[serde(rename_all = "camelCase")]
525524
pub struct ClickToPayMetaData {
526525
pub dpa_id: String,
527526
pub dpa_name: String,

crates/router/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ pub const VAULT_GET_FINGERPRINT_FLOW_TYPE: &str = "get_fingerprint_vault";
209209
pub const DYNAMIC_ROUTING_MAX_VOLUME: u8 = 100;
210210

211211
/// Click To Pay
212-
pub const CLICK_TO_PAY: &str = "CLICK_TO_PAY";
212+
pub const CLICK_TO_PAY: &str = "click_to_pay";

0 commit comments

Comments
 (0)