Class: ShopifyCLI::Theme::Syncer::Uploader::BulkRequest
- Inherits:
-
Object
- Object
- ShopifyCLI::Theme::Syncer::Uploader::BulkRequest
- Defined in:
- lib/shopify_cli/theme/syncer/uploader/bulk_request.rb
Instance Method Summary collapse
-
#initialize(theme, bulk_items) ⇒ BulkRequest
constructor
A new instance of BulkRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(theme, bulk_items) ⇒ BulkRequest
Returns a new instance of BulkRequest.
8 9 10 11 |
# File 'lib/shopify_cli/theme/syncer/uploader/bulk_request.rb', line 8 def initialize(theme, bulk_items) @theme = theme @bulk_items = bulk_items end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/shopify_cli/theme/syncer/uploader/bulk_request.rb', line 13 def to_h { path: "themes/#{@theme.id}/assets/bulk.json", method: "PUT", body: JSON.generate({ assets: assets }), } end |