lib/peddler/apis/solicitations_v1.rb in peddler-4.0.1 vs lib/peddler/apis/solicitations_v1.rb in peddler-4.1.0
- old
+ new
@@ -28,18 +28,19 @@
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which you want a list
# of available solicitation types.
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
# order was placed. Only one marketplace can be specified.
# @param rate_limit [Float] Requests per second
+ # @param tries [Integer] Total request attempts, including retries
# @return [Peddler::Response] The API response
- def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0)
+ def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0, tries: 2)
path = "/solicitations/v1/orders/#{amazon_order_id}"
params = {
"marketplaceIds" => marketplace_ids,
}.compact
- meter(rate_limit).get(path, params:)
+ meter(rate_limit, tries:).get(path, params:)
end
# Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send
# only one productReviewAndSellerFeedback or free form proactive message per order.
#
@@ -47,17 +48,19 @@
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a solicitation is
# sent.
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
# order was placed. Only one marketplace can be specified.
# @param rate_limit [Float] Requests per second
+ # @param tries [Integer] Total request attempts, including retries
# @return [Peddler::Response] The API response
- def create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, rate_limit: 1.0)
+ def create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, rate_limit: 1.0,
+ tries: 2)
path = "/solicitations/v1/orders/#{amazon_order_id}/solicitations/productReviewAndSellerFeedback"
params = {
"marketplaceIds" => marketplace_ids,
}.compact
- meter(rate_limit).post(path, params:)
+ meter(rate_limit, tries:).post(path, params:)
end
end
end
end