Skip to content

Commit

Permalink
chore: move chargemaster
Browse files Browse the repository at this point in the history
chore: move chargemaster
  • Loading branch information
maxwellgithinji committed Jul 30, 2021
1 parent 12712f7 commit e178a63
Show file tree
Hide file tree
Showing 19 changed files with 932 additions and 1,974 deletions.
9 changes: 0 additions & 9 deletions pkg/onboarding/application/exceptions/custom_errors.go
Expand Up @@ -315,15 +315,6 @@ func SupplierKYCAlreadySubmittedNotFoundError() error {
}
}

// FindProviderError returns an error message when a provider is not found
func FindProviderError(err error) error {
return &errorcodeutil.CustomError{
Err: err,
Message: FindProviderErrMsg,
Code: int(errorcodeutil.UnableToFindProvider),
}
}

// PublishKYCNudgeError returns an error message when there's a failure in
// creating a KYC nudge
func PublishKYCNudgeError(err error) error {
Expand Down
2 changes: 0 additions & 2 deletions pkg/onboarding/application/exceptions/custom_errors_test.go
Expand Up @@ -74,8 +74,6 @@ func TestCustomErrors(t *testing.T) {
assert.NotNil(t, err)
err = exceptions.SupplierKYCAlreadySubmittedNotFoundError()
assert.NotNil(t, err)
err = exceptions.FindProviderError(fmt.Errorf("error"))
assert.NotNil(t, err)
err = exceptions.PublishKYCNudgeError(fmt.Errorf("error"))
assert.NotNil(t, err)
err = exceptions.InvalidCredentialsError()
Expand Down
3 changes: 0 additions & 3 deletions pkg/onboarding/application/exceptions/error_messages.go
Expand Up @@ -126,9 +126,6 @@ const (
// A supplier should have only one kyc
SupplierKYCAlreadySubmittedErrMsg = "kyc already exists for supplier"

// FindProviderErrMsg is displayed if a provider is not found
FindProviderErrMsg = "unable to fetch provider from chargemaster"

// PublishKYCNudgeErrMsg is displayed if we are unable to publish a kyc nudge
PublishKYCNudgeErrMsg = "unable to publish kyc nudge"

Expand Down
Expand Up @@ -35,7 +35,6 @@ import (
"cloud.google.com/go/pubsub"
"firebase.google.com/go/auth"

"github.com/savannahghi/onboarding/pkg/onboarding/infrastructure/services/chargemaster"
"github.com/savannahghi/onboarding/pkg/onboarding/infrastructure/services/edi"
"github.com/savannahghi/onboarding/pkg/onboarding/infrastructure/services/engagement"
erp "gitlab.slade360emr.com/go/commontools/accounting/pkg/usecases"
Expand Down Expand Up @@ -146,7 +145,6 @@ func InitializeTestService(ctx context.Context) (*interactor.Interactor, error)
engagementClient := utils.NewInterServiceClient(engagementService, ext)
ediClient := utils.NewInterServiceClient(ediService, ext)

chrg := chargemaster.NewChargeMasterUseCasesImpl()
firestoreExtension := fb.NewFirestoreClientExtension(fsc)
fr := fb.NewFirebaseRepository(firestoreExtension, fbc)
erp := erp.NewAccounting()
Expand Down Expand Up @@ -174,25 +172,24 @@ func InitializeTestService(ctx context.Context) (*interactor.Interactor, error)
mes := messaging.NewServiceMessagingImpl(ext)
pinExt := extension.NewPINExtensionImpl()
profile := usecases.NewProfileUseCase(fr, ext, engage, ps, crmExt)
supplier := usecases.NewSupplierUseCases(fr, profile, erp, chrg, engage, mes, ext, ps)
supplier := usecases.NewSupplierUseCases(fr, profile, erp, engage, mes, ext, ps)
login := usecases.NewLoginUseCases(fr, profile, ext, pinExt)
survey := usecases.NewSurveyUseCases(fr, ext)
userpin := usecases.NewUserPinUseCase(fr, profile, ext, pinExt, engage)
su := usecases.NewSignUpUseCases(fr, profile, userpin, supplier, ext, engage, ps, edi)

return &interactor.Interactor{
Onboarding: profile,
Signup: su,
Supplier: supplier,
Login: login,
Survey: survey,
UserPIN: userpin,
ERP: erp,
ChargeMaster: chrg,
Engagement: engage,
PubSub: ps,
EDI: edi,
CrmExt: crmExt,
Onboarding: profile,
Signup: su,
Supplier: supplier,
Login: login,
Survey: survey,
UserPIN: userpin,
ERP: erp,
Engagement: engage,
PubSub: ps,
EDI: edi,
CrmExt: crmExt,
}, nil
}

Expand Down

This file was deleted.

0 comments on commit e178a63

Please sign in to comment.