class PayPal::SDK::REST::DataTypes::Capture
Public Class Methods
find(resource_id)
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 972 def find(resource_id) raise ArgumentError.new("id required") if resource_id.to_s.strip.empty? path = "v1/payments/capture/#{resource_id}" self.new(api.get(path)) end
load_members()
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 955 def self.load_members object_of :id, String object_of :amount, Amount object_of :is_final_capture, Boolean object_of :state, String object_of :reason_code, String object_of :parent_payment, String object_of :invoice_number, String object_of :transaction_fee, Currency object_of :create_time, String object_of :update_time, String array_of :links, Links end
Public Instance Methods
refund(refund)
click to toggle source
Deprecated - please use refund_request
# File lib/paypal-sdk/rest/data_types.rb, line 980 def refund(refund) refund = Refund.new(refund) unless refund.is_a? Refund path = "v1/payments/capture/#{self.id}/refund" response = api.post(path, refund.to_hash, http_header) Refund.new(response) end
refund_request(refund_request)
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 987 def refund_request(refund_request) refund_request = RefundRequest.new(refund_request) unless refund_request.is_a? RefundRequest path = "v1/payments/capture/#{self.id}/refund" response = api.post(path, refund_request.to_hash, http_header) DetailedRefund.new(response) end