/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { bigint, boolean, lazy, number, object, optional, Schema, string, } from '../schema'; import { CreateCardPayloadRequest, createCardPayloadRequestSchema, } from './createCardPayloadRequest'; import { CreateCardPaymentContactlessRequest, createCardPaymentContactlessRequestSchema, } from './createCardPaymentContactlessRequest'; import { CreateCardRequest, createCardRequestSchema, } from './createCardRequest'; import { CreatePaymentAuthenticationRequest, createPaymentAuthenticationRequestSchema, } from './createPaymentAuthenticationRequest'; import { CreatePaymentOriginRequest, createPaymentOriginRequestSchema, } from './createPaymentOriginRequest'; /** The settings for creating a credit card payment */ export interface CreateCreditCardPaymentRequest { /** Number of installments */ installments?: number; /** The text that will be shown on the credit card's statement */ statementDescriptor?: string; /** Credit card data */ card?: CreateCardRequest; /** The credit card id */ cardId?: string; cardToken?: string; /** Indicates a recurrence */ recurrence?: boolean; /** Indicates if the operation should be only authorization or auth and capture. */ capture?: boolean; /** Indicates whether the extended label (private label) is enabled */ extendedLimitEnabled?: boolean; /** Extended Limit Code */ extendedLimitCode?: string; /** Customer business segment code */ merchantCategoryCode?: bigint; /** The payment authentication request */ authentication?: CreatePaymentAuthenticationRequest; /** The Credit card payment contactless request */ contactless?: CreateCardPaymentContactlessRequest; /** Indicates whether a particular payment will enter the offline retry flow */ autoRecovery?: boolean; /** AuthOnly, AuthAndCapture, PreAuth */ operationType?: string; /** Defines whether the card has been used one or more times. */ recurrencyCycle?: string; payload?: CreateCardPayloadRequest; initiatedType?: string; recurrenceModel?: string; paymentOrigin?: CreatePaymentOriginRequest; /** Business model identifier */ indirectAcceptor?: string; } export const createCreditCardPaymentRequestSchema: Schema = object( { installments: ['installments', optional(number())], statementDescriptor: ['statement_descriptor', optional(string())], card: ['card', optional(lazy(() => createCardRequestSchema))], cardId: ['card_id', optional(string())], cardToken: ['card_token', optional(string())], recurrence: ['recurrence', optional(boolean())], capture: ['capture', optional(boolean())], extendedLimitEnabled: ['extended_limit_enabled', optional(boolean())], extendedLimitCode: ['extended_limit_code', optional(string())], merchantCategoryCode: ['merchant_category_code', optional(bigint())], authentication: [ 'authentication', optional(lazy(() => createPaymentAuthenticationRequestSchema)), ], contactless: [ 'contactless', optional(lazy(() => createCardPaymentContactlessRequestSchema)), ], autoRecovery: ['auto_recovery', optional(boolean())], operationType: ['operation_type', optional(string())], recurrencyCycle: ['recurrency_cycle', optional(string())], payload: ['payload', optional(lazy(() => createCardPayloadRequestSchema))], initiatedType: ['initiated_type', optional(string())], recurrenceModel: ['recurrence_model', optional(string())], paymentOrigin: [ 'payment_origin', optional(lazy(() => createPaymentOriginRequestSchema)), ], indirectAcceptor: ['indirect_acceptor', optional(string())], } );