Skip to content

Commit

Permalink
Add Teller imports
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrobertson committed Aug 17, 2018
1 parent 3208f76 commit e7da17b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/import
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ command :starling do |c|
end
end

command :teller do |c|
c.syntax = 'Fintech To YNAB teller [options]'
c.summary = ''
c.description = ''
c.option '--token STRING', String, 'Teller API token'
c.option '--teller_account_id STRING', String, 'Your Teller account id'
c.option '--ynab_account_id STRING', String, 'Your YNAB account ID for this Starling account'
c.action do |args, options|
raise ArgumentError.new("token is required!") unless options.token
raise ArgumentError.new("ynab_account_id is required!") unless options.ynab_account_id
raise ArgumentError.new("teller_account_id is required!") unless options.teller_account_id
Import::Teller.new(options.token, options.teller_account_id, options.ynab_account_id).import
end
end

command :csv do |c|
c.syntax = 'Fintech To YNAB csv [options]'
c.summary = ''
Expand Down

0 comments on commit e7da17b

Please sign in to comment.