/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, boolean, dict, lazy, nullable, number, object, optional, Schema, string, } from '../schema'; import { getAntifraudResponseSchema } from './getAntifraudResponse'; import { getFineResponseSchema } from './getFineResponse'; import { getGatewayResponseResponseSchema } from './getGatewayResponseResponse'; import { getInterestResponseSchema } from './getInterestResponse'; import { GetPixPayerResponse, getPixPayerResponseSchema, } from './getPixPayerResponse'; import { getSplitResponseSchema } from './getSplitResponse'; import { GetTransactionResponse } from './getTransactionResponse'; import { PixAdditionalInformation, pixAdditionalInformationSchema, } from './pixAdditionalInformation'; /** Response object when getting a pix transaction */ export interface GetPixTransactionResponse extends GetTransactionResponse { qrCode?: string | null; qrCodeUrl?: string | null; expiresAt?: string | null; additionalInformation?: PixAdditionalInformation[] | null; endToEndId?: string | null; payer?: GetPixPayerResponse | null; /** Pix provider TID */ pixProviderTid?: string | null; } export const getPixTransactionResponseSchema: Schema = object( { qrCode: ['qr_code', optional(nullable(string()))], qrCodeUrl: ['qr_code_url', optional(nullable(string()))], expiresAt: ['expires_at', optional(nullable(string()))], additionalInformation: [ 'additional_information', optional(nullable(array(lazy(() => pixAdditionalInformationSchema)))), ], endToEndId: ['end_to_end_id', optional(nullable(string()))], payer: ['payer', optional(nullable(lazy(() => getPixPayerResponseSchema)))], pixProviderTid: ['pix_provider_tid', optional(nullable(string()))], gatewayId: ['gateway_id', optional(nullable(string()))], amount: ['amount', optional(nullable(number()))], status: ['status', optional(nullable(string()))], success: ['success', optional(nullable(boolean()))], createdAt: ['created_at', optional(nullable(string()))], updatedAt: ['updated_at', optional(nullable(string()))], attemptCount: ['attempt_count', optional(nullable(number()))], maxAttempts: ['max_attempts', optional(nullable(number()))], splits: [ 'splits', optional(nullable(array(lazy(() => getSplitResponseSchema)))), ], nextAttempt: ['next_attempt', optional(nullable(string()))], id: ['id', optional(nullable(string()))], gatewayResponse: [ 'gateway_response', optional(nullable(lazy(() => getGatewayResponseResponseSchema))), ], antifraudResponse: [ 'antifraud_response', optional(nullable(lazy(() => getAntifraudResponseSchema))), ], metadata: ['metadata', optional(nullable(dict(string())))], split: [ 'split', optional(nullable(array(lazy(() => getSplitResponseSchema)))), ], interest: [ 'interest', optional(nullable(lazy(() => getInterestResponseSchema))), ], fine: ['fine', optional(nullable(lazy(() => getFineResponseSchema)))], maxDaysToPayPastDue: [ 'max_days_to_pay_past_due', optional(nullable(number())), ], transactionType: ['transaction_type', optional(string())], } );