Class: Pinterest::Resources::CustomerListUploads
- Defined in:
- lib/pinterest/resources/customer_list_uploads.rb
Overview
Handles multipart S3 upload lifecycle for customer list records. Workflow: create → (upload parts to S3 presigned URLs) → run
Instance Method Summary collapse
-
#create(ad_account_id:, customer_list_id:, operation:, total_parts:) ⇒ Hash
Request a multipart S3 upload for a customer list.
- #find(ad_account_id:, customer_list_id:, customer_list_upload_id:) ⇒ Hash
-
#run(ad_account_id:, customer_list_id:, customer_list_upload_id:) ⇒ Hash
Begin processing a customer list upload after all S3 parts are uploaded.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Pinterest::Resources::Base
Instance Method Details
#create(ad_account_id:, customer_list_id:, operation:, total_parts:) ⇒ Hash
Request a multipart S3 upload for a customer list. Each part must be ≥ 5 MB except the final part.
14 15 16 17 |
# File 'lib/pinterest/resources/customer_list_uploads.rb', line 14 def create(ad_account_id:, customer_list_id:, operation:, total_parts:) post("/ad_accounts/#{ad_account_id}/customer_lists/#{customer_list_id}/uploads", { operation: operation, total_parts: total_parts }) end |
#find(ad_account_id:, customer_list_id:, customer_list_upload_id:) ⇒ Hash
23 24 25 26 |
# File 'lib/pinterest/resources/customer_list_uploads.rb', line 23 def find(ad_account_id:, customer_list_id:, customer_list_upload_id:) get("/ad_accounts/#{ad_account_id}/customer_lists/#{customer_list_id}" \ "/uploads/#{customer_list_upload_id}") end |
#run(ad_account_id:, customer_list_id:, customer_list_upload_id:) ⇒ Hash
Begin processing a customer list upload after all S3 parts are uploaded.
34 35 36 37 |
# File 'lib/pinterest/resources/customer_list_uploads.rb', line 34 def run(ad_account_id:, customer_list_id:, customer_list_upload_id:) post("/ad_accounts/#{ad_account_id}/customer_lists/#{customer_list_id}" \ "/uploads/#{customer_list_upload_id}/run") end |