Sha256: d4eede3e4a6ff59a53433df8d68b52665ff811cc7d18ea38416fc594bb5adad2

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  module Ledgers
    module Stripe
      class DashboardURLHelper < LedgerSync::Ledgers::DashboardURLHelper
        def resource_path
          @resource_path = case resource
                           when Stripe::Customer
                             "/customers/#{resource.ledger_id}"
                           else
                             raise Error::LedgerError::UnknownURLFormat.new(
                               client: self,
                               resource: resource
                             )
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.4.2 lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb