Class: WebhookJob
- Inherits:
-
Struct
- Object
- Struct
- WebhookJob
- Defined in:
- lib/generators/shopqi_app_webhook/templates/app/jobs/webhook_job.rb
Instance Attribute Summary collapse
-
#shop_id ⇒ Object
Returns the value of attribute shop_id.
Instance Method Summary collapse
Instance Attribute Details
#shop_id ⇒ Object
Returns the value of attribute shop_id
2 3 4 |
# File 'lib/generators/shopqi_app_webhook/templates/app/jobs/webhook_job.rb', line 2 def shop_id @shop_id end |
Instance Method Details
#perform ⇒ Object
4 5 6 7 |
# File 'lib/generators/shopqi_app_webhook/templates/app/jobs/webhook_job.rb', line 4 def perform Shop.find(shop_id).use_shopkit Shopkit.create_webhook event: 'orders/fulfilled', callback_url: "http://#{SecretSetting.domain.host}/webhook" end |