/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { lazy, number, object, optional, Schema, string } from '../schema'; import { CreateAddressRequest, createAddressRequestSchema, } from './createAddressRequest'; /** Shipping data */ export interface CreateShippingRequest { /** Shipping amount */ amount: number; /** Description */ description: string; /** Recipient name */ recipientName: string; /** Recipient phone number */ recipientPhone: string; /** The id of the address that will be used for shipping */ addressId: string; /** Address data */ address: CreateAddressRequest; /** Data máxima de entrega */ maxDeliveryDate?: string; /** Prazo estimado de entrega */ estimatedDeliveryDate?: string; /** Shipping type */ type: string; } export const createShippingRequestSchema: Schema = object( { amount: ['amount', number()], description: ['description', string()], recipientName: ['recipient_name', string()], recipientPhone: ['recipient_phone', string()], addressId: ['address_id', string()], address: ['address', lazy(() => createAddressRequestSchema)], maxDeliveryDate: ['max_delivery_date', optional(string())], estimatedDeliveryDate: ['estimated_delivery_date', optional(string())], type: ['type', string()], } );