Class: LedgerSync::Ledgers::Stripe::DashboardURLHelper

Inherits:
DashboardURLHelper show all
Defined in:
lib/ledger_sync/ledgers/stripe/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
# File 'lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb', line 7

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