Class: PaypalPayoutsSdk::Payouts::PayoutsItemCancelRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/payouts/payouts_item_cancel_request.rb

Overview

Cancels an unclaimed payout item, by ID. If no one claims the unclaimed item within 30 days, the API automatically returns the funds to the sender. Use this call to cancel the unclaimed item before the automatic 30-day refund. You can cancel payout items with a transaction_status of UNCLAIMED.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payout_item_id) ⇒ PayoutsItemCancelRequest

Returns a new instance of PayoutsItemCancelRequest.



18
19
20
21
22
23
24
25
26
# File 'lib/payouts/payouts_item_cancel_request.rb', line 18

def initialize(payout_item_id)
  @headers = {}
  @body = nil
  @verb = "POST"
  @path = "/v1/payments/payouts-item/{payout_item_id}/cancel?"

  @path = @path.gsub("{payout_item_id}", CGI::escape(payout_item_id.to_s))
  @headers["Content-Type"] = "application/json"
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



16
17
18
# File 'lib/payouts/payouts_item_cancel_request.rb', line 16

def body
  @body
end

#headersObject

Returns the value of attribute headers.



16
17
18
# File 'lib/payouts/payouts_item_cancel_request.rb', line 16

def headers
  @headers
end

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/payouts/payouts_item_cancel_request.rb', line 16

def path
  @path
end

#verbObject

Returns the value of attribute verb.



16
17
18
# File 'lib/payouts/payouts_item_cancel_request.rb', line 16

def verb
  @verb
end