This method generates a file containing fake disbursement transactions. The generated file can be in either Microsoft excel file (XLSX) or CSV format and contains data that can be used for testing. For payload explanations for both request and response, click here
using OneKhusa.SDK; 
using OneKhusa.SDK.Models.Constants.Shared; 
using OneKhusa.SDK.Models.FakeData.Disbursements; 

//code omitted for brevity 

OneKhusaResponse<GenerateFakeTransactionsResponse> response = await client 
    .FakeData 
    .Disbursements 
    .GenerateFakeTransactionsAsync(new GenerateFakeTransactionsRequest 
    { 
        FileType = ContentTypes.MicrosoftExcel 
    }); 

if (response is { IsSuccess: true, Data: not null }) 
{ 
    Console.WriteLine($""" 
        FileContentBase64: {response.Data.FileContentBase64} 
    """); 
    Console.ReadLine(); 
    return; 
}
//it means an error has occurred: RFC7807 compliant error object
Console.WriteLine($"""
        Type: {response.Error?.Type};
        Title: {response.Error?.Title};
        Detail: {response.Error?.Detail};
        ErrorCode: {response.Error?.ErrorCode};
        Status: {response.Error?.Status};
        Instance: {response.Error?.Instance};
        Errors: {string.Join(";", response.Error?.Errors ?? [])}
""");
Console.ReadLine();
Note: This method accepts custom idempotency key generated by your system. By default, if not specified, it will create one on your behalf.