예제 #1
0
    public async Task <byte[]> GetAsync(SIEType type, long?finYearID = null, SIEExportOptions exportOptions = null)
    {
        var request = new FileDownloadRequest()
        {
            Endpoint = Endpoint,
            Indices  = new List <string> {
                type.GetStringValue()
            }
        };

        if (finYearID != null)
        {
            request.Parameters.Add("financialyear", finYearID.ToString());
        }

        if (exportOptions != null)
        {
            foreach (var parameter in GetExportParameters(exportOptions))
            {
                request.Parameters.Add(parameter.Key, parameter.Value);
            }
        }

        return(await SendAsync(request).ConfigureAwait(false));
    }
예제 #2
0
        public async Task <byte[]> GetAsync(SIEType type)
        {
            RequestInfo = new RequestInfo()
            {
                BaseUrl  = BaseUrl,
                Resource = Resource,
                Indices  = new[] { type.GetStringValue() }
            };

            return(await DownloadFile().ConfigureAwait(false));
        }
예제 #3
0
        public async Task <byte[]> GetAsync(SIEType type, long?finYearID = null)
        {
            var request = new FileDownloadRequest()
            {
                Resource = Resource,
                Indices  = new List <string> {
                    type.GetStringValue()
                }
            };

            if (finYearID != null)
            {
                request.Parameters.Add("financialyear", finYearID.ToString());
            }

            return(await SendAsync(request).ConfigureAwait(false));
        }