class PayPal::SDK::REST::DataTypes::Authorization
Public Class Methods
find(resource_id)
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 871 def find(resource_id) raise ArgumentError.new("id required") if resource_id.to_s.strip.empty? path = "v1/payments/authorization/#{resource_id}" self.new(api.get(path)) end
load_members()
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 850 def self.load_members object_of :id, String object_of :amount, Amount object_of :payment_mode, String object_of :state, String object_of :reason_code, String object_of :protection_eligibility, String object_of :protection_eligibility_type, String object_of :fmf_details, FmfDetails object_of :parent_payment, String object_of :valid_until, String object_of :create_time, String object_of :update_time, String object_of :reference_id, String object_of :receipt_id, String array_of :links, Links end
Public Instance Methods
capture(capture)
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 878 def capture(capture) capture = Capture.new(capture) unless capture.is_a? Capture path = "v1/payments/authorization/#{self.id}/capture" response = api.post(path, capture.to_hash, http_header) Capture.new(response) end
void()
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 885 def void() path = "v1/payments/authorization/#{self.id}/void" response = api.post(path, {}, http_header) self.merge!(response) success? end