File: ofx_request_statement.hh

package info (click to toggle)
libofx 1%3A0.9.10-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 11,192 kB
  • sloc: sh: 11,428; cpp: 6,240; ansic: 2,459; makefile: 170; xml: 61
file content (106 lines) | stat: -rw-r--r-- 3,724 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/***************************************************************************
                          ofx_request_statement.hh
                             -------------------
    copyright            : (C) 2005 by Ace Jones
    email                : acejones@users.sourceforge.net
***************************************************************************/
/**@file
 * \brief Declaration of libofx_request_statement to create an OFX file
 *   containing a request for a statement.
*/
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef OFX_REQ_STATEMENT_H
#define OFX_REQ_STATEMENT_H

#include <string>
#include "libofx.h"
#include "ofx_request.hh"

using namespace std;

/**
 * \brief A statement request
 *
 * This is an entire OFX aggregate, with all subordinate aggregates needed to log onto
 * the OFX server of a single financial institution and download a statement for
 * a single account.
*/

class OfxStatementRequest: public OfxRequest
{
public:
  /**
   * Creates the request aggregate to obtain a statement from this @p fi for
   * this @p account, starting on this @p start date, ending today.
   *
   * @param fi The information needed to log on user into one financial
   *   institution
   * @param account The account for which a statement is desired
   * @param start The beginning time of the statement period desired
   */
  OfxStatementRequest( const OfxFiLogin& fi, const OfxAccountData& account, time_t from );

protected:
  /**
   * Creates a bank statement request aggregate, <BANKMSGSRQV1>, <STMTTRNRQ>
   * & <STMTRQ> for this account.  Should only be used if this account is a
   * BANK account.
   *
   * @return The request aggregate created
   */
  OfxAggregate BankStatementRequest(void) const;

  /**
   * Creates a credit card statement request aggregate, <CREDITCARDMSGSRQV1>,
   * <CCSTMTTRNRQ> & <CCSTMTRQ> for this account.  Should only be used if this
   * account is a CREDIT CARD account.
   *
   * @return The request aggregate created
   */
  OfxAggregate CreditCardStatementRequest(void) const;

  /**
   * Creates an investment statement request aggregate, <INSTMTMSGSRQV1>,
   * <INVSTMTTRNRQ> & <INVSTMTRQ> for this account.  Should only be used if this
   * account is an INVESTMENT account.
   *
   * @return The request aggregate created
   */
  OfxAggregate InvestmentStatementRequest(void) const;

private:
  OfxAccountData m_account;
  time_t m_date_from;
};

class OfxPaymentRequest: public OfxRequest
{
public:
  /**
   * Creates the request aggregate to submit a payment to this @p fi on
   * this @p account, to this @p payee as described by this @payment.
   *
   * @param fi The information needed to log on user into one financial
   *   institution
   * @param account The account from which the payment should be made
   * @param payee The payee who should receive the payment
   * @param payment The details of the payment
   */
  OfxPaymentRequest( const OfxFiLogin& fi, const OfxAccountData& account, const OfxPayee& payee, const OfxPayment& payment );
protected:

private:
  OfxAccountData m_account;
  OfxPayee m_payee;
  OfxPayment m_payment;
};

#endif // OFX_REQ_STATEMENT_H