fix for proto migration
This commit is contained in:
@@ -3,13 +3,11 @@ package client
|
||||
import (
|
||||
"context"
|
||||
|
||||
orchestratorv1 "github.com/tech/sendico/pkg/proto/payments/orchestrator/v1"
|
||||
orchestratorv1 "github.com/tech/sendico/pkg/proto/payments/orchestration/v1"
|
||||
)
|
||||
|
||||
// Fake implements Client for tests.
|
||||
type Fake struct {
|
||||
QuotePaymentFn func(ctx context.Context, req *orchestratorv1.QuotePaymentRequest) (*orchestratorv1.QuotePaymentResponse, error)
|
||||
QuotePaymentsFn func(ctx context.Context, req *orchestratorv1.QuotePaymentsRequest) (*orchestratorv1.QuotePaymentsResponse, error)
|
||||
InitiatePaymentsFn func(ctx context.Context, req *orchestratorv1.InitiatePaymentsRequest) (*orchestratorv1.InitiatePaymentsResponse, error)
|
||||
InitiatePaymentFn func(ctx context.Context, req *orchestratorv1.InitiatePaymentRequest) (*orchestratorv1.InitiatePaymentResponse, error)
|
||||
CancelPaymentFn func(ctx context.Context, req *orchestratorv1.CancelPaymentRequest) (*orchestratorv1.CancelPaymentResponse, error)
|
||||
@@ -21,20 +19,6 @@ type Fake struct {
|
||||
CloseFn func() error
|
||||
}
|
||||
|
||||
func (f *Fake) QuotePayment(ctx context.Context, req *orchestratorv1.QuotePaymentRequest) (*orchestratorv1.QuotePaymentResponse, error) {
|
||||
if f.QuotePaymentFn != nil {
|
||||
return f.QuotePaymentFn(ctx, req)
|
||||
}
|
||||
return &orchestratorv1.QuotePaymentResponse{}, nil
|
||||
}
|
||||
|
||||
func (f *Fake) QuotePayments(ctx context.Context, req *orchestratorv1.QuotePaymentsRequest) (*orchestratorv1.QuotePaymentsResponse, error) {
|
||||
if f.QuotePaymentsFn != nil {
|
||||
return f.QuotePaymentsFn(ctx, req)
|
||||
}
|
||||
return &orchestratorv1.QuotePaymentsResponse{}, nil
|
||||
}
|
||||
|
||||
func (f *Fake) InitiatePayments(ctx context.Context, req *orchestratorv1.InitiatePaymentsRequest) (*orchestratorv1.InitiatePaymentsResponse, error) {
|
||||
if f.InitiatePaymentsFn != nil {
|
||||
return f.InitiatePaymentsFn(ctx, req)
|
||||
|
||||
Reference in New Issue
Block a user