Sha256: 682feecb864a88e7f1636c63c2589bdaa9a1344452868396fb4a7743171492c3

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ledger_sync-1.3.5 lib/ledger_sync/adaptors/quickbooks_online/dashboard_url_helper.rb