Add payout req parsing
This commit is contained in:
@@ -27,7 +27,7 @@ func WithContext(ctx context.Context) Optional {
|
||||
}
|
||||
|
||||
type Service interface {
|
||||
CreatePayout(models.PayoutReq, *orm.User, ...Optional)
|
||||
CreatePayout(models.PayoutReq, *orm.User, ...Optional) error
|
||||
GetConfig() yookassaConf.YooKassa
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,12 @@ func (y *yookassaService) OAuth2(ctx context.Context, operationName gen.Operatio
|
||||
}
|
||||
|
||||
// CreatePayout implements [Service].
|
||||
func (y *yookassaService) CreatePayout(req models.PayoutReq, userSession *orm.User, opts ...Optional) {
|
||||
func (y *yookassaService) CreatePayout(req models.PayoutReq, userSession *orm.User, opts ...Optional) error {
|
||||
params := y.getParams(opts...)
|
||||
|
||||
y.payClient.PayoutsPost(params.ctx, &gen.PayoutRequest{}, gen.PayoutsPostParams{})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetConfig implements [Service].
|
||||
|
||||
Reference in New Issue
Block a user