Class: LedgerSync::Ledgers::QuickBooksOnline::DashboardURLHelper

Inherits:
DashboardURLHelper show all
Defined in:
lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb

Instance Attribute Summary

Attributes inherited from DashboardURLHelper

#base_url, #resource

Instance Method Summary collapse

Methods inherited from DashboardURLHelper

#initialize, #url

Constructor Details

This class inherits a constructor from LedgerSync::Ledgers::DashboardURLHelper

Instance Method Details

#resource_pathObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb', line 7

def resource_path
  @resource_path = case resource
  when QuickBooksOnline::Account
    "/register?accountId=#{resource.ledger_id}"
  when QuickBooksOnline::Bill
    "/bill?txnId=#{resource.ledger_id}"
  when QuickBooksOnline::Customer
    "/customerdetail?nameId=#{resource.ledger_id}"
  when QuickBooksOnline::Deposit
    "/deposit?txnId=#{resource.ledger_id}"
  when QuickBooksOnline::Expense
    "/expense?txnId=#{resource.ledger_id}"
  when QuickBooksOnline::JournalEntry
    "/journal?txnId=#{resource.ledger_id}"
  when QuickBooksOnline::LedgerClass
    "/class"
  when QuickBooksOnline::Payment
    "/recvpayment?txnId=#{resource.ledger_id}"
  when QuickBooksOnline::Transfer
    "/transfer?txnId=#{resource.ledger_id}"
  when QuickBooksOnline::Vendor
    "/vendordetail?nameId=#{resource.ledger_id}"
  end
end