From 87d9fb261bb81e49096adf330e0966135dbef7d7 Mon Sep 17 00:00:00 2001 From: stuzer05 Date: Mon, 25 Mar 2024 12:13:23 +0200 Subject: [PATCH] Add more transactions to handle --- main.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/main.go b/main.go index 757995b..a6c1631 100644 --- a/main.go +++ b/main.go @@ -209,6 +209,33 @@ func handleWebhook(w http.ResponseWriter, r *http.Request) { Notes: string(body), SourceId: account.Id, }) + case "YouTube": + transactionList = append(transactionList, firefly3.TransactionSplitStore{ + Type_: &transactionTypeWithdrawal, + Date: time.Now(), // time.Unix(int64(time.Now()), 0) + Amount: strconv.Itoa(transaction.Data.StatementItem.Amount / 100), + Description: "YouTube membership: Latte ASMR", + Notes: string(body), + SourceId: account.Id, + }) + case "Київстар +380672463500": + transactionList = append(transactionList, firefly3.TransactionSplitStore{ + Type_: &transactionTypeWithdrawal, + Date: time.Now(), // time.Unix(int64(time.Now()), 0) + Amount: strconv.Itoa(transaction.Data.StatementItem.Amount / 100), + Description: "Kyivstar: +380672463500", + Notes: string(body), + SourceId: account.Id, + }) + case "Lifecell +380732463500": + transactionList = append(transactionList, firefly3.TransactionSplitStore{ + Type_: &transactionTypeWithdrawal, + Date: time.Now(), // time.Unix(int64(time.Now()), 0) + Amount: strconv.Itoa(transaction.Data.StatementItem.Amount / 100), + Description: "Lifecell: +380732463500", + Notes: string(body), + SourceId: account.Id, + }) break }