Class: CapitalOneStatement::Transaction

Inherits:
Struct
  • Object
show all
Defined in:
lib/parse_capitalone_pdf_statement.rb

Overview

CapitalOneStatement::Transaction represents a single credit transaction

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountFloat

Returns the dollar amount parsed into a Float, negative for payments.

Returns:

  • (Float)

    the dollar amount parsed into a Float, negative for payments



243
244
245
# File 'lib/parse_capitalone_pdf_statement.rb', line 243

def amount
  @amount
end

#amount_strString

Returns the dollar amount string of the transaction.

Returns:

  • (String)

    the dollar amount string of the transaction



243
244
245
# File 'lib/parse_capitalone_pdf_statement.rb', line 243

def amount_str
  @amount_str
end

#card_numberFixnum

Returns the last four digits of the account number.

Returns:

  • (Fixnum)

    the last four digits of the account number



243
244
245
# File 'lib/parse_capitalone_pdf_statement.rb', line 243

def card_number
  @card_number
end

#dateDate

Returns the date of the transaction.

Returns:

  • (Date)

    the date of the transaction



243
244
245
# File 'lib/parse_capitalone_pdf_statement.rb', line 243

def date
  @date
end

#descriptionString

Returns the description of the transaction.

Returns:

  • (String)

    the description of the transaction



243
244
245
# File 'lib/parse_capitalone_pdf_statement.rb', line 243

def description
  @description
end

#idFixnum

Returns transaction id.

Returns:

  • (Fixnum)

    transaction id



243
244
245
# File 'lib/parse_capitalone_pdf_statement.rb', line 243

def id
  @id
end

Instance Method Details

#to_json(*args) ⇒ String

Returns JSON representation of Transaction.

Returns:

  • (String)

    JSON representation of Transaction



270
271
272
# File 'lib/parse_capitalone_pdf_statement.rb', line 270

def to_json(*args)
  to_h.to_json(*args)
end