Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(customers_v2): Remove merchant reference id from v2 customer update (#7879)

Amey Waled6ad8522988a
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index ab487354ac..c1983fb1d7 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -9757,14 +9757,6 @@
"email"
],
"properties": {
- "merchant_reference_id": {
- "type": "string",
- "description": "The merchant identifier for the customer object.",
- "example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
- "nullable": true,
- "maxLength": 64,
- "minLength": 1
- },
"name": {
"type": "string",
"description": "The customer's name",
diff --git a/crates/api_models/src/customers.rs b/crates/api_models/src/customers.rs
index eb61cae6e4..90f849971b 100644
--- a/crates/api_models/src/customers.rs
+++ b/crates/api_models/src/customers.rs
@@ -313,9 +313,6 @@ impl CustomerUpdateRequest {
#[derive(Debug, Default, Clone, Deserialize, Serialize, ToSchema)]
#[serde(deny_unknown_fields)]
pub struct CustomerUpdateRequest {
- /// The merchant identifier for the customer object.
- #[schema(value_type = Option<String>, max_length = 64, min_length = 1, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
- pub merchant_reference_id: Option<id_type::CustomerId>,
/// The customer's name
#[schema(max_length = 255, value_type = String, example = "Jon Test")]
pub name: Option<Secret<String>>,
@@ -349,10 +346,6 @@ pub struct CustomerUpdateRequest {
#[cfg(all(feature = "v2", feature = "customer_v2"))]
impl CustomerUpdateRequest {
- pub fn get_merchant_reference_id(&self) -> Option<id_type::CustomerId> {
- self.merchant_reference_id.clone()
- }
-
pub fn get_default_customer_billing_address(&self) -> Option<payments::AddressDetails> {
self.default_billing_address.clone()
}