Class: PayPal::AdaptivePayments::Api
- Inherits:
-
Object
- Object
- PayPal::AdaptivePayments::Api
- Defined in:
- lib/paypal/adaptive_payments/api.rb
Constant Summary collapse
- API_ENDPOINTS =
{ :sandbox => "https://svcs.sandbox.paypal.com/AdaptivePayments", :production => "https://svcs.paypal.com/AdaptivePayments" }
- DATA_FORMATS =
{ :nvp => 'NV', :xml => 'XML', :json => 'JSON' }
Class Method Summary collapse
- .api_endpoint ⇒ Object
- .app_id ⇒ Object
- .environment ⇒ Object
- .password ⇒ Object
- .request_data_format ⇒ Object
- .response_data_format ⇒ Object
- .signature ⇒ Object
- .username ⇒ Object
Class Method Details
.api_endpoint ⇒ Object
37 38 39 |
# File 'lib/paypal/adaptive_payments/api.rb', line 37 def api_endpoint API_ENDPOINTS[environment] end |
.app_id ⇒ Object
29 30 31 |
# File 'lib/paypal/adaptive_payments/api.rb', line 29 def app_id PayPal::Api.instance.app_id end |
.environment ⇒ Object
33 34 35 |
# File 'lib/paypal/adaptive_payments/api.rb', line 33 def environment PayPal::Api.environment end |
.password ⇒ Object
21 22 23 |
# File 'lib/paypal/adaptive_payments/api.rb', line 21 def password PayPal::Api.instance.password end |
.request_data_format ⇒ Object
41 42 43 |
# File 'lib/paypal/adaptive_payments/api.rb', line 41 def request_data_format DATA_FORMATS[:json] end |
.response_data_format ⇒ Object
45 46 47 |
# File 'lib/paypal/adaptive_payments/api.rb', line 45 def response_data_format DATA_FORMATS[:json] end |
.signature ⇒ Object
25 26 27 |
# File 'lib/paypal/adaptive_payments/api.rb', line 25 def signature PayPal::Api.instance.signature end |
.username ⇒ Object
17 18 19 |
# File 'lib/paypal/adaptive_payments/api.rb', line 17 def username PayPal::Api.instance.username end |