Class: PayPal::AdaptivePayments::Request
- Inherits:
-
Common::Request
- Object
- Request
- Common::Request
- PayPal::AdaptivePayments::Request
- Defined in:
- lib/paypal/adaptive_payments/request.rb
Constant Summary collapse
- METHODS =
{ :cancel_preapproval => 'CancelPreapproval', :convert_currency => 'ConvertCurrency', :execute_payment => 'ExecutePayment', :funding_plans => 'GetFundingPlans', :get_payment_options => 'GetPaymentOptions', :shipping_addresses => 'GetShippingAddresses', :pay => 'Pay', :payment_details => 'PaymentDetails', :preapproval => 'Preapproval', :preapproval_details => 'PreapprovalDetails', :refund => 'Refund', :set_payment_options => 'SetPaymentOptions' }
- ACTION_TYPES =
{ :pay => 'PAY', :create => 'CREATE', :pay_primary => 'PAY_PRIMARY' }
- PAYMENT_TYPES =
{ :goods => 'GOODS', :service => 'SERVICE', :personal => 'PERSONAL', :cash_advance => 'CASHADVANCE', :digital_goods => 'DIGITALGOODS', :bank_managed_withdrawal => 'BANK_MANAGED_WITHDRAWAL' }
- FEE_PAYERS =
{ :sender => 'SENDER', :primary_receiver => 'PRIMARYRECEIVER', :each_receiver => 'EACHRECEIVER', :secondary_only => 'SECONDARYONLY' }
Constants inherited from Request
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
- #api ⇒ Object
-
#method_endpoint(method) ⇒ Object
Returns the actual api endpoint base on method.
Methods inherited from Common::Request
#build_action_type, #build_json, #default_headers, #prepare_json, #run
Methods inherited from Request
#api_methods, #default_headers, #normalize_params, #post, #prepare_headers, #prepare_params, #run
Instance Method Details
#api ⇒ Object
41 42 43 |
# File 'lib/paypal/adaptive_payments/request.rb', line 41 def api PayPal::AdaptivePayments::Api end |
#method_endpoint(method) ⇒ Object
Returns the actual api endpoint base on method
47 48 49 |
# File 'lib/paypal/adaptive_payments/request.rb', line 47 def method_endpoint(method) "#{api.api_endpoint}/#{METHODS.fetch(method, method.to_s)}" end |