From 03aa4bf20135611a3b65366e9bfa55188747bd5e Mon Sep 17 00:00:00 2001 From: capoyon Date: Fri, 17 Jan 2025 12:30:22 +0800 Subject: [PATCH] add get billing group service discount --- billing/v1/billing.proto | 14 ++++++++++++ openapiv2/apidocs.swagger.json | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/billing/v1/billing.proto b/billing/v1/billing.proto index fd60fa69..df15dff9 100644 --- a/billing/v1/billing.proto +++ b/billing/v1/billing.proto @@ -262,6 +262,13 @@ service Billing { }; } + // Returns the service discount associated with the billing group id + rpc GetBillingGroupServiceDiscount(GetBGServiceDiscountRequest) returns (GetBGServiceDiscountResponse) { + option (google.api.http) = { + get: "/v1/servicediscounts/{groupId}/billinggroup" + }; + } + // Registers the reseller account. Only available in Ripple. rpc CreateReseller(CreateResellerRequest) returns (api.ripple.Reseller) { option (google.api.http) = { @@ -1836,3 +1843,10 @@ message RippleV2InvoiceListingResponse { string billingAmountGcp = 8; } +message GetBGServiceDiscountRequest { + string groupId = 1; +} + +message GetBGServiceDiscountResponse { + string serviceDiscountId = 1; +} diff --git a/openapiv2/apidocs.swagger.json b/openapiv2/apidocs.swagger.json index c75ee838..c2f51fbd 100644 --- a/openapiv2/apidocs.swagger.json +++ b/openapiv2/apidocs.swagger.json @@ -9837,6 +9837,37 @@ ] } }, + "/v1/servicediscounts/{groupId}/billinggroup": { + "get": { + "summary": "Returns the service discount associated with the billing group id", + "operationId": "Billing_GetBillingGroupServiceDiscount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetBGServiceDiscountResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Billing" + ] + } + }, "/v1/servicediscounts/{id}": { "get": { "summary": "WORK-IN-PROGRESS: Gets the invoice service discounts. Only available in Ripple.", @@ -27244,6 +27275,14 @@ } } }, + "v1GetBGServiceDiscountResponse": { + "type": "object", + "properties": { + "serviceDiscountId": { + "type": "string" + } + } + }, "v1GetBillingGroupResponse": { "type": "object", "properties": {