Class: ShopifyCLI::PartnersAPI::AppExtensions::Job
- Inherits:
-
ThreadPool::Job
- Object
- ThreadPool::Job
- ShopifyCLI::PartnersAPI::AppExtensions::Job
- Defined in:
- lib/shopify_cli/partners_api/app_extensions/job.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from ThreadPool::Job
Instance Method Summary collapse
-
#initialize(ctx, app, type) ⇒ Job
constructor
A new instance of Job.
- #patch_app_with_extensions! ⇒ Object
- #perform! ⇒ Object
Methods inherited from ThreadPool::Job
#call, #error?, #recurring?, #success?
Constructor Details
#initialize(ctx, app, type) ⇒ Job
Returns a new instance of Job.
11 12 13 14 15 16 17 |
# File 'lib/shopify_cli/partners_api/app_extensions/job.rb', line 11 def initialize(ctx, app, type) super() @ctx = ctx @app = app @api_key = @app["apiKey"] @type = type end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
9 10 11 |
# File 'lib/shopify_cli/partners_api/app_extensions/job.rb', line 9 def result @result end |
Instance Method Details
#patch_app_with_extensions! ⇒ Object
24 25 26 |
# File 'lib/shopify_cli/partners_api/app_extensions/job.rb', line 24 def patch_app_with_extensions! @app.merge!(result) end |
#perform! ⇒ Object
19 20 21 22 |
# File 'lib/shopify_cli/partners_api/app_extensions/job.rb', line 19 def perform! resp = PartnersAPI.query(@ctx, "get_extension_registrations", **params) @result = resp&.dig("data", "app") || {} end |