Skip to content

Commit

Permalink
Add Wealthsimple Transaction types
Browse files Browse the repository at this point in the history
- Adds paymentSpend and giveawayBonus types
- Adjusts comments of types
- Fix bug with wrong name of payments transfer introduced in last commit
  • Loading branch information
Nef10 authored Sep 16, 2021
1 parent a1077fa commit d63b77a
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions Sources/Wealthsimple/Transaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public struct Transaction {
public enum TransactionType: String {
/// buying a Stock, ETF, ...
case buy
/// depositing cash in the account
/// depositing cash in a registered account
case contribution
/// receiving a dividend
/// receiving a cash dividend
case dividend
/// custodian fee
case custodianFee
/// deposit
/// depositing cash in an unregistered account
case deposit
/// fee
/// wealthsimple management fee
case fee
/// forex
case forex
Expand All @@ -35,21 +35,21 @@ public struct Transaction {
case homeBuyersPlan
/// hst
case hst
/// charged tnterest
/// charged interest
case chargedInterest
/// journal
case journal
/// non resident withholding tax
/// US non resident withholding tax on dividend payments
case nonResidentWithholdingTax
/// redemption
case redemption
/// risk exposure fee
case riskExposureFee
/// refund
case refund
/// reimbursement
/// reimbursements, e.g. ETF Fee Rebates
case reimbursement
/// sell
/// selling a Stock, ETF, ...
case sell
/// stock distribution
case stockDistribution
Expand All @@ -61,16 +61,20 @@ public struct Transaction {
case transferOut
/// withholding tax
case withholdingTax
/// withdrawal
/// withdrawal of cash
case withdrawal
/// Wealthsimple Payments Transfer in
case paymentTransferIn
/// Weathsimple Payments Transfer Out
case paymentTransferOut
/// Cash transfer into cash account
case paymentTransferIn = "wealthsimplePaymentsTransferIn"
/// Cash withdrawl from cash account
case paymentTransferOut = "wealthsimplePaymentsTransferOut"
/// Referral Bonus
case referralBonus
/// Interest
/// Interest paid in saving accounts
case interest
/// Wealthsimple Cash Card payments
case paymentSpend = "wealthsimplePaymentsSpend"
/// Wealthsimple Cash Cashback
case giveawayBonus
}

private static let baseUrl = URLComponents(string: "https://api.production.wealthsimple.com/v1/transactions")!
Expand Down

0 comments on commit d63b77a

Please sign in to comment.