Class: Paypal::NVP::Request
Direct Known Subclasses
Constant Summary collapse
- ENDPOINT =
{ :production => 'https://api-3t.paypal.com/nvp', :sandbox => 'https://api-3t.sandbox.paypal.com/nvp' }
Instance Attribute Summary collapse
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
- #common_params ⇒ Object
-
#initialize(attributes = {}) ⇒ Request
constructor
A new instance of Request.
- #request(method, params = {}) ⇒ Object
Methods included from Util
#==, formatted_amount, #numeric_attribute?, to_numeric
Constructor Details
#initialize(attributes = {}) ⇒ Request
Returns a new instance of Request.
21 22 23 24 |
# File 'lib/paypal/nvp/request.rb', line 21 def initialize(attributes = {}) @version = API_VERSION super end |
Instance Attribute Details
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/paypal/nvp/request.rb', line 6 def version @version end |
Class Method Details
Instance Method Details
#common_params ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/paypal/nvp/request.rb', line 26 def common_params { :USER => self.username, :PWD => self.password, :SIGNATURE => self.signature, :SUBJECT => self.subject, :VERSION => self.version } end |
#request(method, params = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/paypal/nvp/request.rb', line 36 def request(method, params = {}) handle_response do post(method, params) end end |