示例#1
0
        /// <summary>
        /// Gets credit card statement ofx payload.
        /// </summary>
        /// <param name="args">Date range and account filter.</param>
        /// <returns>
        /// Raw OFX Payload
        /// </returns>
        public async Task <string> GetStatementOfx(CreditCardStatementArgs args)
        {
            var request  = PrepareCreditCardStatementOfxRequest(args);
            var response = await _utils.PostRequest(_opts.ApiUrl, request);

            return(response);
        }
示例#2
0
        /// <summary>
        /// Gets credit card statement.
        /// </summary>
        /// <param name="args">Date range and account filter.</param>
        /// <returns>
        /// Strongly typed deserialized statement model.
        /// </returns>
        public async Task <Statement> GetStatement(CreditCardStatementArgs args)
        {
            var response = await GetStatementOfx(args);

            var ofxPayload = _serializer.Deserialize(response);

            // check for code

            return(OfxStatementParser.Parse(ofxPayload));
        }
示例#3
0
 internal IRequestBuilder GetCreditCardStatementRequest(CreditCardStatementArgs args) => _utils.Requests.GetRequestBuilder <CreditCardStatementRequestBuilder>()
 .Account(args.AccountNumber)
 .Filter(args.StartDate.ToString(_utils.DateFormat), args.EndDate.ToString(_utils.DateFormat))
 .TransactionId(_utils.GenerateTransactionId());
示例#4
0
 internal string PrepareCreditCardStatementOfxRequest(CreditCardStatementArgs args)
 {
     return(PrepareOfxRequest(AuthRequest(), GetCreditCardStatementRequest(args)));
 }