CreateInternalCashTransferOrders
Inputs (Array[]) inherits from EntityBase
Name | Type | Description | Mandatory | Available from version |
---|---|---|---|---|
BrickId | Guid | The BrickId is populated from BFS when the entity is created so this is not used as an input |
| 2.27 |
FromAccountNumber | string | This is either the account number or the BrickId of the account where the asset should be transferred from. One of these inputs is mandatory | True | 2.27 |
FromAccountBrickId | Guid | 2.27 | ||
ToAccountNumber | string | This is either the account number or the BrickId of the account where the asset should be transferred to. One of these inputs is mandatory | True | 2.27 |
ToAccountBrickId | Guid | 2.27 | ||
Amount | decimal | The amount to be moved between the FromAccount and ToAccount | True | 2.27 |
Comment | string | Use this field to store any free text that you want to store on the order | True | 2.27 |
TradeDate | DateTime | This is the trade date that will be used on the resulting transactions | True | 2.27 |
SettlementDate | DateTime | This is the settle date that will be used on the resulting transactions | True | 2.27 |
ValueDate | DateTime | This is the value date that will be used on the resulting transactions | True | 2.27 |
CurrencyCode | string | This is the 3 letter ISO currency code that will be used for the asset to transfer. Either the CurrencyCode or the CashAssetBrickId has to be entered CashAssetBrickId is the BrickId of the Cash asset | True | 2.27 |
CashAssetBrickId | Guid | 2.27 |
Outputs
Name | Type | Description |
---|---|---|
Entities | Array | All orders are returned along with each order’s BrickId and array of Errors per order |
Code examples
C# - Create internal cash transfer orders in a BFS instance
public class InternalCashTransferOrderHelper
{
/// <summary>
/// Creates an internal cash transfer order
/// </summary>
/// <param name="fromAccount">The account where the amount should be transferred from</param>
/// <param name="toAccount">The account where the amount should be transferred to</param>
/// <param name="currencyCode">The three letter ISO currency code to use for the asset</param>
/// <param name="amount">The amount to transfer</param>
/// <param name="tradeDate">The date to use in the trade transaction</param>
/// <param name="settlementDate">The date to use in the settle transaction</param>
/// <param name="valueDate">The date to use in the settle transaction for value date</param>
/// <returns></returns>
public static InternalCashTransferOrder GenerateInternalCashTransferOrder(
Account fromAccount,
Account toAccount,
string currencyCode,
decimal amount,
DateTime tradeDate,
DateTime settlementDate,
DateTime valueDate)
{
return new InternalCashTransferOrder
{
FromAccountBrickId = fromAccount.BrickId,
ToAccountBrickId = toAccount.BrickId,
CurrencyCode = currencyCode,
Amount = amount,
TradeDate = tradeDate,
SettlementDate = settlementDate,
ValueDate = valueDate
};
}
}
public class TestInternalCashTransferOrders
{
var request = new CreateInternalCashTransferOrderRequest()
request.Credentials = CorrectCredentials();
request.identify = CorrectIdentify();
var internalCashTransferOrder = InternalCashTransferOrderHelper.GenerateInternalCashTransferOrder(
accountFrom,
accountTo,
"SEK",
100M,
DateTime.Today,
DateTime.Today,
DateTime.Today);
request.Entities = new[]
{
internalCashTransferOrder
};
var response = client.CreateInternalCashTransferOrders(request);
}
Blog stream
Create a blog post to share news and announcements with your team and company.
Terms of License
Change Policy
© 2009 - 2024 Huddlestock Technologies AB All rights reserved