Module: Billrb
- Defined in:
- lib/billrb.rb,
lib/billrb/util.rb,
lib/billrb/client.rb,
lib/billrb/errors.rb,
lib/billrb/version.rb,
lib/billrb/resource.rb,
lib/billrb/list_page.rb,
lib/billrb/operations.rb,
lib/billrb/configuration.rb,
lib/billrb/resources/invoice.rb,
lib/billrb/resources/customer.rb,
lib/billrb/resources/credit_memo.rb,
lib/billrb/resources/recurring_invoice.rb,
lib/billrb/resources/receivable_payment.rb,
lib/billrb/resources/customer_bank_account.rb
Defined Under Namespace
Modules: Operations, Util
Classes: ApiError, AuthenticationError, BadRequestError, Client, Configuration, ConfigurationError, ConnectionError, CreditMemo, Customer, CustomerBankAccount, Error, ForbiddenError, Invoice, ListPage, NotFoundError, RateLimitError, ReceivablePayment, RecurringInvoice, Resource, ServerError
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
Default client built from the module-level configuration. For multi-tenant apps, build clients directly: Billrb::Client.new(dev_key: …)
32
33
34
|
# File 'lib/billrb.rb', line 32
def client
@client ||= Client.new(configuration)
end
|
.configuration ⇒ Object
20
21
22
|
# File 'lib/billrb.rb', line 20
def configuration
@configuration ||= Configuration.new
end
|
24
25
26
27
28
|
# File 'lib/billrb.rb', line 24
def configure
yield(configuration)
@client = nil
configuration
end
|
.reset! ⇒ Object
36
37
38
39
|
# File 'lib/billrb.rb', line 36
def reset!
@configuration = nil
@client = nil
end
|