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/authorise.rb,
lib/lucid_shopify/container.rb,
lib/lucid_shopify/credentials.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/throttled_strategy.rb,
lib/lucid_shopify/create_all_webhooks.rb,
lib/lucid_shopify/delete_all_webhooks.rb,
lib/lucid_shopify/webhook_handler_list.rb,
lib/lucid_shopify/redis_throttled_strategy.rb

Defined Under Namespace

Classes: ActivateCharge, Authorise, Client, Config, CreateAllWebhooks, CreateCharge, CreateWebhook, Credentials, DeleteAllWebhooks, DeleteRequest, DeleteWebhook, GetRequest, PostRequest, PutRequest, RedisThrottledStrategy, Request, Response, SendRequest, ThrottledStrategy, 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.23.0'
Container =
Dry::Container.new

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configConfig

Returns:

Raises:



32
33
34
35
36
# File 'lib/lucid_shopify/config.rb', line 32

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)

Returns:



65
66
67
# File 'lib/lucid_shopify.rb', line 65

def handlers
  @handlers ||= WebhookHandlerList.new
end

.webhooksWebhookList

Webhooks created for each shop.

Examples:

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

Returns:



48
49
50
# File 'lib/lucid_shopify.rb', line 48

def webhooks
  @webhooks ||= WebhookList.new
end