lib/truelayer/transaction.rb in truelayer-0.1.0 vs lib/truelayer/transaction.rb in truelayer-0.1.1
- old
+ new
@@ -6,12 +6,12 @@
require 'truelayer/transaction_meta'
module Truelayer
class Transaction < BaseModel
attributes :transaction_id, :normalised_provider_transaction_id, :provider_transaction_id,
- :timestamp, :description, :amount, :currency,
- :transaction_type, :transaction_category, :transaction_classification,
- :merchant_name, :running_balance, :meta
+ :timestamp, :description, :amount, :currency,
+ :transaction_type, :transaction_category, :transaction_classification,
+ :merchant_name, :running_balance, :meta
def self.build(json:)
super.tap do |record|
record.running_balance = RunningBalance.build(json: (record.running_balance || {}))
record.meta = TransactionMeta.build(json: (record.meta || {}))