class XeroCLI::Commands::Accounts
Attributes
show_accounts[R]
Public Class Methods
new(options)
click to toggle source
# File lib/xero_cli/commands/accounts.rb, line 2 def initialize(options) @show_accounts = options.show_accounts end
Public Instance Methods
perform()
click to toggle source
# File lib/xero_cli/commands/accounts.rb, line 6 def perform accounts = get_account(show_accounts == 'ALL' ? nil : show_accounts) XeroCLI::AccountsStorage.set(accounts.map(&:to_h)) ap accounts end
Private Instance Methods
get_account(type)
click to toggle source
# File lib/xero_cli/commands/accounts.rb, line 16 def get_account(type) xero_api.accounts(type) end