Pagamento a terceiros e conta de garantia

Iremos exibir duas movimentações de igual valor, mas sinal trocado para que seja possível conciliar o valor exato de cada Payment. Essas movimentações vão aparecer como tipos novos e no blobo de Financial Event Accounts. Além disso, para identificar os pagamentos em caso de cessão, vamos colocar o campo de AccountHolderDocument que vai conter o documento do recebedor daquele pagamento.

Tipos novos:
Garantia - Guarantee - 14;
Cessão - OwnershipAssignment - 15;

Exemplo Garantia:

Cenário: Cliente com saldo de 1000 reais a receber, sendo 300 para uma conta especificada por uma operação de crédito com garantia e 700 livres.

<FinancialEvents>
        <Event>
            <EventId>6686256</EventId>
            <Description>Guarantee</Description>
            <Type>14</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>-300.00</Amount>
        </Event>
        <Event>
            <EventId>6686265</EventId>
            <Description>Guarantee</Description>
            <Type>14</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>300.00</Amount>
        </Event>
    </FinancialEvents>
<FinancialEventAccounts>
        <Event>
            <EventId>6686256</EventId>
            <Description>Guarantee</Description>
            <Type>14</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>-300.00</Amount>
            <PaymentId>304430942</PaymentId>
        </Event>
        <Event>
            <EventId>6686265</EventId>
            <Description>Guarantee</Description>
            <Type>14</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>300.00</Amount>
            <PaymentId>305369356</PaymentId>
        </Event>
    </FinancialEventAccounts>
<Payments>
        <Payment>
            <Id>304430942</Id>
            <WalletTypeId>2</WalletTypeId>
            <TotalAmount>700.00</TotalAmount>
            <TotalFinancialAccountsAmount>0.00</TotalFinancialAccountsAmount>
            <LastNegativeAmount>0.00</LastNegativeAmount>
            <FavoredBankAccount>
                <BankCode>104</BankCode>
                <BankBranch>0000</BankBranch>
                <BankAccountNumber>000000000000</BankAccountNumber>
              	<AccountHolderDocument>11111111111111<AccountHolderDocument> 
            </FavoredBankAccount>
        </Payment>
        <Payment>
            <Id>305369356</Id>
            <WalletTypeId>2</WalletTypeId>
            <TotalAmount>300.00</TotalAmount>
            <TotalFinancialAccountsAmount>0.00</TotalFinancialAccountsAmount>
            <LastNegativeAmount>0.00</LastNegativeAmount>
            <FavoredBankAccount>
                <BankCode>197</BankCode>
                <BankBranch>0000</BankBranch>
                <BankAccountNumber>000000000000</BankAccountNumber>
              	<AccountHolderDocument>11111111111111<AccountHolderDocument> 
            </FavoredBankAccount>
        </Payment>
    </Payments>

Exemplo Troca de titularidade:

Cenário: Cliente com saldo de 1000 reais a receber, sendo que 300 foram cedidos em uma operação de cessão e 700 livres continuam em sua titularidade.

<FinancialEvents>
        <Event>
            <EventId>6686256</EventId>
            <Description>OwnershipAssignment</Description>
            <Type>15</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>-300.00</Amount>
        </Event>
        <Event>
            <EventId>123456</EventId>
            <Description>OwnershipAssignment</Description>
            <Type>15</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>300.00</Amount>
        </Event>
    </FinancialEvents>
<FinancialEventAccounts>
        <Event>
            <EventId>6686256</EventId>
            <Description>OwnershipAssignment</Description>
            <Type>15</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>-300.00</Amount>
            <PaymentId>304430942</PaymentId>
        </Event>
        <Event>
            <EventId>123456</EventId>
            <Description>OwnershipAssignment</Description>
            <Type>15</Type>
            <PaymentDate>20191114</PaymentDate>
            <Amount>300.00</Amount>
            <PaymentId>123456789</PaymentId>
        </Event>
    </FinancialEventAccounts>
<Payments>
        <Payment>
            <Id>304430942</Id>
            <WalletTypeId>2</WalletTypeId>
            <TotalAmount>700.00</TotalAmount>
            <TotalFinancialAccountsAmount>0.00</TotalFinancialAccountsAmount>
            <LastNegativeAmount>0.00</LastNegativeAmount>
            <FavoredBankAccount>
                <BankCode>104</BankCode>
                <BankBranch>0000</BankBranch>
                <BankAccountNumber>000000000000</BankAccountNumber>
                <AccountHolderDocument>99999999999999<AccountHolderDocument>
            </FavoredBankAccount>
        </Payment>
        <Payment>
            <Id>123456789</Id>
            <WalletTypeId>2</WalletTypeId>
            <TotalAmount>300.00</TotalAmount>
            <TotalFinancialAccountsAmount>0.00</TotalFinancialAccountsAmount>
            <LastNegativeAmount>0.00</LastNegativeAmount>
            <FavoredBankAccount>
                <BankCode>104</BankCode>
                <BankBranch>0000</BankBranch>
                <BankAccountNumber>000000000000</BankAccountNumber>
                <AccountHolderDocument>11111111111111<AccountHolderDocument> 
            </FavoredBankAccount>
        </Payment>
    </Payments>