Module: WebhookInbox
- Defined in:
- lib/webhook_inbox.rb,
lib/webhook_inbox/engine.rb,
lib/webhook_inbox/version.rb,
lib/webhook_inbox/receiver.rb,
app/models/webhook_inbox/event.rb,
lib/webhook_inbox/configuration.rb,
lib/webhook_inbox/rspec/helpers.rb,
lib/webhook_inbox/providers/base.rb,
app/jobs/webhook_inbox/process_job.rb,
lib/webhook_inbox/providers/stripe.rb,
app/helpers/webhook_inbox/dashboard_helper.rb,
app/controllers/webhook_inbox/dashboard_controller.rb,
app/controllers/webhook_inbox/application_controller.rb,
lib/generators/webhook_inbox/install/install_generator.rb
Defined Under Namespace
Modules: DashboardHelper, Generators, Providers, RSpecHelpers, Receiver
Classes: ApplicationController, Configuration, DashboardController, Engine, Event, ProcessJob, SignatureError, UnknownProviderError
Constant Summary
collapse
- PROVIDERS =
{
stripe: WebhookInbox::Providers::Stripe
}.freeze
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
22
23
24
25
|
# File 'lib/webhook_inbox.rb', line 22
def configure
self.configuration ||= Configuration.new
yield configuration
end
|
.provider_for(name) ⇒ Object
27
28
29
30
31
32
|
# File 'lib/webhook_inbox.rb', line 27
def provider_for(name)
klass = PROVIDERS[name.to_sym]
raise UnknownProviderError, "Unknown provider: #{name}. Available: #{PROVIDERS.keys.join(', ')}" unless klass
klass.new
end
|