Envelope
    
            
            in package
            
        
    
            
            implements
                            EnvelopeInterface                    
    
    
Clase que representa un sobre con documentos.
Los sobres típicamente tendrán solo un documento. Y si llegasen a tener más de un documento serían siempre del mismo remitente y al mismo destinatario.
Table of Contents
Interfaces
- EnvelopeInterface
- Interfaz para la clase que representa un sobre con documentos.
Properties
- $businessMessageID : string
- Identificador único del mensaje comercial encapsulado.
- $creationDateAndTime : DateTimeInterface
- Fecha y hora de creación del sobre.
- $documents : array<string|int, DocumentInterface>
- Documentos que están en el sobre.
- $documentType : DocumentType
- Tipo de documento que el sobre tiene.
- $metadata : BagInterface
- Metadatos del sobre.
- $originalBusinessMessageID : string|null
- Identificador del mensaje original al que se responde.
- $process : ProcessType
- Tipo de proceso asociado al intercambio de documentos del sobre.
- $receiver : ReceiverInterface
- Receptor del sobre.
- $sender : SenderInterface
- Remitente del sobre.
Methods
- __construct() : mixed
- Constructor del sobre.
- addDocument() : static
- Agrega un documento al sobre.
- addMetadata() : static
- Agrega una clave específica a los metadatos.
- countDocuments() : int
- Obtiene la cantidad de documentos en el sobre.
- getBusinessMessageID() : string
- Obtiene el identificador único del mensaje comercial encapsulado.
- getCreationDateAndTime() : DateTimeInterface
- Obtiene la fecha y hora de creación del sobre.
- getDocuments() : array<string|int, DocumentInterface>
- Obtiene la lista de documentos que hay en el sobre.
- getDocumentType() : DocumentType
- Obtiene el tipo de documento que el sobre contiene.
- getMetadata() : BagInterface
- Obtiene los metadatos del sobre.
- getOriginalBusinessMessageID() : string|null
- Obtiene el identificador del mensaje original al que se responde con los documentos de este sobre.
- getProcess() : ProcessType
- Obtiene el proceso comercial o de negocio al que estan asociados los documentos del sobre.
- getReceiver() : ReceiverInterface
- Entrega el receptor del sobre.
- getSender() : SenderInterface
- Entrega el remitente del sobre.
- setDocuments() : static
- Asigna los documentos del sobre.
- setMetadata() : static
- Asigna los metadatos del sobre.
Properties
$businessMessageID
Identificador único del mensaje comercial encapsulado.
        private
            string
    $businessMessageID
    
    
    
    
    
    
$creationDateAndTime
Fecha y hora de creación del sobre.
        private
            DateTimeInterface
    $creationDateAndTime
    
    
    
    
    
    
$documents
Documentos que están en el sobre.
        private
            array<string|int, DocumentInterface>
    $documents
    
        Normalmente un sobre tendría solo un documento. Sin embargo, el componente de intercambio soporta múltiples documentos en un sobre. Cómo serán manejados los múltiples documentos de un sobre es una responsabilidad de cada estrategia de intercambio.
$documentType
Tipo de documento que el sobre tiene.
        private
            DocumentType
    $documentType
    
    
    
    
    
    
$metadata
Metadatos del sobre.
        private
            BagInterface
    $metadata
    
        Estos metadatos están directamente relacionados con el sobre que se está intercambiando y el tipo de transporte que se esté usando para dicho intercambio.
$originalBusinessMessageID
Identificador del mensaje original al que se responde.
        private
            string|null
    $originalBusinessMessageID
    
    
    
    
    
    
$process
Tipo de proceso asociado al intercambio de documentos del sobre.
        private
            ProcessType
    $process
    
    
    
    
    
    
$receiver
Receptor del sobre.
        private
            ReceiverInterface
    $receiver
    
    
    
    
    
    
$sender
Remitente del sobre.
        private
            SenderInterface
    $sender
    
    
    
    
    
    
Methods
__construct()
Constructor del sobre.
    public
                    __construct(SenderInterface $sender, ReceiverInterface $receiver[, DocumentType $documentType = DocumentType::B2B ][, ProcessType $process = ProcessType::BILLING ][, string|null $businessMessageID = null ][, string|null $originalBusinessMessageID = null ][, DateTimeInterface|null $creationDateAndTime = null ][, array<string|int, mixed> $documents = [] ][, BagInterface|array<string|int, mixed> $metadata = [] ]) : mixed
    Parameters
- $sender : SenderInterface
- $receiver : ReceiverInterface
- $documentType : DocumentType = DocumentType::B2B
- $process : ProcessType = ProcessType::BILLING
- $businessMessageID : string|null = null
- $originalBusinessMessageID : string|null = null
- $creationDateAndTime : DateTimeInterface|null = null
- $documents : array<string|int, mixed> = []
- $metadata : BagInterface|array<string|int, mixed> = []
addDocument()
Agrega un documento al sobre.
    public
                    addDocument(DocumentInterface $document) : static
    Parameters
- $document : DocumentInterface
Return values
staticaddMetadata()
Agrega una clave específica a los metadatos.
    public
                    addMetadata(string $key, mixed $value) : static
    Parameters
- $key : string
- $value : mixed
Return values
staticcountDocuments()
Obtiene la cantidad de documentos en el sobre.
    public
                    countDocuments() : int
    Return values
intgetBusinessMessageID()
Obtiene el identificador único del mensaje comercial encapsulado.
    public
                    getBusinessMessageID() : string
    Return values
stringgetCreationDateAndTime()
Obtiene la fecha y hora de creación del sobre.
    public
                    getCreationDateAndTime() : DateTimeInterface
    Return values
DateTimeInterfacegetDocuments()
Obtiene la lista de documentos que hay en el sobre.
    public
                    getDocuments() : array<string|int, DocumentInterface>
    Return values
array<string|int, DocumentInterface>getDocumentType()
Obtiene el tipo de documento que el sobre contiene.
    public
                    getDocumentType() : DocumentType
    Return values
DocumentTypegetMetadata()
Obtiene los metadatos del sobre.
    public
                    getMetadata() : BagInterface
    Return values
BagInterfacegetOriginalBusinessMessageID()
Obtiene el identificador del mensaje original al que se responde con los documentos de este sobre.
    public
                    getOriginalBusinessMessageID() : string|null
    Return values
string|nullgetProcess()
Obtiene el proceso comercial o de negocio al que estan asociados los documentos del sobre.
    public
                    getProcess() : ProcessType
    Return values
ProcessTypegetReceiver()
Entrega el receptor del sobre.
    public
                    getReceiver() : ReceiverInterface
    Return values
ReceiverInterfacegetSender()
Entrega el remitente del sobre.
    public
                    getSender() : SenderInterface
    Return values
SenderInterfacesetDocuments()
Asigna los documentos del sobre.
    public
                    setDocuments(array<string|int, mixed> $documents) : static
    Parameters
- $documents : array<string|int, mixed>
Return values
staticsetMetadata()
Asigna los metadatos del sobre.
    public
                    setMetadata(BagInterface|array<string|int, mixed> $metadata) : static
    Parameters
- $metadata : BagInterface|array<string|int, mixed>