refactor(customers_v2): address panics and some bugs in customers v2 endpoints (#6836)

This commit is contained in:
Sanchith Hegde
2024-12-17 15:54:27 +05:30
committed by GitHub
parent 588ce408b4
commit dfbfce4e42
56 changed files with 909 additions and 478 deletions

View File

@ -2266,7 +2266,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerRequest"
"$ref": "#/components/schemas/CustomerUpdateRequest"
},
"examples": {
"Update name and email of a customer": {
@ -10036,6 +10036,60 @@
}
}
},
"CustomerUpdateRequest": {
"type": "object",
"description": "The identifier for the customer object. If not provided the customer ID will be autogenerated.",
"properties": {
"name": {
"type": "string",
"description": "The customer's name",
"example": "Jon Test",
"nullable": true,
"maxLength": 255
},
"email": {
"type": "string",
"description": "The customer's email address",
"example": "JonTest@test.com",
"nullable": true,
"maxLength": 255
},
"phone": {
"type": "string",
"description": "The customer's phone number",
"example": "9123456789",
"nullable": true,
"maxLength": 255
},
"description": {
"type": "string",
"description": "An arbitrary string that you can attach to a customer object.",
"example": "First Customer",
"nullable": true,
"maxLength": 255
},
"phone_country_code": {
"type": "string",
"description": "The country code for the customer phone number",
"example": "+65",
"nullable": true,
"maxLength": 255
},
"address": {
"allOf": [
{
"$ref": "#/components/schemas/AddressDetails"
}
],
"nullable": true
},
"metadata": {
"type": "object",
"description": "You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\ncharacters long. Metadata is useful for storing additional, structured information on an\nobject.",
"nullable": true
}
}
},
"DecoupledAuthenticationType": {
"type": "string",
"enum": [