Skip to content

Commit 963f1cc

Browse files
Truncate the payee names
Closes #88 Fixes #87
1 parent 0635fe4 commit 963f1cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/services/ynab/bulk_transaction_creator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def create
2626
transactions_to_create << {
2727
import_id: transaction[:id].to_s.truncate(36),
2828
account_id: @client.selected_account_id,
29-
payee_name: transaction[:payee_name],
29+
payee_name: transaction[:payee_name].to_s.truncate(50),
3030
amount: transaction[:amount],
3131
memo: transaction[:description],
3232
date: transaction[:date].to_date,

app/services/ynab/transaction_creator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def initialize(id: nil, date: nil, amount: nil, payee_name: nil, description: tr
1313
def create
1414
create = @client.create_transaction(
1515
id: @id,
16-
payee_name: @payee_name,
16+
payee_name: @payee_name.to_s.truncate(50),
1717
amount: @amount,
1818
cleared: @cleared,
1919
date: @date.to_date,

0 commit comments

Comments
 (0)