lib/peddler/apis/sales_v1.rb in peddler-4.0.1 vs lib/peddler/apis/sales_v1.rb in peddler-4.1.0

- old
+ new

@@ -52,13 +52,14 @@ # B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. # @param sku [String] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an # error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: # TestSKU, if you want the response to include order metrics for only SKU TestSKU. # @param rate_limit [Float] Requests per second + # @param tries [Integer] Total request attempts, including retries # @return [Peddler::Response] The API response def get_order_metrics(marketplace_ids, interval, granularity, granularity_time_zone: nil, buyer_type: "All", - fulfillment_network: nil, first_day_of_week: "Monday", asin: nil, sku: nil, rate_limit: 0.5) + fulfillment_network: nil, first_day_of_week: "Monday", asin: nil, sku: nil, rate_limit: 0.5, tries: 2) path = "/sales/v1/orderMetrics" params = { "marketplaceIds" => marketplace_ids, "interval" => interval, "granularityTimeZone" => granularity_time_zone, @@ -68,10 +69,10 @@ "firstDayOfWeek" => first_day_of_week, "asin" => asin, "sku" => sku, }.compact - meter(rate_limit).get(path, params:) + meter(rate_limit, tries:).get(path, params:) end end end end