Sha256: 79fdf223d863cc66693945077582edc92058e5e65c9bafe0fc6d9db096423954

Contents?: true

Size: 1.57 KB

Versions: 5

Compression:

Stored size: 1.57 KB

Contents

# frozen_string_literal: true

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class DashboardURLHelper < LedgerSync::Ledgers::DashboardURLHelper
        def resource_path # rubocop:disable Metrics/CyclomaticComplexity
          @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
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ledger_sync-1.6.0 lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb
ledger_sync-1.4.4 lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb