No commit activity in last 3 years
No release in over 3 years
The Capital One website only provides a way to download structured data of credit card transaction history for the previous 180 days. However, you are able to download monthly PDF account statements for the previous few years. This library allows you to parse a Capital One PDF monthly statement, and access structured transaction history data.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.5.0
~> 10.4.2
~> 0.9.1
~> 0.8.7

Runtime

~> 1.8.1
~> 1.3.3
 Project Readme

parse_capitalone_pdf_statement

Gem Version Build Status Dependency Status

The Capital One website only provides a way to download structured data of credit card transaction history for the previous 180 days. However, you are able to download monthly PDF account statements for the previous few years.

This library allows you to parse a Capital One PDF monthly statement, and access structured transaction history data.

Installation

Add this line to your application's Gemfile:

gem 'parse_capitalone_pdf_statement'

And then execute:

% bundle

Or install it yourself as:

% gem install parse_capitalone_pdf_statement

Convert PDF to JSON

Use the capitalone_pdf_to_json.rb script to convert a PDF montly statement to JSON.

% capitalone_pdf_to_json.rb my_monthly_statement.pdf > my_monthly_statement.json

API Example

Parse a PDF monthly statement and print all payments:

require 'parse_capitalone_pdf_statement'

statement = CapitalOneStatement.new('/path/to/my_monthly_statement.pdf')

statement.payments.each do |payment|
  puts 'Transaction ID: %d'   % payment.id
  puts 'Card Number:    %d'   % payment.card_number
  puts 'Date:           %s'   % payment.date
  puts 'Description:    %s'   % payment.description
  puts 'Amount:         %.2f' % payment.amount
end

See the API Documentation for more information.

License

Copyright (c) 2014 Joe Sortelli

MIT License