class PaypalPayoutsSdk::Payouts::PayoutsPostRequest

Creates a batch payout. In the JSON request body, pass a `sender_batch_header` and an `items` array. The `sender_batch_header` defines how to handle the payout. The `items` array defines the payout items.<br/>You can make payouts to one or more recipients.<blockquote><strong>Notes:</strong> <ul><li><p>PayPal does not process duplicate payouts. If you specify a sender_batch_id that was used in the last 30 days, the API rejects the request with an error message that shows the duplicate sender_batch_id and includes a HATEOAS link to the original payout with the same sender_batch_id.</p><p>If you receive an HTTP 5nn status code, you can safely retry the request with the same sender_batch_id.</p></li><li><p>The Payouts API does not support build notation (BN) codes. In a future Payouts release, you can optionally provide BN codes in the PayPal-Partner-Attribution-Id request header.</p><p>For information about the PayPal-Partner-Attribution-Id header, see <a href=“/docs/api/reference/api-requests/#http-request-headers”>HTTP request headers</a>. To learn about or request a BN code, contact your partner manager or see <a href=“PayPal”>www.paypal.com/us/webapps/mpp/partner-program“>PayPal Partner Program</a>.</p></li></ul></blockquote>

Attributes

body[RW]
headers[RW]
path[RW]
verb[RW]

Public Class Methods

new() click to toggle source
# File lib/payouts/payouts_post_request.rb, line 18
def initialize()
  @headers = {}
  @body = nil
  @verb = "POST"
  @path = "/v1/payments/payouts?"
  @headers["Content-Type"] = "application/json"
end

Public Instance Methods

pay_pal_partner_attribution_id(pay_pal_partner_attribution_id) click to toggle source
# File lib/payouts/payouts_post_request.rb, line 26
def pay_pal_partner_attribution_id(pay_pal_partner_attribution_id)
  @headers["PayPal-Partner-Attribution-Id"] = pay_pal_partner_attribution_id
end
pay_pal_request_id(pay_pal_request_id) click to toggle source
# File lib/payouts/payouts_post_request.rb, line 30
def pay_pal_request_id(pay_pal_request_id)
  @headers["PayPal-Request-Id"] = pay_pal_request_id
end
request_body(createPayoutRequest) click to toggle source
# File lib/payouts/payouts_post_request.rb, line 34
def request_body(createPayoutRequest)
  @body = createPayoutRequest
end