merchantapimapper

package
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MerchantBaseResponseMapper

type MerchantBaseResponseMapper interface {
	// Maps a single merchant gRPC response to an HTTP API response.
	ToApiResponseMerchant(merchants *pb.ApiResponseMerchant) *response.ApiResponseMerchant
}

type MerchantCommandResponseMapper

type MerchantCommandResponseMapper interface {
	MerchantBaseResponseMapper

	// Maps a soft-deleted merchant response to an HTTP API format.
	ToApiResponseMerchantDeleteAt(card *pb.ApiResponseMerchantDeleteAt) *response.ApiResponseMerchantDeleteAt

	// Maps a response containing all merchants to an HTTP API format.
	ToApiResponseMerchantAll(card *pb.ApiResponseMerchantAll) *response.ApiResponseMerchantAll

	ToApiResponseMerchantDelete(card *pb.ApiResponseMerchantDelete) *response.ApiResponseMerchantDelete
}

func NewMerchantCommandResponseMapper

func NewMerchantCommandResponseMapper() MerchantCommandResponseMapper

type MerchantQueryResponseMapper

type MerchantQueryResponseMapper interface {
	MerchantBaseResponseMapper

	// Maps multiple merchant gRPC responses to a slice-based API response.
	ToApiResponseMerchants(merchants *pb.ApiResponsesMerchant) *response.ApiResponsesMerchant

	// Maps a paginated list of merchants to a paginated HTTP API response.
	ToApiResponsesMerchant(merchants *pb.ApiResponsePaginationMerchant) *response.ApiResponsePaginationMerchant

	// Maps a paginated list of soft-deleted merchants to an HTTP API response.
	ToApiResponsesMerchantDeleteAt(merchants *pb.ApiResponsePaginationMerchantDeleteAt) *response.ApiResponsePaginationMerchantDeleteAt
}

func NewMerchantQueryResponseMapper

func NewMerchantQueryResponseMapper() MerchantQueryResponseMapper

type MerchantResponseMapper added in v1.0.13

type MerchantResponseMapper interface {
	QueryMapper() MerchantQueryResponseMapper
	CommandMapper() MerchantCommandResponseMapper
	TransactionMapper() MerchantTransactionResponseMapper
	MethodStatsMapper() MerchantStatsMethodResponseMapper
	AmountStatsMapper() MerchantStatsAmountResponseMapper
	TotalAmountStatsMapper() MerchantStatsTotalAmountResponseMapper
}

func NewMerchantResponseMapper

func NewMerchantResponseMapper() MerchantResponseMapper

type MerchantStatsAmountResponseMapper

type MerchantStatsAmountResponseMapper interface {
	// Maps monthly financial amounts (e.g., transactions, top-ups) to an API response.
	ToApiResponseMonthlyAmounts(ms *pb.ApiResponseMerchantMonthlyAmount) *response.ApiResponseMerchantMonthlyAmount

	// Maps yearly financial amounts (e.g., transactions, top-ups) to an API response.
	ToApiResponseYearlyAmounts(ms *pb.ApiResponseMerchantYearlyAmount) *response.ApiResponseMerchantYearlyAmount
}

func NewMerchantStatsAmountResponseMapper

func NewMerchantStatsAmountResponseMapper() MerchantStatsAmountResponseMapper

NewMerchantStatsAmountResponseMapper returns a pointer to a new merchantStatsAmountResponseMapper instance. This struct provides methods to map monthly and yearly financial amounts of a merchant to API responses.

type MerchantStatsMethodResponseMapper

type MerchantStatsMethodResponseMapper interface {
	// Maps monthly payment method statistics of a merchant to an API response.
	ToApiResponseMonthlyPaymentMethods(ms *pb.ApiResponseMerchantMonthlyPaymentMethod) *response.ApiResponseMerchantMonthlyPaymentMethod

	// Maps yearly payment method statistics of a merchant to an API response.
	ToApiResponseYearlyPaymentMethods(ms *pb.ApiResponseMerchantYearlyPaymentMethod) *response.ApiResponseMerchantYearlyPaymentMethod
}

func NewMerchantStatsMethodResponseMapper

func NewMerchantStatsMethodResponseMapper() MerchantStatsMethodResponseMapper

NewMerchantStatsMethodResponseMapper returns a pointer to a new merchantStatsMethodResponseMapper instance. This struct provides methods to map payment method statistics of a merchant to API responses.

type MerchantStatsTotalAmountResponseMapper

type MerchantStatsTotalAmountResponseMapper interface {
	// Maps monthly total financial statistics across merchants to an API response.
	ToApiResponseMonthlyTotalAmounts(ms *pb.ApiResponseMerchantMonthlyTotalAmount) *response.ApiResponseMerchantMonthlyTotalAmount

	// Maps yearly total financial statistics across merchants to an API response.
	ToApiResponseYearlyTotalAmounts(ms *pb.ApiResponseMerchantYearlyTotalAmount) *response.ApiResponseMerchantYearlyTotalAmount
}

func NewMerchantStatsTotalAmountResponseMapper

func NewMerchantStatsTotalAmountResponseMapper() MerchantStatsTotalAmountResponseMapper

NewMerchantStatsTotalAmountResponseMapper creates a new instance of merchantStatsTotalAmountResponseMapper. It returns a MerchantStatsTotalAmountResponseMapper interface for mapping monthly and yearly total financial statistics of merchants to API responses.

type MerchantTransactionResponseMapper

type MerchantTransactionResponseMapper interface {
	// Maps a paginated response of merchant transactions to an HTTP API response.
	ToApiResponseMerchantsTransactionResponse(merchants *pb.ApiResponsePaginationMerchantTransaction) *response.ApiResponsePaginationMerchantTransaction
}

func NewMerchantTransactionResponseMapper

func NewMerchantTransactionResponseMapper() MerchantTransactionResponseMapper

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL