# This class was generated on Tue, 10 Jul 2018 10:40:35 PDT by version 0.1.0-dev+0ee05a-dirty of Braintree SDK Generator
# captures_refund_request.py
# @version 0.1.0-dev+0ee05a-dirty
# @type request
# @data [encoded data, 4228 characters]
# DO NOT EDIT
import paypalhttp

try:
    from urllib import quote  # Python 2.X
except ImportError:
    from urllib.parse import quote  # Python 3+

class CapturesRefundRequest:
    """
    Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an <code>amount</code> object in the JSON request body.
    """
    def __init__(self, capture_id):
        self.verb = "POST"
        self.path = "/v2/payments/captures/{capture_id}/refund?".replace("{capture_id}", quote(str(capture_id)))
        self.headers = {}
        self.headers["Content-Type"] = "application/json"
        self.body = None

    def pay_pal_request_id(self, pay_pal_request_id):
        self.headers["PayPal-Request-Id"] = str(pay_pal_request_id)

    def prefer(self, prefer):
        self.headers["Prefer"] = str(prefer)



    def request_body(self, refund_request):
        self.body = refund_request
        return self
