Skip to content

Commit

Permalink
fix(router): change click_to_pay const to snake_case and remove camel…
Browse files Browse the repository at this point in the history
…_case serde rename for clicktopay metadata (#6852)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
sai-harsha-vardhan and hyperswitch-bot[bot] authored Dec 16, 2024
1 parent 165ead6 commit 3d4fd2f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 39 deletions.
36 changes: 18 additions & 18 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6235,50 +6235,50 @@
"ClickToPaySessionResponse": {
"type": "object",
"required": [
"dpaId",
"dpaName",
"dpa_id",
"dpa_name",
"locale",
"cardBrands",
"acquirerBin",
"acquirerMerchantId",
"merchantCategoryCode",
"merchantCountryCode",
"transactionAmount",
"transactionCurrencyCode"
"card_brands",
"acquirer_bin",
"acquirer_merchant_id",
"merchant_category_code",
"merchant_country_code",
"transaction_amount",
"transaction_currency_code"
],
"properties": {
"dpaId": {
"dpa_id": {
"type": "string"
},
"dpaName": {
"dpa_name": {
"type": "string"
},
"locale": {
"type": "string"
},
"cardBrands": {
"card_brands": {
"type": "array",
"items": {
"type": "string"
}
},
"acquirerBin": {
"acquirer_bin": {
"type": "string"
},
"acquirerMerchantId": {
"acquirer_merchant_id": {
"type": "string"
},
"merchantCategoryCode": {
"merchant_category_code": {
"type": "string"
},
"merchantCountryCode": {
"merchant_country_code": {
"type": "string"
},
"transactionAmount": {
"transaction_amount": {
"type": "string",
"example": "38.02"
},
"transactionCurrencyCode": {
"transaction_currency_code": {
"$ref": "#/components/schemas/Currency"
}
}
Expand Down
36 changes: 18 additions & 18 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8679,50 +8679,50 @@
"ClickToPaySessionResponse": {
"type": "object",
"required": [
"dpaId",
"dpaName",
"dpa_id",
"dpa_name",
"locale",
"cardBrands",
"acquirerBin",
"acquirerMerchantId",
"merchantCategoryCode",
"merchantCountryCode",
"transactionAmount",
"transactionCurrencyCode"
"card_brands",
"acquirer_bin",
"acquirer_merchant_id",
"merchant_category_code",
"merchant_country_code",
"transaction_amount",
"transaction_currency_code"
],
"properties": {
"dpaId": {
"dpa_id": {
"type": "string"
},
"dpaName": {
"dpa_name": {
"type": "string"
},
"locale": {
"type": "string"
},
"cardBrands": {
"card_brands": {
"type": "array",
"items": {
"type": "string"
}
},
"acquirerBin": {
"acquirer_bin": {
"type": "string"
},
"acquirerMerchantId": {
"acquirer_merchant_id": {
"type": "string"
},
"merchantCategoryCode": {
"merchant_category_code": {
"type": "string"
},
"merchantCountryCode": {
"merchant_country_code": {
"type": "string"
},
"transactionAmount": {
"transaction_amount": {
"type": "string",
"example": "38.02"
},
"transactionCurrencyCode": {
"transaction_currency_code": {
"$ref": "#/components/schemas/Currency"
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6984,7 +6984,6 @@ pub struct ExtendedCardInfoResponse {
}

#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
#[serde(rename_all = "camelCase")]
pub struct ClickToPaySessionResponse {
pub dpa_id: String,
pub dpa_name: String,
Expand Down
1 change: 0 additions & 1 deletion crates/hyperswitch_domain_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ pub struct HeaderPayload {
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ClickToPayMetaData {
pub dpa_id: String,
pub dpa_name: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ pub const VAULT_GET_FINGERPRINT_FLOW_TYPE: &str = "get_fingerprint_vault";
pub const DYNAMIC_ROUTING_MAX_VOLUME: u8 = 100;

/// Click To Pay
pub const CLICK_TO_PAY: &str = "CLICK_TO_PAY";
pub const CLICK_TO_PAY: &str = "click_to_pay";

0 comments on commit 3d4fd2f

Please sign in to comment.