Added billing attach/detach endpoints doc
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
"$ref": "#/components/parameters/userID"
},
{
- "in": "path",
- "name": "paymentMethodID",
- "description": "Payment Method ID",
- "required": true,
- "schema": {
- "type": "string"
- }
+ "$ref": "#/components/parameters/paymentMethodID"
}
],
"tags": [
}
}
},
+ "/users/{id}/payment-methods/{paymentMethodID}/attach": {
+ "post": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Creates a new payment method and attach it to the user as its default",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/userID"
+ },
+ {
+ "$ref": "#/components/parameters/paymentMethodID"
+ }
+ ],
+ "tags": [
+ "Billing"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully attached user payment method",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BillingOperationResult"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ },
+ "550": {
+ "$ref": "#/components/responses/ResourceDoesNotExists"
+ }
+ }
+ }
+ },
+ "/users/{id}/payment-methods/{paymentMethodID}/detach": {
+ "post": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Detach a payment method from the user",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/userID"
+ },
+ {
+ "$ref": "#/components/parameters/paymentMethodID"
+ }
+ ],
+ "tags": [
+ "Billing"
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully detached user payment method",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BillingOperationResult"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ },
+ "550": {
+ "$ref": "#/components/responses/ResourceDoesNotExists"
+ }
+ }
+ }
+ },
"/api/tags": {
"get": {
"security": [
"200": {
"description": "Return statistics",
"content": {
- "text/csv": {
- }
+ "text/csv": {}
}
},
"401": {
}
}
},
- "/api/billing/settings": {
+ "/api/billing-setting": {
"get": {
"security": [
{
"type": "number",
"minimum": 0
}
+ },
+ "paymentMethodID": {
+ "in": "path",
+ "name": "paymentMethodID",
+ "description": "Payment Method ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
}
}

Added billing attach/detach endpoints doc