akua-sdk
Version:
TypeScript SDK for Akua Acquiring Processor
22 lines (21 loc) • 1.76 kB
TypeScript
import { OrganizationDTO, MerchantDTO, InstrumentDTO, CancelPaymentDTO, WebhookDTO, WebhookSecretDTO, AuthorizePaymentDTO, RefundPaymentDTO, CapturePaymentDTO } from '../types/dtos';
import { OrganizationResponse } from '../types/organization';
import { MerchantResponse } from '../types/merchant/';
import { InstrumentResponse } from '../types/instrument/';
import { AuthorizePaymentResponse, CancelPaymentResponse, CapturePaymentResponse, RefundPaymentResponse } from '../types/payment';
import { CreateWebhookResponse, GetWebhookSecretResponse } from '../types/webhook';
/**
* Mapper is a utility class that provides static methods for mapping raw data to DTOs.
* It uses the class-transformer library to convert raw data into instances of the specified DTO classes.
*/
export declare class Mapper {
static mapToOrganizationDTO(organizationRawData: OrganizationResponse | OrganizationResponse[]): OrganizationDTO | OrganizationDTO[];
static mapToMerchantDTO(merchantRawData: MerchantResponse | MerchantResponse[]): MerchantDTO | MerchantDTO[];
static mapToInstrumentDTO(instrumentRawData: InstrumentResponse | InstrumentResponse[]): InstrumentDTO | InstrumentDTO[];
static mapToWebhookDTO(webhookRawData: CreateWebhookResponse): WebhookDTO;
static mapToWebhookSecretDTO(webhookSecretRawData: GetWebhookSecretResponse): WebhookSecretDTO;
static mapToAuthorizePaymentDTO(paymentRawData: AuthorizePaymentResponse): AuthorizePaymentDTO;
static mapToCapturePaymentResponseDTO(capturePaymentRawdata: CapturePaymentResponse): CapturePaymentDTO;
static mapToCancelPaymentDTO(cancelPaymentRawData: CancelPaymentResponse): CancelPaymentDTO;
static mapToRefundPaymentDTO(refundRawData: RefundPaymentResponse): RefundPaymentDTO;
}