Skip to content

Commit

Permalink
Decouple admit from addbalance (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Oct 29, 2024
1 parent 2b91aa4 commit 8cd3b4b
Show file tree
Hide file tree
Showing 24 changed files with 198 additions and 837 deletions.
116 changes: 10 additions & 106 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4416,24 +4416,24 @@
"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": "",
"defaultValue": ""
},
{
"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": "",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
{
Expand All @@ -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": ""
}
]
},
Expand Down
12 changes: 6 additions & 6 deletions examples/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
32 changes: 0 additions & 32 deletions go/admin/v1/adminv1connect/payment.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8cd3b4b

Please sign in to comment.