/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, boolean, lazy, nullable, number, object, optional, Schema, string, } from '../schema'; import { GetAddressResponse, getAddressResponseSchema, } from './getAddressResponse'; import { GetCheckoutBankTransferPaymentResponse, getCheckoutBankTransferPaymentResponseSchema, } from './getCheckoutBankTransferPaymentResponse'; import { GetCheckoutBoletoPaymentResponse, getCheckoutBoletoPaymentResponseSchema, } from './getCheckoutBoletoPaymentResponse'; import { GetCheckoutCreditCardPaymentResponse, getCheckoutCreditCardPaymentResponseSchema, } from './getCheckoutCreditCardPaymentResponse'; import { GetCheckoutDebitCardPaymentResponse, getCheckoutDebitCardPaymentResponseSchema, } from './getCheckoutDebitCardPaymentResponse'; import { GetCheckoutPixPaymentResponse, getCheckoutPixPaymentResponseSchema, } from './getCheckoutPixPaymentResponse'; import { GetCustomerResponse, getCustomerResponseSchema, } from './getCustomerResponse'; import { GetShippingResponse, getShippingResponseSchema, } from './getShippingResponse'; /** Resposta das configurações de pagamento do checkout */ export interface GetCheckoutPaymentResponse { id?: string | null; /** Valor em centavos */ amount?: number | null; /** Meio de pagamento padrão no checkout */ defaultPaymentMethod?: string | null; /** Url de redirecionamento de sucesso após o checkou */ successUrl?: string | null; /** Url para pagamento usando o checkout */ paymentUrl?: string | null; /** Código da afiliação onde o pagamento será processado no gateway */ gatewayAffiliationId?: string | null; /** Meios de pagamento aceitos no checkout */ acceptedPaymentMethods?: string[] | null; /** Status do checkout */ status?: string | null; /** Pular tela de sucesso pós-pagamento? */ skipCheckoutSuccessPage?: boolean | null; /** Data de criação */ createdAt?: string | null; /** Data de atualização */ updatedAt?: string | null; /** Data de cancelamento */ canceledAt?: string | null; /** Torna o objeto customer editável */ customerEditable?: boolean | null; /** Dados do comprador */ customer?: GetCustomerResponse | null; /** Dados do endereço de cobrança */ billingaddress?: GetAddressResponse | null; /** Configurações de cartão de crédito */ creditCard?: GetCheckoutCreditCardPaymentResponse | null; /** Configurações de boleto */ boleto?: GetCheckoutBoletoPaymentResponse | null; /** Indica se o billing address poderá ser editado */ billingAddressEditable?: boolean | null; /** Configurações de entrega */ shipping?: GetShippingResponse | null; /** Indica se possui entrega */ shippable?: boolean | null; /** Data de fechamento */ closedAt?: string | null; /** Data de expiração */ expiresAt?: string | null; /** Moeda */ currency?: string | null; /** Configurações de cartão de débito */ debitCard?: GetCheckoutDebitCardPaymentResponse | null; /** Bank transfer payment response */ bankTransfer?: GetCheckoutBankTransferPaymentResponse | null; /** Accepted Brands */ acceptedBrands?: string[] | null; /** Pix payment response */ pix?: GetCheckoutPixPaymentResponse | null; } export const getCheckoutPaymentResponseSchema: Schema = object( { id: ['id', optional(nullable(string()))], amount: ['amount', optional(nullable(number()))], defaultPaymentMethod: [ 'default_payment_method', optional(nullable(string())), ], successUrl: ['success_url', optional(nullable(string()))], paymentUrl: ['payment_url', optional(nullable(string()))], gatewayAffiliationId: [ 'gateway_affiliation_id', optional(nullable(string())), ], acceptedPaymentMethods: [ 'accepted_payment_methods', optional(nullable(array(string()))), ], status: ['status', optional(nullable(string()))], skipCheckoutSuccessPage: [ 'skip_checkout_success_page', optional(nullable(boolean())), ], createdAt: ['created_at', optional(nullable(string()))], updatedAt: ['updated_at', optional(nullable(string()))], canceledAt: ['canceled_at', optional(nullable(string()))], customerEditable: ['customer_editable', optional(nullable(boolean()))], customer: [ 'customer', optional(nullable(lazy(() => getCustomerResponseSchema))), ], billingaddress: [ 'billingaddress', optional(nullable(lazy(() => getAddressResponseSchema))), ], creditCard: [ 'credit_card', optional( nullable(lazy(() => getCheckoutCreditCardPaymentResponseSchema)) ), ], boleto: [ 'boleto', optional(nullable(lazy(() => getCheckoutBoletoPaymentResponseSchema))), ], billingAddressEditable: [ 'billing_address_editable', optional(nullable(boolean())), ], shipping: [ 'shipping', optional(nullable(lazy(() => getShippingResponseSchema))), ], shippable: ['shippable', optional(nullable(boolean()))], closedAt: ['closed_at', optional(nullable(string()))], expiresAt: ['expires_at', optional(nullable(string()))], currency: ['currency', optional(nullable(string()))], debitCard: [ 'debit_card', optional(nullable(lazy(() => getCheckoutDebitCardPaymentResponseSchema))), ], bankTransfer: [ 'bank_transfer', optional( nullable(lazy(() => getCheckoutBankTransferPaymentResponseSchema)) ), ], acceptedBrands: ['accepted_brands', optional(nullable(array(string())))], pix: [ 'pix', optional(nullable(lazy(() => getCheckoutPixPaymentResponseSchema))), ], } );