From 8cd3b4b9d89cb17a6810e8dff7e75eb6cfa1ed30 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 29 Oct 2024 14:59:32 +0100 Subject: [PATCH] Decouple admit from addbalance (#172) --- docs/docs.json | 116 +------ examples/ts/package.json | 12 +- go.mod | 6 +- go.sum | 16 +- go/admin/v1/adminv1connect/payment.connect.go | 32 -- go/admin/v1/payment.pb.go | 296 +++++------------- go/admin/v1/tenant.pb.go | 146 ++++----- go/permissions/servicepermissions.go | 3 - .../v1/adminv1connect/PaymentServiceClient.go | 30 -- .../adminv1connect/PaymentServiceHandler.go | 30 -- js/admin/v1/payment_connect.d.ts | 13 +- js/admin/v1/payment_connect.js | 13 +- js/admin/v1/payment_connect.ts | 13 +- js/admin/v1/payment_pb.d.ts | 58 +--- js/admin/v1/payment_pb.js | 77 +---- js/admin/v1/payment_pb.ts | 104 +----- js/admin/v1/tenant_pb.d.ts | 12 - js/admin/v1/tenant_pb.js | 2 - js/admin/v1/tenant_pb.ts | 16 - js/bun.lockb | Bin 2531 -> 2531 bytes js/package.json | 6 +- js/permissions/servicepermissions.json | 3 - proto/admin/v1/payment.proto | 27 +- proto/admin/v1/tenant.proto | 4 - 24 files changed, 198 insertions(+), 837 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 14d7b299..b73b3506 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -4416,12 +4416,12 @@ "extensions": [], "fields": [ { - "name": "customer", - "description": "Customer is the customer", + "name": "tenant_id", + "description": "Tenant is the tenant", "label": "", - "type": "PaymentCustomer", - "longType": "api.v1.PaymentCustomer", - "fullType": "api.v1.PaymentCustomer", + "type": "string", + "longType": "string", + "fullType": "string", "ismap": false, "isoneof": false, "oneofdecl": "", @@ -4429,11 +4429,11 @@ }, { "name": "balance_to_add", - "description": "BalanceToAdd is the balance which should be added to the customer", + "description": "BalanceToAdd is the balance in euro cent which should be added to the customer", "label": "", - "type": "int64", - "longType": "int64", - "fullType": "int64", + "type": "uint64", + "longType": "uint64", + "fullType": "uint64", "ismap": false, "isoneof": false, "oneofdecl": "", @@ -4465,66 +4465,6 @@ } ] }, - { - "name": "PaymentServiceAddCouponToCustomerRequest", - "longName": "PaymentServiceAddCouponToCustomerRequest", - "fullName": "admin.v1.PaymentServiceAddCouponToCustomerRequest", - "description": "PaymentServiceAddCouponToCustomerRequest is the request payload for the coupons add to customer request", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "customer", - "description": "Customer is the customer", - "label": "", - "type": "PaymentCustomer", - "longType": "api.v1.PaymentCustomer", - "fullType": "api.v1.PaymentCustomer", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "coupon_id", - "description": "CouponId is the id of the coupon which should be granted to the customer", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "PaymentServiceAddCouponToCustomerResponse", - "longName": "PaymentServiceAddCouponToCustomerResponse", - "fullName": "admin.v1.PaymentServiceAddCouponToCustomerResponse", - "description": "PaymentServiceAddCouponToCustomerResponse is the response payload for the coupons add to customer request", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "customer", - "description": "Customer is the customer", - "label": "", - "type": "PaymentCustomer", - "longType": "api.v1.PaymentCustomer", - "fullType": "api.v1.PaymentCustomer", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, { "name": "PaymentServiceListCouponsRequest", "longName": "PaymentServiceListCouponsRequest", @@ -4580,18 +4520,6 @@ "responseFullType": "admin.v1.PaymentServiceListCouponsResponse", "responseStreaming": false }, - { - "name": "AddCouponToCustomer", - "description": "AddCouponToCustomer adds a coupon to a customer", - "requestType": "PaymentServiceAddCouponToCustomerRequest", - "requestLongType": "PaymentServiceAddCouponToCustomerRequest", - "requestFullType": "admin.v1.PaymentServiceAddCouponToCustomerRequest", - "requestStreaming": false, - "responseType": "PaymentServiceAddCouponToCustomerResponse", - "responseLongType": "PaymentServiceAddCouponToCustomerResponse", - "responseFullType": "admin.v1.PaymentServiceAddCouponToCustomerResponse", - "responseStreaming": false - }, { "name": "AddBalanceToCustomer", "description": "AddBalanceToCustomer adds balance to a customer", @@ -9568,7 +9496,7 @@ "description": "TenantServiceAdmitRequest is the request payload for a tenant admit request", "hasExtensions": false, "hasFields": true, - "hasOneofs": true, + "hasOneofs": false, "extensions": [], "fields": [ { @@ -9582,30 +9510,6 @@ "isoneof": false, "oneofdecl": "", "defaultValue": "" - }, - { - "name": "coupon_id", - "description": "CouponId is the id of the coupon this tenant should get", - "label": "optional", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": true, - "oneofdecl": "_coupon_id", - "defaultValue": "" - }, - { - "name": "balance_to_add", - "description": "BalanceToAdd is the amount of balance he should be granted", - "label": "optional", - "type": "int64", - "longType": "int64", - "fullType": "int64", - "ismap": false, - "isoneof": true, - "oneofdecl": "_balance_to_add", - "defaultValue": "" } ] }, diff --git a/examples/ts/package.json b/examples/ts/package.json index ff5cf424..858b78ac 100644 --- a/examples/ts/package.json +++ b/examples/ts/package.json @@ -4,12 +4,12 @@ "type": "module", "main": "cluster-list.ts", "dependencies": { - "@bufbuild/protobuf": "^1.9.0", - "@connectrpc/connect": "^1.4.0", - "@connectrpc/connect-node": "^1.4.0", - "@metal-stack-cloud/api": "^0.9.5", + "@bufbuild/protobuf": "^1.10.0", + "@connectrpc/connect": "^1.5.0", + "@connectrpc/connect-node": "^1.5.0", + "@connectrpc/connect-web": "^1.5.0", + "@metal-stack-cloud/api": "^0.10.2", "dotenv": "^16.4.5", - "ts-node": "^10.9.2", - "@connectrpc/connect-web": "^1.4.0" + "ts-node": "^10.9.2" } } diff --git a/go.mod b/go.mod index 201f4747..05be9b05 100644 --- a/go.mod +++ b/go.mod @@ -17,15 +17,15 @@ require ( github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/cel-go v0.21.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/objx v0.5.2 // indirect golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect golang.org/x/text v0.19.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 03489204..1ff23da5 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ github.com/google/cel-go v0.21.0 h1:cl6uW/gxN+Hy50tNYvI691+sXxioCnstFzLp2WO4GCI= github.com/google/cel-go v0.21.0/go.mod h1:rHUlWCcBKgyEk+eV03RPdZUekPp6YcJwV0FxuUksYxc= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/connect-compress/v2 v2.0.0 h1:L7TVsLa6Oo9Hkkb6r3DwSrhBbcWlXjneqBj7fCRXviU= github.com/klauspost/connect-compress/v2 v2.0.0/go.mod h1:604CD9JSAjGqtVzCM4SRgM/9TFTkWBcp+2wlQfGyJ6c= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -50,14 +50,14 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go/admin/v1/adminv1connect/payment.connect.go b/go/admin/v1/adminv1connect/payment.connect.go index 3d2e6ae5..310706be 100644 --- a/go/admin/v1/adminv1connect/payment.connect.go +++ b/go/admin/v1/adminv1connect/payment.connect.go @@ -36,9 +36,6 @@ const ( // PaymentServiceListCouponsProcedure is the fully-qualified name of the PaymentService's // ListCoupons RPC. PaymentServiceListCouponsProcedure = "/admin.v1.PaymentService/ListCoupons" - // PaymentServiceAddCouponToCustomerProcedure is the fully-qualified name of the PaymentService's - // AddCouponToCustomer RPC. - PaymentServiceAddCouponToCustomerProcedure = "/admin.v1.PaymentService/AddCouponToCustomer" // PaymentServiceAddBalanceToCustomerProcedure is the fully-qualified name of the PaymentService's // AddBalanceToCustomer RPC. PaymentServiceAddBalanceToCustomerProcedure = "/admin.v1.PaymentService/AddBalanceToCustomer" @@ -48,7 +45,6 @@ const ( var ( paymentServiceServiceDescriptor = v1.File_admin_v1_payment_proto.Services().ByName("PaymentService") paymentServiceListCouponsMethodDescriptor = paymentServiceServiceDescriptor.Methods().ByName("ListCoupons") - paymentServiceAddCouponToCustomerMethodDescriptor = paymentServiceServiceDescriptor.Methods().ByName("AddCouponToCustomer") paymentServiceAddBalanceToCustomerMethodDescriptor = paymentServiceServiceDescriptor.Methods().ByName("AddBalanceToCustomer") ) @@ -56,8 +52,6 @@ var ( type PaymentServiceClient interface { // ListCoupons list all available coupons ListCoupons(context.Context, *connect.Request[v1.PaymentServiceListCouponsRequest]) (*connect.Response[v1.PaymentServiceListCouponsResponse], error) - // AddCouponToCustomer adds a coupon to a customer - AddCouponToCustomer(context.Context, *connect.Request[v1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddCouponToCustomerResponse], error) // AddBalanceToCustomer adds balance to a customer AddBalanceToCustomer(context.Context, *connect.Request[v1.PaymentServiceAddBalanceToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddBalanceToCustomerResponse], error) } @@ -78,12 +72,6 @@ func NewPaymentServiceClient(httpClient connect.HTTPClient, baseURL string, opts connect.WithSchema(paymentServiceListCouponsMethodDescriptor), connect.WithClientOptions(opts...), ), - addCouponToCustomer: connect.NewClient[v1.PaymentServiceAddCouponToCustomerRequest, v1.PaymentServiceAddCouponToCustomerResponse]( - httpClient, - baseURL+PaymentServiceAddCouponToCustomerProcedure, - connect.WithSchema(paymentServiceAddCouponToCustomerMethodDescriptor), - connect.WithClientOptions(opts...), - ), addBalanceToCustomer: connect.NewClient[v1.PaymentServiceAddBalanceToCustomerRequest, v1.PaymentServiceAddBalanceToCustomerResponse]( httpClient, baseURL+PaymentServiceAddBalanceToCustomerProcedure, @@ -96,7 +84,6 @@ func NewPaymentServiceClient(httpClient connect.HTTPClient, baseURL string, opts // paymentServiceClient implements PaymentServiceClient. type paymentServiceClient struct { listCoupons *connect.Client[v1.PaymentServiceListCouponsRequest, v1.PaymentServiceListCouponsResponse] - addCouponToCustomer *connect.Client[v1.PaymentServiceAddCouponToCustomerRequest, v1.PaymentServiceAddCouponToCustomerResponse] addBalanceToCustomer *connect.Client[v1.PaymentServiceAddBalanceToCustomerRequest, v1.PaymentServiceAddBalanceToCustomerResponse] } @@ -105,11 +92,6 @@ func (c *paymentServiceClient) ListCoupons(ctx context.Context, req *connect.Req return c.listCoupons.CallUnary(ctx, req) } -// AddCouponToCustomer calls admin.v1.PaymentService.AddCouponToCustomer. -func (c *paymentServiceClient) AddCouponToCustomer(ctx context.Context, req *connect.Request[v1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddCouponToCustomerResponse], error) { - return c.addCouponToCustomer.CallUnary(ctx, req) -} - // AddBalanceToCustomer calls admin.v1.PaymentService.AddBalanceToCustomer. func (c *paymentServiceClient) AddBalanceToCustomer(ctx context.Context, req *connect.Request[v1.PaymentServiceAddBalanceToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddBalanceToCustomerResponse], error) { return c.addBalanceToCustomer.CallUnary(ctx, req) @@ -119,8 +101,6 @@ func (c *paymentServiceClient) AddBalanceToCustomer(ctx context.Context, req *co type PaymentServiceHandler interface { // ListCoupons list all available coupons ListCoupons(context.Context, *connect.Request[v1.PaymentServiceListCouponsRequest]) (*connect.Response[v1.PaymentServiceListCouponsResponse], error) - // AddCouponToCustomer adds a coupon to a customer - AddCouponToCustomer(context.Context, *connect.Request[v1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddCouponToCustomerResponse], error) // AddBalanceToCustomer adds balance to a customer AddBalanceToCustomer(context.Context, *connect.Request[v1.PaymentServiceAddBalanceToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddBalanceToCustomerResponse], error) } @@ -137,12 +117,6 @@ func NewPaymentServiceHandler(svc PaymentServiceHandler, opts ...connect.Handler connect.WithSchema(paymentServiceListCouponsMethodDescriptor), connect.WithHandlerOptions(opts...), ) - paymentServiceAddCouponToCustomerHandler := connect.NewUnaryHandler( - PaymentServiceAddCouponToCustomerProcedure, - svc.AddCouponToCustomer, - connect.WithSchema(paymentServiceAddCouponToCustomerMethodDescriptor), - connect.WithHandlerOptions(opts...), - ) paymentServiceAddBalanceToCustomerHandler := connect.NewUnaryHandler( PaymentServiceAddBalanceToCustomerProcedure, svc.AddBalanceToCustomer, @@ -153,8 +127,6 @@ func NewPaymentServiceHandler(svc PaymentServiceHandler, opts ...connect.Handler switch r.URL.Path { case PaymentServiceListCouponsProcedure: paymentServiceListCouponsHandler.ServeHTTP(w, r) - case PaymentServiceAddCouponToCustomerProcedure: - paymentServiceAddCouponToCustomerHandler.ServeHTTP(w, r) case PaymentServiceAddBalanceToCustomerProcedure: paymentServiceAddBalanceToCustomerHandler.ServeHTTP(w, r) default: @@ -170,10 +142,6 @@ func (UnimplementedPaymentServiceHandler) ListCoupons(context.Context, *connect. return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.PaymentService.ListCoupons is not implemented")) } -func (UnimplementedPaymentServiceHandler) AddCouponToCustomer(context.Context, *connect.Request[v1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddCouponToCustomerResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.PaymentService.AddCouponToCustomer is not implemented")) -} - func (UnimplementedPaymentServiceHandler) AddBalanceToCustomer(context.Context, *connect.Request[v1.PaymentServiceAddBalanceToCustomerRequest]) (*connect.Response[v1.PaymentServiceAddBalanceToCustomerResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.PaymentService.AddBalanceToCustomer is not implemented")) } diff --git a/go/admin/v1/payment.pb.go b/go/admin/v1/payment.pb.go index dbb23c7a..cb10d698 100644 --- a/go/admin/v1/payment.pb.go +++ b/go/admin/v1/payment.pb.go @@ -7,7 +7,6 @@ package adminv1 import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" v1 "github.com/metal-stack-cloud/api/go/api/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -106,124 +105,21 @@ func (x *PaymentServiceListCouponsResponse) GetCoupons() []*v1.Coupon { return nil } -// PaymentServiceAddCouponToCustomerRequest is the request payload for the coupons add to customer request -type PaymentServiceAddCouponToCustomerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Customer is the customer - Customer *v1.PaymentCustomer `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"` - // CouponId is the id of the coupon which should be granted to the customer - CouponId string `protobuf:"bytes,2,opt,name=coupon_id,json=couponId,proto3" json:"coupon_id,omitempty"` -} - -func (x *PaymentServiceAddCouponToCustomerRequest) Reset() { - *x = PaymentServiceAddCouponToCustomerRequest{} - mi := &file_admin_v1_payment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PaymentServiceAddCouponToCustomerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PaymentServiceAddCouponToCustomerRequest) ProtoMessage() {} - -func (x *PaymentServiceAddCouponToCustomerRequest) ProtoReflect() protoreflect.Message { - mi := &file_admin_v1_payment_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PaymentServiceAddCouponToCustomerRequest.ProtoReflect.Descriptor instead. -func (*PaymentServiceAddCouponToCustomerRequest) Descriptor() ([]byte, []int) { - return file_admin_v1_payment_proto_rawDescGZIP(), []int{2} -} - -func (x *PaymentServiceAddCouponToCustomerRequest) GetCustomer() *v1.PaymentCustomer { - if x != nil { - return x.Customer - } - return nil -} - -func (x *PaymentServiceAddCouponToCustomerRequest) GetCouponId() string { - if x != nil { - return x.CouponId - } - return "" -} - -// PaymentServiceAddCouponToCustomerResponse is the response payload for the coupons add to customer request -type PaymentServiceAddCouponToCustomerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Customer is the customer - Customer *v1.PaymentCustomer `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"` -} - -func (x *PaymentServiceAddCouponToCustomerResponse) Reset() { - *x = PaymentServiceAddCouponToCustomerResponse{} - mi := &file_admin_v1_payment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PaymentServiceAddCouponToCustomerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PaymentServiceAddCouponToCustomerResponse) ProtoMessage() {} - -func (x *PaymentServiceAddCouponToCustomerResponse) ProtoReflect() protoreflect.Message { - mi := &file_admin_v1_payment_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PaymentServiceAddCouponToCustomerResponse.ProtoReflect.Descriptor instead. -func (*PaymentServiceAddCouponToCustomerResponse) Descriptor() ([]byte, []int) { - return file_admin_v1_payment_proto_rawDescGZIP(), []int{3} -} - -func (x *PaymentServiceAddCouponToCustomerResponse) GetCustomer() *v1.PaymentCustomer { - if x != nil { - return x.Customer - } - return nil -} - // PaymentServiceAddBalanceToCustomerRequest is the request payload for the balance to customer request type PaymentServiceAddBalanceToCustomerRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Customer is the customer - Customer *v1.PaymentCustomer `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"` - // BalanceToAdd is the balance which should be added to the customer - BalanceToAdd int64 `protobuf:"varint,2,opt,name=balance_to_add,json=balanceToAdd,proto3" json:"balance_to_add,omitempty"` + // Tenant is the tenant + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` + // BalanceToAdd is the balance in euro cent which should be added to the customer + BalanceToAdd uint64 `protobuf:"varint,2,opt,name=balance_to_add,json=balanceToAdd,proto3" json:"balance_to_add,omitempty"` } func (x *PaymentServiceAddBalanceToCustomerRequest) Reset() { *x = PaymentServiceAddBalanceToCustomerRequest{} - mi := &file_admin_v1_payment_proto_msgTypes[4] + mi := &file_admin_v1_payment_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -235,7 +131,7 @@ func (x *PaymentServiceAddBalanceToCustomerRequest) String() string { func (*PaymentServiceAddBalanceToCustomerRequest) ProtoMessage() {} func (x *PaymentServiceAddBalanceToCustomerRequest) ProtoReflect() protoreflect.Message { - mi := &file_admin_v1_payment_proto_msgTypes[4] + mi := &file_admin_v1_payment_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -248,17 +144,17 @@ func (x *PaymentServiceAddBalanceToCustomerRequest) ProtoReflect() protoreflect. // Deprecated: Use PaymentServiceAddBalanceToCustomerRequest.ProtoReflect.Descriptor instead. func (*PaymentServiceAddBalanceToCustomerRequest) Descriptor() ([]byte, []int) { - return file_admin_v1_payment_proto_rawDescGZIP(), []int{4} + return file_admin_v1_payment_proto_rawDescGZIP(), []int{2} } -func (x *PaymentServiceAddBalanceToCustomerRequest) GetCustomer() *v1.PaymentCustomer { +func (x *PaymentServiceAddBalanceToCustomerRequest) GetTenantId() string { if x != nil { - return x.Customer + return x.TenantId } - return nil + return "" } -func (x *PaymentServiceAddBalanceToCustomerRequest) GetBalanceToAdd() int64 { +func (x *PaymentServiceAddBalanceToCustomerRequest) GetBalanceToAdd() uint64 { if x != nil { return x.BalanceToAdd } @@ -277,7 +173,7 @@ type PaymentServiceAddBalanceToCustomerResponse struct { func (x *PaymentServiceAddBalanceToCustomerResponse) Reset() { *x = PaymentServiceAddBalanceToCustomerResponse{} - mi := &file_admin_v1_payment_proto_msgTypes[5] + mi := &file_admin_v1_payment_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -289,7 +185,7 @@ func (x *PaymentServiceAddBalanceToCustomerResponse) String() string { func (*PaymentServiceAddBalanceToCustomerResponse) ProtoMessage() {} func (x *PaymentServiceAddBalanceToCustomerResponse) ProtoReflect() protoreflect.Message { - mi := &file_admin_v1_payment_proto_msgTypes[5] + mi := &file_admin_v1_payment_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -302,7 +198,7 @@ func (x *PaymentServiceAddBalanceToCustomerResponse) ProtoReflect() protoreflect // Deprecated: Use PaymentServiceAddBalanceToCustomerResponse.ProtoReflect.Descriptor instead. func (*PaymentServiceAddBalanceToCustomerResponse) Descriptor() ([]byte, []int) { - return file_admin_v1_payment_proto_rawDescGZIP(), []int{5} + return file_admin_v1_payment_proto_rawDescGZIP(), []int{3} } func (x *PaymentServiceAddBalanceToCustomerResponse) GetCustomer() *v1.PaymentCustomer { @@ -319,81 +215,54 @@ var file_admin_v1_payment_proto_rawDesc = []byte{ 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, - 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x20, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, - 0x0a, 0x21, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x75, 0x70, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x22, 0x7c, 0x0a, - 0x28, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, - 0x64, 0x64, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x1b, - 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x29, 0x50, - 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, - 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x22, 0x8f, 0x01, - 0x0a, 0x29, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, - 0x12, 0x2d, 0x0a, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x61, - 0x64, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x20, - 0x00, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x22, - 0x61, 0x0a, 0x2a, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, - 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x65, 0x72, 0x32, 0x93, 0x03, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x75, - 0x70, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, - 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xd2, - 0xf3, 0x18, 0x02, 0x01, 0x02, 0x12, 0x85, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x75, - 0x70, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x32, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, - 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x43, 0x6f, - 0x75, 0x70, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x12, 0x88, 0x01, - 0x0a, 0x14, 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, - 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x50, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x2d, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x08, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, + 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x4d, 0x0a, 0x21, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, + 0x22, 0x6e, 0x0a, 0x29, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x41, 0x64, 0x64, + 0x22, 0x61, 0x0a, 0x2a, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x32, 0x8b, 0x02, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, + 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, + 0xd2, 0xf3, 0x18, 0x02, 0x01, 0x02, 0x12, 0x88, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, + 0x33, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, + 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, + 0x01, 0x42, 0x93, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x42, 0x0c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x6c, 0x2d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, + 0x08, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -408,34 +277,27 @@ func file_admin_v1_payment_proto_rawDescGZIP() []byte { return file_admin_v1_payment_proto_rawDescData } -var file_admin_v1_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_admin_v1_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_admin_v1_payment_proto_goTypes = []any{ (*PaymentServiceListCouponsRequest)(nil), // 0: admin.v1.PaymentServiceListCouponsRequest (*PaymentServiceListCouponsResponse)(nil), // 1: admin.v1.PaymentServiceListCouponsResponse - (*PaymentServiceAddCouponToCustomerRequest)(nil), // 2: admin.v1.PaymentServiceAddCouponToCustomerRequest - (*PaymentServiceAddCouponToCustomerResponse)(nil), // 3: admin.v1.PaymentServiceAddCouponToCustomerResponse - (*PaymentServiceAddBalanceToCustomerRequest)(nil), // 4: admin.v1.PaymentServiceAddBalanceToCustomerRequest - (*PaymentServiceAddBalanceToCustomerResponse)(nil), // 5: admin.v1.PaymentServiceAddBalanceToCustomerResponse - (*v1.Coupon)(nil), // 6: api.v1.Coupon - (*v1.PaymentCustomer)(nil), // 7: api.v1.PaymentCustomer + (*PaymentServiceAddBalanceToCustomerRequest)(nil), // 2: admin.v1.PaymentServiceAddBalanceToCustomerRequest + (*PaymentServiceAddBalanceToCustomerResponse)(nil), // 3: admin.v1.PaymentServiceAddBalanceToCustomerResponse + (*v1.Coupon)(nil), // 4: api.v1.Coupon + (*v1.PaymentCustomer)(nil), // 5: api.v1.PaymentCustomer } var file_admin_v1_payment_proto_depIdxs = []int32{ - 6, // 0: admin.v1.PaymentServiceListCouponsResponse.coupons:type_name -> api.v1.Coupon - 7, // 1: admin.v1.PaymentServiceAddCouponToCustomerRequest.customer:type_name -> api.v1.PaymentCustomer - 7, // 2: admin.v1.PaymentServiceAddCouponToCustomerResponse.customer:type_name -> api.v1.PaymentCustomer - 7, // 3: admin.v1.PaymentServiceAddBalanceToCustomerRequest.customer:type_name -> api.v1.PaymentCustomer - 7, // 4: admin.v1.PaymentServiceAddBalanceToCustomerResponse.customer:type_name -> api.v1.PaymentCustomer - 0, // 5: admin.v1.PaymentService.ListCoupons:input_type -> admin.v1.PaymentServiceListCouponsRequest - 2, // 6: admin.v1.PaymentService.AddCouponToCustomer:input_type -> admin.v1.PaymentServiceAddCouponToCustomerRequest - 4, // 7: admin.v1.PaymentService.AddBalanceToCustomer:input_type -> admin.v1.PaymentServiceAddBalanceToCustomerRequest - 1, // 8: admin.v1.PaymentService.ListCoupons:output_type -> admin.v1.PaymentServiceListCouponsResponse - 3, // 9: admin.v1.PaymentService.AddCouponToCustomer:output_type -> admin.v1.PaymentServiceAddCouponToCustomerResponse - 5, // 10: admin.v1.PaymentService.AddBalanceToCustomer:output_type -> admin.v1.PaymentServiceAddBalanceToCustomerResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // 0: admin.v1.PaymentServiceListCouponsResponse.coupons:type_name -> api.v1.Coupon + 5, // 1: admin.v1.PaymentServiceAddBalanceToCustomerResponse.customer:type_name -> api.v1.PaymentCustomer + 0, // 2: admin.v1.PaymentService.ListCoupons:input_type -> admin.v1.PaymentServiceListCouponsRequest + 2, // 3: admin.v1.PaymentService.AddBalanceToCustomer:input_type -> admin.v1.PaymentServiceAddBalanceToCustomerRequest + 1, // 4: admin.v1.PaymentService.ListCoupons:output_type -> admin.v1.PaymentServiceListCouponsResponse + 3, // 5: admin.v1.PaymentService.AddBalanceToCustomer:output_type -> admin.v1.PaymentServiceAddBalanceToCustomerResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_admin_v1_payment_proto_init() } @@ -449,7 +311,7 @@ func file_admin_v1_payment_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_admin_v1_payment_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/go/admin/v1/tenant.pb.go b/go/admin/v1/tenant.pb.go index ee697084..5dd84740 100644 --- a/go/admin/v1/tenant.pb.go +++ b/go/admin/v1/tenant.pb.go @@ -187,10 +187,6 @@ type TenantServiceAdmitRequest struct { // TenantId is the id of the tenant to admit TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` - // CouponId is the id of the coupon this tenant should get - CouponId *string `protobuf:"bytes,2,opt,name=coupon_id,json=couponId,proto3,oneof" json:"coupon_id,omitempty"` - // BalanceToAdd is the amount of balance he should be granted - BalanceToAdd *int64 `protobuf:"varint,3,opt,name=balance_to_add,json=balanceToAdd,proto3,oneof" json:"balance_to_add,omitempty"` } func (x *TenantServiceAdmitRequest) Reset() { @@ -230,20 +226,6 @@ func (x *TenantServiceAdmitRequest) GetTenantId() string { return "" } -func (x *TenantServiceAdmitRequest) GetCouponId() string { - if x != nil && x.CouponId != nil { - return *x.CouponId - } - return "" -} - -func (x *TenantServiceAdmitRequest) GetBalanceToAdd() int64 { - if x != nil && x.BalanceToAdd != nil { - return *x.BalanceToAdd - } - return 0 -} - // TenantServiceAdmitResponse is the response payload for a tenant admit request type TenantServiceAdmitResponse struct { state protoimpl.MessageState @@ -527,76 +509,69 @@ var file_admin_v1_tenant_proto_rawDesc = []byte{ 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x19, 0x54, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x52, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x22, 0x38, 0x0a, 0x19, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x44, 0x0a, 0x1a, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x26, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, + 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, 0x39, 0x0a, 0x1a, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, - 0x04, 0x22, 0x02, 0x20, 0x00, 0x48, 0x01, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x54, 0x6f, 0x41, 0x64, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x75, - 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x22, 0x44, 0x0a, 0x1a, 0x54, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, - 0x39, 0x0a, 0x1a, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x1b, 0x54, 0x65, - 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x30, 0x0a, - 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, - 0x20, 0x0a, 0x1e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0x88, 0x03, 0x0a, 0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xd2, 0xf3, 0x18, 0x02, 0x01, 0x02, 0x12, 0x59, 0x0a, 0x05, - 0x41, 0x64, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x12, 0x5c, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x12, 0x24, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, - 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x12, 0x65, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x27, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x49, 0x64, 0x22, 0x45, 0x0a, 0x1b, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x42, 0x92, 0x01, 0x0a, - 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x54, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x2d, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x6f, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x14, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x88, 0x03, 0x0a, 0x0d, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xd2, 0xf3, + 0x18, 0x02, 0x01, 0x02, 0x12, 0x59, 0x0a, 0x05, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x12, + 0x5c, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x24, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0xd2, 0xf3, 0x18, 0x01, 0x01, 0x12, 0x65, 0x0a, + 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0xd2, + 0xf3, 0x18, 0x01, 0x01, 0x42, 0x92, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x2d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x76, 0x31, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, + 0xaa, 0x02, 0x08, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -655,7 +630,6 @@ func file_admin_v1_tenant_proto_init() { } file_admin_v1_tenant_proto_msgTypes[0].OneofWrappers = []any{} file_admin_v1_tenant_proto_msgTypes[1].OneofWrappers = []any{} - file_admin_v1_tenant_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/permissions/servicepermissions.go b/go/permissions/servicepermissions.go index 363ecff8..f2393d85 100755 --- a/go/permissions/servicepermissions.go +++ b/go/permissions/servicepermissions.go @@ -36,7 +36,6 @@ func GetServicePermissions() *ServicePermissions { "/admin.v1.ClusterService/List", "/admin.v1.ClusterService/Credentials", "/admin.v1.PaymentService/ListCoupons", - "/admin.v1.PaymentService/AddCouponToCustomer", "/admin.v1.PaymentService/AddBalanceToCustomer", "/admin.v1.ProjectService/List", "/admin.v1.StorageService/ClusterInfo", @@ -181,7 +180,6 @@ func GetServicePermissions() *ServicePermissions { "/admin.v1.ClusterService/Get": true, "/admin.v1.ClusterService/List": true, "/admin.v1.PaymentService/AddBalanceToCustomer": true, - "/admin.v1.PaymentService/AddCouponToCustomer": true, "/admin.v1.PaymentService/ListCoupons": true, "/admin.v1.ProjectService/List": true, "/admin.v1.StorageService/ClusterInfo": true, @@ -304,7 +302,6 @@ func GetServicePermissions() *ServicePermissions { "/admin.v1.ClusterService/Get": true, "/admin.v1.ClusterService/List": true, "/admin.v1.PaymentService/AddBalanceToCustomer": true, - "/admin.v1.PaymentService/AddCouponToCustomer": true, "/admin.v1.PaymentService/ListCoupons": true, "/admin.v1.ProjectService/List": true, "/admin.v1.StorageService/ClusterInfo": true, diff --git a/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceClient.go b/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceClient.go index a60330ed..94de7880 100644 --- a/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceClient.go +++ b/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceClient.go @@ -46,36 +46,6 @@ func (_m *PaymentServiceClient) AddBalanceToCustomer(_a0 context.Context, _a1 *c return r0, r1 } -// AddCouponToCustomer provides a mock function with given fields: _a0, _a1 -func (_m *PaymentServiceClient) AddCouponToCustomer(_a0 context.Context, _a1 *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse], error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for AddCouponToCustomer") - } - - var r0 *connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) *connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // ListCoupons provides a mock function with given fields: _a0, _a1 func (_m *PaymentServiceClient) ListCoupons(_a0 context.Context, _a1 *connect.Request[adminv1.PaymentServiceListCouponsRequest]) (*connect.Response[adminv1.PaymentServiceListCouponsResponse], error) { ret := _m.Called(_a0, _a1) diff --git a/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceHandler.go b/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceHandler.go index 630c31d0..613ddc85 100644 --- a/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceHandler.go +++ b/go/tests/mocks/admin/v1/adminv1connect/PaymentServiceHandler.go @@ -46,36 +46,6 @@ func (_m *PaymentServiceHandler) AddBalanceToCustomer(_a0 context.Context, _a1 * return r0, r1 } -// AddCouponToCustomer provides a mock function with given fields: _a0, _a1 -func (_m *PaymentServiceHandler) AddCouponToCustomer(_a0 context.Context, _a1 *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse], error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for AddCouponToCustomer") - } - - var r0 *connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) (*connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) *connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[adminv1.PaymentServiceAddCouponToCustomerResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[adminv1.PaymentServiceAddCouponToCustomerRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // ListCoupons provides a mock function with given fields: _a0, _a1 func (_m *PaymentServiceHandler) ListCoupons(_a0 context.Context, _a1 *connect.Request[adminv1.PaymentServiceListCouponsRequest]) (*connect.Response[adminv1.PaymentServiceListCouponsResponse], error) { ret := _m.Called(_a0, _a1) diff --git a/js/admin/v1/payment_connect.d.ts b/js/admin/v1/payment_connect.d.ts index 7af3899d..90ae7e07 100644 --- a/js/admin/v1/payment_connect.d.ts +++ b/js/admin/v1/payment_connect.d.ts @@ -1,4 +1,4 @@ -import { PaymentServiceAddBalanceToCustomerRequest, PaymentServiceAddBalanceToCustomerResponse, PaymentServiceAddCouponToCustomerRequest, PaymentServiceAddCouponToCustomerResponse, PaymentServiceListCouponsRequest, PaymentServiceListCouponsResponse } from "./payment_pb.js"; +import { PaymentServiceAddBalanceToCustomerRequest, PaymentServiceAddBalanceToCustomerResponse, PaymentServiceListCouponsRequest, PaymentServiceListCouponsResponse } from "./payment_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** * PaymentService serves payment related functions @@ -19,17 +19,6 @@ export declare const PaymentService: { readonly O: typeof PaymentServiceListCouponsResponse; readonly kind: MethodKind.Unary; }; - /** - * AddCouponToCustomer adds a coupon to a customer - * - * @generated from rpc admin.v1.PaymentService.AddCouponToCustomer - */ - readonly addCouponToCustomer: { - readonly name: "AddCouponToCustomer"; - readonly I: typeof PaymentServiceAddCouponToCustomerRequest; - readonly O: typeof PaymentServiceAddCouponToCustomerResponse; - readonly kind: MethodKind.Unary; - }; /** * AddBalanceToCustomer adds balance to a customer * diff --git a/js/admin/v1/payment_connect.js b/js/admin/v1/payment_connect.js index aefe5295..e88a0088 100644 --- a/js/admin/v1/payment_connect.js +++ b/js/admin/v1/payment_connect.js @@ -2,7 +2,7 @@ // @generated from file admin/v1/payment.proto (package admin.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck -import { PaymentServiceAddBalanceToCustomerRequest, PaymentServiceAddBalanceToCustomerResponse, PaymentServiceAddCouponToCustomerRequest, PaymentServiceAddCouponToCustomerResponse, PaymentServiceListCouponsRequest, PaymentServiceListCouponsResponse } from "./payment_pb.js"; +import { PaymentServiceAddBalanceToCustomerRequest, PaymentServiceAddBalanceToCustomerResponse, PaymentServiceListCouponsRequest, PaymentServiceListCouponsResponse } from "./payment_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** * PaymentService serves payment related functions @@ -23,17 +23,6 @@ export const PaymentService = { O: PaymentServiceListCouponsResponse, kind: MethodKind.Unary, }, - /** - * AddCouponToCustomer adds a coupon to a customer - * - * @generated from rpc admin.v1.PaymentService.AddCouponToCustomer - */ - addCouponToCustomer: { - name: "AddCouponToCustomer", - I: PaymentServiceAddCouponToCustomerRequest, - O: PaymentServiceAddCouponToCustomerResponse, - kind: MethodKind.Unary, - }, /** * AddBalanceToCustomer adds balance to a customer * diff --git a/js/admin/v1/payment_connect.ts b/js/admin/v1/payment_connect.ts index 41d7d141..0ffd1e1c 100644 --- a/js/admin/v1/payment_connect.ts +++ b/js/admin/v1/payment_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { PaymentServiceAddBalanceToCustomerRequest, PaymentServiceAddBalanceToCustomerResponse, PaymentServiceAddCouponToCustomerRequest, PaymentServiceAddCouponToCustomerResponse, PaymentServiceListCouponsRequest, PaymentServiceListCouponsResponse } from "./payment_pb.js"; +import { PaymentServiceAddBalanceToCustomerRequest, PaymentServiceAddBalanceToCustomerResponse, PaymentServiceListCouponsRequest, PaymentServiceListCouponsResponse } from "./payment_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -25,17 +25,6 @@ export const PaymentService = { O: PaymentServiceListCouponsResponse, kind: MethodKind.Unary, }, - /** - * AddCouponToCustomer adds a coupon to a customer - * - * @generated from rpc admin.v1.PaymentService.AddCouponToCustomer - */ - addCouponToCustomer: { - name: "AddCouponToCustomer", - I: PaymentServiceAddCouponToCustomerRequest, - O: PaymentServiceAddCouponToCustomerResponse, - kind: MethodKind.Unary, - }, /** * AddBalanceToCustomer adds balance to a customer * diff --git a/js/admin/v1/payment_pb.d.ts b/js/admin/v1/payment_pb.d.ts index f76a6da1..ba78fdf1 100644 --- a/js/admin/v1/payment_pb.d.ts +++ b/js/admin/v1/payment_pb.d.ts @@ -37,54 +37,6 @@ export declare class PaymentServiceListCouponsResponse extends Message): PaymentServiceListCouponsResponse; static equals(a: PaymentServiceListCouponsResponse | PlainMessage | undefined, b: PaymentServiceListCouponsResponse | PlainMessage | undefined): boolean; } -/** - * PaymentServiceAddCouponToCustomerRequest is the request payload for the coupons add to customer request - * - * @generated from message admin.v1.PaymentServiceAddCouponToCustomerRequest - */ -export declare class PaymentServiceAddCouponToCustomerRequest extends Message { - /** - * Customer is the customer - * - * @generated from field: api.v1.PaymentCustomer customer = 1; - */ - customer?: PaymentCustomer; - /** - * CouponId is the id of the coupon which should be granted to the customer - * - * @generated from field: string coupon_id = 2; - */ - couponId: string; - constructor(data?: PartialMessage); - static readonly runtime: typeof proto3; - static readonly typeName = "admin.v1.PaymentServiceAddCouponToCustomerRequest"; - static readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): PaymentServiceAddCouponToCustomerRequest; - static fromJson(jsonValue: JsonValue, options?: Partial): PaymentServiceAddCouponToCustomerRequest; - static fromJsonString(jsonString: string, options?: Partial): PaymentServiceAddCouponToCustomerRequest; - static equals(a: PaymentServiceAddCouponToCustomerRequest | PlainMessage | undefined, b: PaymentServiceAddCouponToCustomerRequest | PlainMessage | undefined): boolean; -} -/** - * PaymentServiceAddCouponToCustomerResponse is the response payload for the coupons add to customer request - * - * @generated from message admin.v1.PaymentServiceAddCouponToCustomerResponse - */ -export declare class PaymentServiceAddCouponToCustomerResponse extends Message { - /** - * Customer is the customer - * - * @generated from field: api.v1.PaymentCustomer customer = 1; - */ - customer?: PaymentCustomer; - constructor(data?: PartialMessage); - static readonly runtime: typeof proto3; - static readonly typeName = "admin.v1.PaymentServiceAddCouponToCustomerResponse"; - static readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): PaymentServiceAddCouponToCustomerResponse; - static fromJson(jsonValue: JsonValue, options?: Partial): PaymentServiceAddCouponToCustomerResponse; - static fromJsonString(jsonString: string, options?: Partial): PaymentServiceAddCouponToCustomerResponse; - static equals(a: PaymentServiceAddCouponToCustomerResponse | PlainMessage | undefined, b: PaymentServiceAddCouponToCustomerResponse | PlainMessage | undefined): boolean; -} /** * PaymentServiceAddBalanceToCustomerRequest is the request payload for the balance to customer request * @@ -92,15 +44,15 @@ export declare class PaymentServiceAddCouponToCustomerResponse extends Message

{ /** - * Customer is the customer + * Tenant is the tenant * - * @generated from field: api.v1.PaymentCustomer customer = 1; + * @generated from field: string tenant_id = 1; */ - customer?: PaymentCustomer; + tenantId: string; /** - * BalanceToAdd is the balance which should be added to the customer + * BalanceToAdd is the balance in euro cent which should be added to the customer * - * @generated from field: int64 balance_to_add = 2; + * @generated from field: uint64 balance_to_add = 2; */ balanceToAdd: bigint; constructor(data?: PartialMessage); diff --git a/js/admin/v1/payment_pb.js b/js/admin/v1/payment_pb.js index 85b91059..438b22f7 100644 --- a/js/admin/v1/payment_pb.js +++ b/js/admin/v1/payment_pb.js @@ -64,69 +64,6 @@ PaymentServiceListCouponsResponse.typeName = "admin.v1.PaymentServiceListCoupons PaymentServiceListCouponsResponse.fields = proto3.util.newFieldList(() => [ { no: 1, name: "coupons", kind: "message", T: Coupon, repeated: true }, ]); -/** - * PaymentServiceAddCouponToCustomerRequest is the request payload for the coupons add to customer request - * - * @generated from message admin.v1.PaymentServiceAddCouponToCustomerRequest - */ -export class PaymentServiceAddCouponToCustomerRequest extends Message { - constructor(data) { - super(); - /** - * CouponId is the id of the coupon which should be granted to the customer - * - * @generated from field: string coupon_id = 2; - */ - this.couponId = ""; - proto3.util.initPartial(data, this); - } - static fromBinary(bytes, options) { - return new PaymentServiceAddCouponToCustomerRequest().fromBinary(bytes, options); - } - static fromJson(jsonValue, options) { - return new PaymentServiceAddCouponToCustomerRequest().fromJson(jsonValue, options); - } - static fromJsonString(jsonString, options) { - return new PaymentServiceAddCouponToCustomerRequest().fromJsonString(jsonString, options); - } - static equals(a, b) { - return proto3.util.equals(PaymentServiceAddCouponToCustomerRequest, a, b); - } -} -PaymentServiceAddCouponToCustomerRequest.runtime = proto3; -PaymentServiceAddCouponToCustomerRequest.typeName = "admin.v1.PaymentServiceAddCouponToCustomerRequest"; -PaymentServiceAddCouponToCustomerRequest.fields = proto3.util.newFieldList(() => [ - { no: 1, name: "customer", kind: "message", T: PaymentCustomer }, - { no: 2, name: "coupon_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, -]); -/** - * PaymentServiceAddCouponToCustomerResponse is the response payload for the coupons add to customer request - * - * @generated from message admin.v1.PaymentServiceAddCouponToCustomerResponse - */ -export class PaymentServiceAddCouponToCustomerResponse extends Message { - constructor(data) { - super(); - proto3.util.initPartial(data, this); - } - static fromBinary(bytes, options) { - return new PaymentServiceAddCouponToCustomerResponse().fromBinary(bytes, options); - } - static fromJson(jsonValue, options) { - return new PaymentServiceAddCouponToCustomerResponse().fromJson(jsonValue, options); - } - static fromJsonString(jsonString, options) { - return new PaymentServiceAddCouponToCustomerResponse().fromJsonString(jsonString, options); - } - static equals(a, b) { - return proto3.util.equals(PaymentServiceAddCouponToCustomerResponse, a, b); - } -} -PaymentServiceAddCouponToCustomerResponse.runtime = proto3; -PaymentServiceAddCouponToCustomerResponse.typeName = "admin.v1.PaymentServiceAddCouponToCustomerResponse"; -PaymentServiceAddCouponToCustomerResponse.fields = proto3.util.newFieldList(() => [ - { no: 1, name: "customer", kind: "message", T: PaymentCustomer }, -]); /** * PaymentServiceAddBalanceToCustomerRequest is the request payload for the balance to customer request * @@ -136,9 +73,15 @@ export class PaymentServiceAddBalanceToCustomerRequest extends Message { constructor(data) { super(); /** - * BalanceToAdd is the balance which should be added to the customer + * Tenant is the tenant * - * @generated from field: int64 balance_to_add = 2; + * @generated from field: string tenant_id = 1; + */ + this.tenantId = ""; + /** + * BalanceToAdd is the balance in euro cent which should be added to the customer + * + * @generated from field: uint64 balance_to_add = 2; */ this.balanceToAdd = protoInt64.zero; proto3.util.initPartial(data, this); @@ -159,8 +102,8 @@ export class PaymentServiceAddBalanceToCustomerRequest extends Message { PaymentServiceAddBalanceToCustomerRequest.runtime = proto3; PaymentServiceAddBalanceToCustomerRequest.typeName = "admin.v1.PaymentServiceAddBalanceToCustomerRequest"; PaymentServiceAddBalanceToCustomerRequest.fields = proto3.util.newFieldList(() => [ - { no: 1, name: "customer", kind: "message", T: PaymentCustomer }, - { no: 2, name: "balance_to_add", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 1, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "balance_to_add", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, ]); /** * PaymentServiceAddBalanceToCustomerResponse is the response payload for the balance to customer request diff --git a/js/admin/v1/payment_pb.ts b/js/admin/v1/payment_pb.ts index 3204daf4..bfb97fe4 100644 --- a/js/admin/v1/payment_pb.ts +++ b/js/admin/v1/payment_pb.ts @@ -81,96 +81,6 @@ export class PaymentServiceListCouponsResponse extends Message { - /** - * Customer is the customer - * - * @generated from field: api.v1.PaymentCustomer customer = 1; - */ - customer?: PaymentCustomer; - - /** - * CouponId is the id of the coupon which should be granted to the customer - * - * @generated from field: string coupon_id = 2; - */ - couponId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "admin.v1.PaymentServiceAddCouponToCustomerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "customer", kind: "message", T: PaymentCustomer }, - { no: 2, name: "coupon_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PaymentServiceAddCouponToCustomerRequest { - return new PaymentServiceAddCouponToCustomerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PaymentServiceAddCouponToCustomerRequest { - return new PaymentServiceAddCouponToCustomerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PaymentServiceAddCouponToCustomerRequest { - return new PaymentServiceAddCouponToCustomerRequest().fromJsonString(jsonString, options); - } - - static equals(a: PaymentServiceAddCouponToCustomerRequest | PlainMessage | undefined, b: PaymentServiceAddCouponToCustomerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PaymentServiceAddCouponToCustomerRequest, a, b); - } -} - -/** - * PaymentServiceAddCouponToCustomerResponse is the response payload for the coupons add to customer request - * - * @generated from message admin.v1.PaymentServiceAddCouponToCustomerResponse - */ -export class PaymentServiceAddCouponToCustomerResponse extends Message { - /** - * Customer is the customer - * - * @generated from field: api.v1.PaymentCustomer customer = 1; - */ - customer?: PaymentCustomer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "admin.v1.PaymentServiceAddCouponToCustomerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "customer", kind: "message", T: PaymentCustomer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PaymentServiceAddCouponToCustomerResponse { - return new PaymentServiceAddCouponToCustomerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PaymentServiceAddCouponToCustomerResponse { - return new PaymentServiceAddCouponToCustomerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PaymentServiceAddCouponToCustomerResponse { - return new PaymentServiceAddCouponToCustomerResponse().fromJsonString(jsonString, options); - } - - static equals(a: PaymentServiceAddCouponToCustomerResponse | PlainMessage | undefined, b: PaymentServiceAddCouponToCustomerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PaymentServiceAddCouponToCustomerResponse, a, b); - } -} - /** * PaymentServiceAddBalanceToCustomerRequest is the request payload for the balance to customer request * @@ -178,16 +88,16 @@ export class PaymentServiceAddCouponToCustomerResponse extends Message { /** - * Customer is the customer + * Tenant is the tenant * - * @generated from field: api.v1.PaymentCustomer customer = 1; + * @generated from field: string tenant_id = 1; */ - customer?: PaymentCustomer; + tenantId = ""; /** - * BalanceToAdd is the balance which should be added to the customer + * BalanceToAdd is the balance in euro cent which should be added to the customer * - * @generated from field: int64 balance_to_add = 2; + * @generated from field: uint64 balance_to_add = 2; */ balanceToAdd = protoInt64.zero; @@ -199,8 +109,8 @@ export class PaymentServiceAddBalanceToCustomerRequest extends Message [ - { no: 1, name: "customer", kind: "message", T: PaymentCustomer }, - { no: 2, name: "balance_to_add", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 1, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "balance_to_add", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PaymentServiceAddBalanceToCustomerRequest { diff --git a/js/admin/v1/tenant_pb.d.ts b/js/admin/v1/tenant_pb.d.ts index 488ca6a3..6437d04d 100644 --- a/js/admin/v1/tenant_pb.d.ts +++ b/js/admin/v1/tenant_pb.d.ts @@ -98,18 +98,6 @@ export declare class TenantServiceAdmitRequest extends Message); static readonly runtime: typeof proto3; static readonly typeName = "admin.v1.TenantServiceAdmitRequest"; diff --git a/js/admin/v1/tenant_pb.js b/js/admin/v1/tenant_pb.js index 31156bca..ff084e2c 100644 --- a/js/admin/v1/tenant_pb.js +++ b/js/admin/v1/tenant_pb.js @@ -107,8 +107,6 @@ TenantServiceAdmitRequest.runtime = proto3; TenantServiceAdmitRequest.typeName = "admin.v1.TenantServiceAdmitRequest"; TenantServiceAdmitRequest.fields = proto3.util.newFieldList(() => [ { no: 1, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "coupon_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "balance_to_add", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, ]); /** * TenantServiceAdmitResponse is the response payload for a tenant admit request diff --git a/js/admin/v1/tenant_pb.ts b/js/admin/v1/tenant_pb.ts index 2e97f847..7e2e1a03 100644 --- a/js/admin/v1/tenant_pb.ts +++ b/js/admin/v1/tenant_pb.ts @@ -159,20 +159,6 @@ export class TenantServiceAdmitRequest extends Message) { super(); proto3.util.initPartial(data, this); @@ -182,8 +168,6 @@ export class TenantServiceAdmitRequest extends Message [ { no: 1, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "coupon_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "balance_to_add", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TenantServiceAdmitRequest { diff --git a/js/bun.lockb b/js/bun.lockb index 4281e56a69cd0a7161f46f5428c377962b50edf0..4b17906314bff4377f21308bad2a6bfa7cba92d4 100755 GIT binary patch delta 321 zcmaDX{8)H`p297&!z#aTFWI~KmSE$@pUXNIJc+9Ltx%39PxQOS$U5<& z_T&J@DXeS^3=B*ljt!IAWGkl04#zAOIp6)JrFOS;rPTG~$I{nK(BG3B_vlVSnBw1~ zcB@0D33MH`bBhmC+%NcU)7ojTr_NL^kZ$hW`QX>O+nJVk>n8IupKvtIXFS#JI=o5yDxrB{b>>S#md5J#OtUubHZ|>&~_O?#_SJc4@cX z#Xk5cd75$ZMwXz>87#U?=4N_E3=9fDR|+vOG$=e!4;Gv+tI5O|XQ*drpl84Ulw=SG z%E&MsG28Owek@qVRL@`%ySNls!DOHUVW5IWAK^XGWmYW$jD~uqoBy(Y!;>AHt0P(DJqJvh(J0aF$kv%=Qp!;m8Aee3)G#pAeW#lMMsNLA}B_Qj}nW&1fMN1;HH_ zNP)_?U1uk>fL2xwBJYr9I5Mmw$$QrQJm8S9G1viz!2y%8 z1X8nT1T6wLG%hs&03ZMW01^NIfFR%}QxTsXDFOjrF)leSFaQ8D0000N004j-0>n17 z_bog?7aN diff --git a/js/package.json b/js/package.json index f9b2cdb8..6c61c273 100644 --- a/js/package.json +++ b/js/package.json @@ -11,11 +11,11 @@ "license": "MIT", "type": "module", "dependencies": { - "@bufbuild/protobuf": "^1.9.0", - "@connectrpc/connect-web": "^1.4.0" + "@bufbuild/protobuf": "^1.10.0", + "@connectrpc/connect-web": "^1.5.0" }, "devDependencies": { - "typescript": "^5.4.5" + "typescript": "^5.6.2" }, "version": "0.9.5" } diff --git a/js/permissions/servicepermissions.json b/js/permissions/servicepermissions.json index 4a5cec09..ba8ae93f 100755 --- a/js/permissions/servicepermissions.json +++ b/js/permissions/servicepermissions.json @@ -6,7 +6,6 @@ "/admin.v1.ClusterService/List", "/admin.v1.ClusterService/Credentials", "/admin.v1.PaymentService/ListCoupons", - "/admin.v1.PaymentService/AddCouponToCustomer", "/admin.v1.PaymentService/AddBalanceToCustomer", "/admin.v1.ProjectService/List", "/admin.v1.StorageService/ClusterInfo", @@ -151,7 +150,6 @@ "/admin.v1.ClusterService/Get": true, "/admin.v1.ClusterService/List": true, "/admin.v1.PaymentService/AddBalanceToCustomer": true, - "/admin.v1.PaymentService/AddCouponToCustomer": true, "/admin.v1.PaymentService/ListCoupons": true, "/admin.v1.ProjectService/List": true, "/admin.v1.StorageService/ClusterInfo": true, @@ -274,7 +272,6 @@ "/admin.v1.ClusterService/Get": true, "/admin.v1.ClusterService/List": true, "/admin.v1.PaymentService/AddBalanceToCustomer": true, - "/admin.v1.PaymentService/AddCouponToCustomer": true, "/admin.v1.PaymentService/ListCoupons": true, "/admin.v1.ProjectService/List": true, "/admin.v1.StorageService/ClusterInfo": true, diff --git a/proto/admin/v1/payment.proto b/proto/admin/v1/payment.proto index 6ea7468a..61ded4d8 100644 --- a/proto/admin/v1/payment.proto +++ b/proto/admin/v1/payment.proto @@ -4,7 +4,6 @@ package admin.v1; import "api/v1/common.proto"; import "api/v1/payment.proto"; -import "buf/validate/validate.proto"; // PaymentService serves payment related functions service PaymentService { @@ -13,10 +12,6 @@ service PaymentService { option (api.v1.admin_roles) = ADMIN_ROLE_EDITOR; option (api.v1.admin_roles) = ADMIN_ROLE_VIEWER; } - // AddCouponToCustomer adds a coupon to a customer - rpc AddCouponToCustomer(PaymentServiceAddCouponToCustomerRequest) returns (PaymentServiceAddCouponToCustomerResponse) { - option (api.v1.admin_roles) = ADMIN_ROLE_EDITOR; - } // AddBalanceToCustomer adds balance to a customer rpc AddBalanceToCustomer(PaymentServiceAddBalanceToCustomerRequest) returns (PaymentServiceAddBalanceToCustomerResponse) { option (api.v1.admin_roles) = ADMIN_ROLE_EDITOR; @@ -32,26 +27,12 @@ message PaymentServiceListCouponsResponse { repeated api.v1.Coupon coupons = 1; } -// PaymentServiceAddCouponToCustomerRequest is the request payload for the coupons add to customer request -message PaymentServiceAddCouponToCustomerRequest { - // Customer is the customer - api.v1.PaymentCustomer customer = 1; - // CouponId is the id of the coupon which should be granted to the customer - string coupon_id = 2; -} - -// PaymentServiceAddCouponToCustomerResponse is the response payload for the coupons add to customer request -message PaymentServiceAddCouponToCustomerResponse { - // Customer is the customer - api.v1.PaymentCustomer customer = 1; -} - // PaymentServiceAddBalanceToCustomerRequest is the request payload for the balance to customer request message PaymentServiceAddBalanceToCustomerRequest { - // Customer is the customer - api.v1.PaymentCustomer customer = 1; - // BalanceToAdd is the balance which should be added to the customer - int64 balance_to_add = 2 [(buf.validate.field).int64.gt = 0]; + // Tenant is the tenant + string tenant_id = 1; + // BalanceToAdd is the balance in euro cent which should be added to the customer + uint64 balance_to_add = 2; } // PaymentServiceAddBalanceToCustomerResponse is the response payload for the balance to customer request diff --git a/proto/admin/v1/tenant.proto b/proto/admin/v1/tenant.proto index d1ab2da5..84d7c16a 100644 --- a/proto/admin/v1/tenant.proto +++ b/proto/admin/v1/tenant.proto @@ -60,10 +60,6 @@ message TenantServiceListResponse { message TenantServiceAdmitRequest { // TenantId is the id of the tenant to admit string tenant_id = 1; - // CouponId is the id of the coupon this tenant should get - optional string coupon_id = 2; - // BalanceToAdd is the amount of balance he should be granted - optional int64 balance_to_add = 3 [(buf.validate.field).int64.gt = 0]; } // TenantServiceAdmitResponse is the response payload for a tenant admit request