// Code generated by mockery v2.53.3. DO NOT EDIT.

package mock

import (
	context "context"

	billing "github.com/tidbcloud/dataflow-service/pkg/billing"

	decimal "github.com/shopspring/decimal"

	mock "github.com/stretchr/testify/mock"
)

// BillingHandler is an autogenerated mock type for the BillingHandler type
type BillingHandler struct {
	mock.Mock
}

// ActionCheck provides a mock function with given fields: ctx, tenantID, action
func (_m *BillingHandler) ActionCheck(ctx context.Context, tenantID uint64, action billing.ActionInfo) (*billing.ActionCheckResult, error) {
	ret := _m.Called(ctx, tenantID, action)

	if len(ret) == 0 {
		panic("no return value specified for ActionCheck")
	}

	var r0 *billing.ActionCheckResult
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint64, billing.ActionInfo) (*billing.ActionCheckResult, error)); ok {
		return rf(ctx, tenantID, action)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64, billing.ActionInfo) *billing.ActionCheckResult); ok {
		r0 = rf(ctx, tenantID, action)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*billing.ActionCheckResult)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64, billing.ActionInfo) error); ok {
		r1 = rf(ctx, tenantID, action)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// BindPackage provides a mock function with given fields: tenantID, packageID
func (_m *BillingHandler) BindPackage(tenantID uint64, packageID uint64) (uint64, error) {
	ret := _m.Called(tenantID, packageID)

	if len(ret) == 0 {
		panic("no return value specified for BindPackage")
	}

	var r0 uint64
	var r1 error
	if rf, ok := ret.Get(0).(func(uint64, uint64) (uint64, error)); ok {
		return rf(tenantID, packageID)
	}
	if rf, ok := ret.Get(0).(func(uint64, uint64) uint64); ok {
		r0 = rf(tenantID, packageID)
	} else {
		r0 = ret.Get(0).(uint64)
	}

	if rf, ok := ret.Get(1).(func(uint64, uint64) error); ok {
		r1 = rf(tenantID, packageID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CalFee provides a mock function with given fields: ctx, tenantID, record
func (_m *BillingHandler) CalFee(ctx context.Context, tenantID uint64, record *billing.UnitCostsInput) (*billing.BillingCharge, error) {
	ret := _m.Called(ctx, tenantID, record)

	if len(ret) == 0 {
		panic("no return value specified for CalFee")
	}

	var r0 *billing.BillingCharge
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint64, *billing.UnitCostsInput) (*billing.BillingCharge, error)); ok {
		return rf(ctx, tenantID, record)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64, *billing.UnitCostsInput) *billing.BillingCharge); ok {
		r0 = rf(ctx, tenantID, record)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*billing.BillingCharge)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64, *billing.UnitCostsInput) error); ok {
		r1 = rf(ctx, tenantID, record)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ChangeUserDiscount provides a mock function with given fields: tenantID, bindedPackageID, input
func (_m *BillingHandler) ChangeUserDiscount(tenantID uint64, bindedPackageID uint64, input *billing.ChangeBindedDiscountInput) error {
	ret := _m.Called(tenantID, bindedPackageID, input)

	if len(ret) == 0 {
		panic("no return value specified for ChangeUserDiscount")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, uint64, *billing.ChangeBindedDiscountInput) error); ok {
		r0 = rf(tenantID, bindedPackageID, input)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ChargeCredits provides a mock function with given fields: tenantID, bindedPackageID, input
func (_m *BillingHandler) ChargeCredits(tenantID uint64, bindedPackageID uint64, input *billing.CreditsChargeInfoInput) error {
	ret := _m.Called(tenantID, bindedPackageID, input)

	if len(ret) == 0 {
		panic("no return value specified for ChargeCredits")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, uint64, *billing.CreditsChargeInfoInput) error); ok {
		r0 = rf(tenantID, bindedPackageID, input)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ConfirmStripeSetupIntent provides a mock function with given fields: tenantID
func (_m *BillingHandler) ConfirmStripeSetupIntent(tenantID uint64) error {
	ret := _m.Called(tenantID)

	if len(ret) == 0 {
		panic("no return value specified for ConfirmStripeSetupIntent")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64) error); ok {
		r0 = rf(tenantID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// CreateOrUpdateSKU provides a mock function with given fields: ctx, sku
func (_m *BillingHandler) CreateOrUpdateSKU(ctx context.Context, sku *billing.SKU) (*billing.SKU, error) {
	ret := _m.Called(ctx, sku)

	if len(ret) == 0 {
		panic("no return value specified for CreateOrUpdateSKU")
	}

	var r0 *billing.SKU
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *billing.SKU) (*billing.SKU, error)); ok {
		return rf(ctx, sku)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *billing.SKU) *billing.SKU); ok {
		r0 = rf(ctx, sku)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*billing.SKU)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *billing.SKU) error); ok {
		r1 = rf(ctx, sku)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreatePayment provides a mock function with given fields: tenantID, paymentType
func (_m *BillingHandler) CreatePayment(tenantID uint64, paymentType string) error {
	ret := _m.Called(tenantID, paymentType)

	if len(ret) == 0 {
		panic("no return value specified for CreatePayment")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, string) error); ok {
		r0 = rf(tenantID, paymentType)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteSKU provides a mock function with given fields: ctx, sku
func (_m *BillingHandler) DeleteSKU(ctx context.Context, sku *billing.SKU) error {
	ret := _m.Called(ctx, sku)

	if len(ret) == 0 {
		panic("no return value specified for DeleteSKU")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *billing.SKU) error); ok {
		r0 = rf(ctx, sku)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetBindedPackageDiscount provides a mock function with given fields: tenantID, bindedPackageID
func (_m *BillingHandler) GetBindedPackageDiscount(tenantID uint64, bindedPackageID uint64) (*decimal.Decimal, error) {
	ret := _m.Called(tenantID, bindedPackageID)

	if len(ret) == 0 {
		panic("no return value specified for GetBindedPackageDiscount")
	}

	var r0 *decimal.Decimal
	var r1 error
	if rf, ok := ret.Get(0).(func(uint64, uint64) (*decimal.Decimal, error)); ok {
		return rf(tenantID, bindedPackageID)
	}
	if rf, ok := ret.Get(0).(func(uint64, uint64) *decimal.Decimal); ok {
		r0 = rf(tenantID, bindedPackageID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*decimal.Decimal)
		}
	}

	if rf, ok := ret.Get(1).(func(uint64, uint64) error); ok {
		r1 = rf(tenantID, bindedPackageID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetCredits provides a mock function with given fields: tenantID, bindedPackageID
func (_m *BillingHandler) GetCredits(tenantID uint64, bindedPackageID uint64) (*decimal.Decimal, error) {
	ret := _m.Called(tenantID, bindedPackageID)

	if len(ret) == 0 {
		panic("no return value specified for GetCredits")
	}

	var r0 *decimal.Decimal
	var r1 error
	if rf, ok := ret.Get(0).(func(uint64, uint64) (*decimal.Decimal, error)); ok {
		return rf(tenantID, bindedPackageID)
	}
	if rf, ok := ret.Get(0).(func(uint64, uint64) *decimal.Decimal); ok {
		r0 = rf(tenantID, bindedPackageID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*decimal.Decimal)
		}
	}

	if rf, ok := ret.Get(1).(func(uint64, uint64) error); ok {
		r1 = rf(tenantID, bindedPackageID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetCreditsHistory provides a mock function with given fields: tenantID, bindedPackageID
func (_m *BillingHandler) GetCreditsHistory(tenantID uint64, bindedPackageID uint64) (*billing.CreditsChargeHistory, error) {
	ret := _m.Called(tenantID, bindedPackageID)

	if len(ret) == 0 {
		panic("no return value specified for GetCreditsHistory")
	}

	var r0 *billing.CreditsChargeHistory
	var r1 error
	if rf, ok := ret.Get(0).(func(uint64, uint64) (*billing.CreditsChargeHistory, error)); ok {
		return rf(tenantID, bindedPackageID)
	}
	if rf, ok := ret.Get(0).(func(uint64, uint64) *billing.CreditsChargeHistory); ok {
		r0 = rf(tenantID, bindedPackageID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*billing.CreditsChargeHistory)
		}
	}

	if rf, ok := ret.Get(1).(func(uint64, uint64) error); ok {
		r1 = rf(tenantID, bindedPackageID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetPackageDiscount provides a mock function with given fields: packageID
func (_m *BillingHandler) GetPackageDiscount(packageID uint64) (*decimal.Decimal, error) {
	ret := _m.Called(packageID)

	if len(ret) == 0 {
		panic("no return value specified for GetPackageDiscount")
	}

	var r0 *decimal.Decimal
	var r1 error
	if rf, ok := ret.Get(0).(func(uint64) (*decimal.Decimal, error)); ok {
		return rf(packageID)
	}
	if rf, ok := ret.Get(0).(func(uint64) *decimal.Decimal); ok {
		r0 = rf(packageID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*decimal.Decimal)
		}
	}

	if rf, ok := ret.Get(1).(func(uint64) error); ok {
		r1 = rf(packageID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListPayments provides a mock function with given fields: tenantID
func (_m *BillingHandler) ListPayments(tenantID uint64) ([]billing.PaymentMethod, error) {
	ret := _m.Called(tenantID)

	if len(ret) == 0 {
		panic("no return value specified for ListPayments")
	}

	var r0 []billing.PaymentMethod
	var r1 error
	if rf, ok := ret.Get(0).(func(uint64) ([]billing.PaymentMethod, error)); ok {
		return rf(tenantID)
	}
	if rf, ok := ret.Get(0).(func(uint64) []billing.PaymentMethod); ok {
		r0 = rf(tenantID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]billing.PaymentMethod)
		}
	}

	if rf, ok := ret.Get(1).(func(uint64) error); ok {
		r1 = rf(tenantID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListSKU provides a mock function with given fields: ctx
func (_m *BillingHandler) ListSKU(ctx context.Context) ([]*billing.SKU, error) {
	ret := _m.Called(ctx)

	if len(ret) == 0 {
		panic("no return value specified for ListSKU")
	}

	var r0 []*billing.SKU
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) ([]*billing.SKU, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) []*billing.SKU); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*billing.SKU)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MeasureCosts provides a mock function with given fields: tenantID, cost
func (_m *BillingHandler) MeasureCosts(tenantID uint64, cost *billing.UnitCostsInput) error {
	ret := _m.Called(tenantID, cost)

	if len(ret) == 0 {
		panic("no return value specified for MeasureCosts")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, *billing.UnitCostsInput) error); ok {
		r0 = rf(tenantID, cost)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MigrateChargeCredits provides a mock function with given fields: bindedPackageID, records
func (_m *BillingHandler) MigrateChargeCredits(bindedPackageID uint64, records []billing.CreditsChargeInfoMigrateInput) error {
	ret := _m.Called(bindedPackageID, records)

	if len(ret) == 0 {
		panic("no return value specified for MigrateChargeCredits")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, []billing.CreditsChargeInfoMigrateInput) error); ok {
		r0 = rf(bindedPackageID, records)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MigrateInvoices provides a mock function with no fields
func (_m *BillingHandler) MigrateInvoices() error {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for MigrateInvoices")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MigratePayments provides a mock function with no fields
func (_m *BillingHandler) MigratePayments() error {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for MigratePayments")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// UnBindPackage provides a mock function with given fields: tenantID, bindedPackageID
func (_m *BillingHandler) UnBindPackage(tenantID uint64, bindedPackageID uint64) error {
	ret := _m.Called(tenantID, bindedPackageID)

	if len(ret) == 0 {
		panic("no return value specified for UnBindPackage")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, uint64) error); ok {
		r0 = rf(tenantID, bindedPackageID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// UpdateBindedPackageDiscount provides a mock function with given fields: tenantID, bindedPackageID, discount
func (_m *BillingHandler) UpdateBindedPackageDiscount(tenantID uint64, bindedPackageID uint64, discount *decimal.Decimal) error {
	ret := _m.Called(tenantID, bindedPackageID, discount)

	if len(ret) == 0 {
		panic("no return value specified for UpdateBindedPackageDiscount")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, uint64, *decimal.Decimal) error); ok {
		r0 = rf(tenantID, bindedPackageID, discount)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// UpdatePackageDiscount provides a mock function with given fields: packageID, discount
func (_m *BillingHandler) UpdatePackageDiscount(packageID uint64, discount decimal.Decimal) error {
	ret := _m.Called(packageID, discount)

	if len(ret) == 0 {
		panic("no return value specified for UpdatePackageDiscount")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(uint64, decimal.Decimal) error); ok {
		r0 = rf(packageID, discount)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// NewBillingHandler creates a new instance of BillingHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewBillingHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *BillingHandler {
	mock := &BillingHandler{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
