Module: LucidShopify

Extended by:
Forwardable
Defined in:
lib/lucid_shopify.rb,
lib/lucid_shopify/error.rb,
lib/lucid_shopify/client.rb,
lib/lucid_shopify/config.rb,
lib/lucid_shopify/request.rb,
lib/lucid_shopify/version.rb,
lib/lucid_shopify/webhook.rb,
lib/lucid_shopify/response.rb,
lib/lucid_shopify/authorize.rb,
lib/lucid_shopify/container.rb,
lib/lucid_shopify/get_request.rb,
lib/lucid_shopify/put_request.rb,
lib/lucid_shopify/post_request.rb,
lib/lucid_shopify/send_request.rb,
lib/lucid_shopify/webhook_list.rb,
lib/lucid_shopify/create_charge.rb,
lib/lucid_shopify/create_webhook.rb,
lib/lucid_shopify/delete_request.rb,
lib/lucid_shopify/delete_webhook.rb,
lib/lucid_shopify/verify_webhook.rb,
lib/lucid_shopify/activate_charge.rb,
lib/lucid_shopify/verify_callback.rb,
lib/lucid_shopify/create_all_webhooks.rb,
lib/lucid_shopify/delete_all_webhooks.rb,
lib/lucid_shopify/request_credentials.rb,
lib/lucid_shopify/webhook_handler_list.rb,
lib/lucid_shopify/send_throttled_request.rb

Defined Under Namespace

Classes: ActivateCharge, Authorize, Client, Config, CreateAllWebhooks, CreateCharge, CreateWebhook, DeleteAllWebhooks, DeleteRequest, DeleteWebhook, GetRequest, PostRequest, PutRequest, Request, RequestCredentials, Response, SendRequest, SendThrottledRequest, VerifyCallback, VerifyWebhook, Webhook, WebhookHandlerList, WebhookList

Constant Summary collapse

Error =

Subclass this class for all gem exceptions, so that callers may r escue any subclass with:

rescue LucidShopify::Error => e
Class.new(StandardError)
NotConfiguredError =
Class.new(Error)
VERSION =
'0.13.0'
Container =
Dry::Container.new

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configConfig

Raises:



24
25
26
27
28
# File 'lib/lucid_shopify/config.rb', line 24

def config
  raise NotConfiguredError unless @config

  @config
end

Class Method Details

.handlersWebhookHandlerList

Handlers for webhook topics.

Examples:

LucidShopify.handlers.register('orders/create', OrdersCreateWebhook.new)

Call topic handlers

webhook = Webhook.new(myshopify_domain, topic, data)

LucidShopify.handlers.delegate(webhook)


60
61
62
# File 'lib/lucid_shopify.rb', line 60

def handlers
  @handlers ||= WebhookHandlerList.new
end

.webhooksWebhookList

Webhooks created for each shop.

Examples:

LucidShopify.webhooks.register('orders/create', fields: 'id,tags')


43
44
45
# File 'lib/lucid_shopify.rb', line 43

def webhooks
  @webhooks ||= WebhookList.new
end