/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { lazy, object, Schema, string } from '../schema'; import { CreateAddressRequest, createAddressRequestSchema, } from './createAddressRequest'; import { CreatePhoneRequest, createPhoneRequestSchema, } from './createPhoneRequest'; /** SubMerchant */ export interface CreateSubMerchantRequest { /** Payment Facilitator Code */ paymentFacilitatorCode: string; /** Code */ code: string; /** Name */ name: string; /** Merchant Category Code */ merchantCategoryCode: string; /** Document number. Only numbers, no special characters. */ document: string; /** Document type. Can be either 'individual' or 'company' */ type: string; /** Phone */ phone: CreatePhoneRequest; /** Address */ address: CreateAddressRequest; /** Legal name */ legalName: string; } export const createSubMerchantRequestSchema: Schema = object( { paymentFacilitatorCode: ['payment_facilitator_code', string()], code: ['code', string()], name: ['name', string()], merchantCategoryCode: ['merchant_category_code', string()], document: ['document', string()], type: ['type', string()], phone: ['phone', lazy(() => createPhoneRequestSchema)], address: ['address', lazy(() => createAddressRequestSchema)], legalName: ['legal_name', string()], } );