Class: FatZebra::Paypal::Authorization
- Inherits:
-
APIResource
- Object
- FatZebraObject
- APIResource
- FatZebra::Paypal::Authorization
- Includes:
- APIOperation::Find, APIOperation::Search
- Defined in:
- lib/fat_zebra/paypal/authorization.rb
Constant Summary
Constants included from APIOperation::Search
APIOperation::Search::DEFAULT_PARAMS
Instance Attribute Summary
Attributes inherited from FatZebraObject
Attributes included from ObjectHelper
Class Method Summary collapse
- .base_path ⇒ Object
-
.capture(id, params = {}, options = {}) ⇒ FatZebra::Paypal::Capture
Capture a PayPal Authorization.
-
.void(id, options = {}) ⇒ FatZebra::Authorization
Void a PayPal Authorization.
Methods included from APIOperation::Search
Methods included from APIOperation::Find
Methods inherited from APIResource
Methods included from APIHelper
included, #request, #resource_name, #resource_path
Methods inherited from FatZebraObject
initialize_from, #load_response_api, #update_from
Methods included from Validation
#errors, #valid!, #valid?, #validates
Methods included from ObjectHelper
#[], #[]=, #add_accessor, #add_accessors, #add_data, #initialize, #inspect, #keys, #method_missing, #remove_accessor, #to_hash, #to_json, #update_attributes
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FatZebra::ObjectHelper
Class Method Details
.base_path ⇒ Object
20 21 22 |
# File 'lib/fat_zebra/paypal/authorization.rb', line 20 def base_path "#{super}/paypal/" end |
.capture(id, params = {}, options = {}) ⇒ FatZebra::Paypal::Capture
Capture a PayPal Authorization
32 33 34 35 |
# File 'lib/fat_zebra/paypal/authorization.rb', line 32 def capture(id, params = {}, = {}) response = request(:post, resource_path("authorizations/#{id}/capture"), params, ) FatZebra::Paypal::Capture.initialize_from(response) end |
.void(id, options = {}) ⇒ FatZebra::Authorization
Void a PayPal Authorization
44 45 46 47 |
# File 'lib/fat_zebra/paypal/authorization.rb', line 44 def void(id, = {}) response = request(:post, resource_path("authorizations/#{id}/void"), {}, ) initialize_from(response) end |