paypal-sdk-adaptivepayments 1.105.0 → 1.110.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +19 -19
- data/README.md +141 -141
- data/lib/paypal-sdk/adaptive_payments.rb +17 -17
- data/lib/paypal-sdk/adaptive_payments/api.rb +27 -27
- data/lib/paypal-sdk/adaptive_payments/data_types.rb +1215 -1214
- data/lib/paypal-sdk/adaptive_payments/services.rb +343 -343
- data/lib/paypal-sdk/adaptive_payments/urls.rb +26 -26
- data/lib/paypal-sdk/adaptive_payments/version.rb +7 -7
- data/spec/adaptive_payments_examples_spec.rb +119 -119
- data/spec/config/paypal.yml +22 -22
- metadata +7 -11
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 953f75117723acba46d59a9694577b33f02e824a
|
4
|
+
data.tar.gz: 9c4f23fb4a5c4f567a8dfa15983465bd457b1b84
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 07f4139e864d78524fc5c31f8ad9dafec02657d586f8b786384635dd40eb6691fc6aa41cc1908f35058670ea0e6931f32a174e56b07a78e32cc9adc10596ec83
|
7
|
+
data.tar.gz: 2846c28ec7270a576d92d6498f24590e4d63ee8adfb2c446e2166bae00f8c21de69d83d25d26d9f27104ade0f17957469d5dd463e2f21493c79a1305ad5360a9
|
data/Gemfile
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'paypal-sdk-core', :git => "https://github.com/paypal/sdk-core-ruby.git"
|
6
|
-
|
7
|
-
if File.exist? File.expand_path('../samples/adaptive_payments_samples.gemspec', __FILE__)
|
8
|
-
gem 'adaptive_payments_samples', :path => 'samples', :require => false
|
9
|
-
group :test do
|
10
|
-
gem 'rspec-rails', :require => false
|
11
|
-
gem 'capybara', '~> 2.0.3', :require => false
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
group :test do
|
16
|
-
gem 'rspec'
|
17
|
-
end
|
18
|
-
|
19
|
-
gem 'nokogiri', '~> 1.5.9', :platform => :mri_18
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem 'paypal-sdk-core', :git => "https://github.com/paypal/sdk-core-ruby.git"
|
6
|
+
|
7
|
+
if File.exist? File.expand_path('../samples/adaptive_payments_samples.gemspec', __FILE__)
|
8
|
+
gem 'adaptive_payments_samples', :path => 'samples', :require => false
|
9
|
+
group :test do
|
10
|
+
gem 'rspec-rails', :require => false
|
11
|
+
gem 'capybara', '~> 2.0.3', :require => false
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
group :test do
|
16
|
+
gem 'rspec'
|
17
|
+
end
|
18
|
+
|
19
|
+
gem 'nokogiri', '~> 1.5.9', :platform => :mri_18
|
data/README.md
CHANGED
@@ -1,141 +1,141 @@
|
|
1
|
-
# Adaptive Payments SDK
|
2
|
-
|
3
|
-
The PayPal Adaptive Payments SDK provides Ruby APIs to create, process and manage simple and complex (parallel and chained) payments, and pre-approvals using the Adaptive Payments API.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'paypal-sdk-adaptivepayments'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
```sh
|
16
|
-
$ bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
```sh
|
22
|
-
$ gem install paypal-sdk-adaptivepayments
|
23
|
-
```
|
24
|
-
|
25
|
-
## Configuration
|
26
|
-
|
27
|
-
For Rails application:
|
28
|
-
|
29
|
-
```sh
|
30
|
-
rails g paypal:sdk:install
|
31
|
-
```
|
32
|
-
|
33
|
-
For other ruby application, create a configuration file(`config/paypal.yml`):
|
34
|
-
|
35
|
-
```yaml
|
36
|
-
development: &default
|
37
|
-
username: jb-us-seller_api1.paypal.com
|
38
|
-
password: WX4WTU3S8MY44S7F
|
39
|
-
signature: AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
|
40
|
-
app_id: APP-80W284485P519543T
|
41
|
-
http_timeout: 30
|
42
|
-
mode: sandbox
|
43
|
-
sandbox_email_address: Platform.sdk.seller@gmail.com
|
44
|
-
# # with certificate
|
45
|
-
# cert_path: "config/cert_key.pem"
|
46
|
-
# # with token authentication
|
47
|
-
# token: ESTy2hio5WJQo1iixkH29I53RJxaS0Gvno1A6.YQXZgktxbY4I2Tdg
|
48
|
-
# token_secret: ZKPhUYuwJwYsfWdzorozWO2U9pI
|
49
|
-
# # with Proxy
|
50
|
-
# http_proxy: http://proxy-ipaddress:3129/
|
51
|
-
# # with device ip address
|
52
|
-
# device_ipaddress: "127.0.0.1"
|
53
|
-
test:
|
54
|
-
<<: *default
|
55
|
-
production:
|
56
|
-
mode: live
|
57
|
-
username: USERNAME
|
58
|
-
password: PASSWORD
|
59
|
-
signature: SIGNATURE
|
60
|
-
app_id: APP_ID
|
61
|
-
```
|
62
|
-
|
63
|
-
Load Configurations from specified file:
|
64
|
-
|
65
|
-
```ruby
|
66
|
-
PayPal::SDK.load('config/paypal.yml', ENV['RACK_ENV'] || 'development')
|
67
|
-
```
|
68
|
-
|
69
|
-
Or without configuration file:
|
70
|
-
|
71
|
-
```ruby
|
72
|
-
PayPal::SDK.configure(
|
73
|
-
:mode => "sandbox", # Set "live" for production
|
74
|
-
:app_id => "APP-80W284485P519543T",
|
75
|
-
:username => "jb-us-seller_api1.paypal.com",
|
76
|
-
:password => "WX4WTU3S8MY44S7F",
|
77
|
-
:signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
|
78
|
-
```
|
79
|
-
|
80
|
-
## Example
|
81
|
-
|
82
|
-
```ruby
|
83
|
-
require 'paypal-sdk-adaptivepayments'
|
84
|
-
PayPal::SDK.configure(
|
85
|
-
:mode => "sandbox", # Set "live" for production
|
86
|
-
:app_id => "APP-80W284485P519543T",
|
87
|
-
:username => "jb-us-seller_api1.paypal.com",
|
88
|
-
:password => "WX4WTU3S8MY44S7F",
|
89
|
-
:signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
|
90
|
-
|
91
|
-
@api = PayPal::SDK::AdaptivePayments.new
|
92
|
-
|
93
|
-
# Build request object
|
94
|
-
@pay = @api.build_pay({
|
95
|
-
:actionType => "PAY",
|
96
|
-
:cancelUrl => "http://localhost:3000/samples/adaptive_payments/pay",
|
97
|
-
:currencyCode => "USD",
|
98
|
-
:feesPayer => "SENDER",
|
99
|
-
:ipnNotificationUrl => "http://localhost:3000/samples/adaptive_payments/ipn_notify",
|
100
|
-
:receiverList => {
|
101
|
-
:receiver => [{
|
102
|
-
:amount => 1.0,
|
103
|
-
:email => "platfo_1255612361_per@gmail.com" }] },
|
104
|
-
:returnUrl => "http://localhost:3000/samples/adaptive_payments/pay" })
|
105
|
-
|
106
|
-
# Make API call & get response
|
107
|
-
@response = @api.pay(@pay)
|
108
|
-
|
109
|
-
# Access response
|
110
|
-
if @response.success?
|
111
|
-
@response.payKey
|
112
|
-
@api.payment_url(@response) # Url to complete payment
|
113
|
-
else
|
114
|
-
@response.error[0].message
|
115
|
-
end
|
116
|
-
```
|
117
|
-
|
118
|
-
For more samples [https://paypal-sdk-samples.herokuapp.com/adaptive_payments/](https://paypal-sdk-samples.herokuapp.com/adaptive_payments/)
|
119
|
-
|
120
|
-
## Samples App
|
121
|
-
|
122
|
-
Add following line in rails `Gemfile`:
|
123
|
-
|
124
|
-
```ruby
|
125
|
-
gem 'paypal-sdk-adaptivepayments'
|
126
|
-
gem 'adaptive_payments_samples', :git => "https://github.com/paypal/adaptivepayments-sdk-ruby.git", :group => :development
|
127
|
-
```
|
128
|
-
|
129
|
-
Configure routes(`config/routes.rb`):
|
130
|
-
|
131
|
-
```ruby
|
132
|
-
mount AdaptivePaymentsSamples::Engine => "/samples" if Rails.env.development?
|
133
|
-
```
|
134
|
-
|
135
|
-
To get default paypal configuration execute:
|
136
|
-
|
137
|
-
```sh
|
138
|
-
rails g paypal:sdk:install
|
139
|
-
```
|
140
|
-
|
141
|
-
Run `rails server` and check the samples.
|
1
|
+
# Adaptive Payments SDK
|
2
|
+
|
3
|
+
The PayPal Adaptive Payments SDK provides Ruby APIs to create, process and manage simple and complex (parallel and chained) payments, and pre-approvals using the Adaptive Payments API.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'paypal-sdk-adaptivepayments'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
```sh
|
22
|
+
$ gem install paypal-sdk-adaptivepayments
|
23
|
+
```
|
24
|
+
|
25
|
+
## Configuration
|
26
|
+
|
27
|
+
For Rails application:
|
28
|
+
|
29
|
+
```sh
|
30
|
+
rails g paypal:sdk:install
|
31
|
+
```
|
32
|
+
|
33
|
+
For other ruby application, create a configuration file(`config/paypal.yml`):
|
34
|
+
|
35
|
+
```yaml
|
36
|
+
development: &default
|
37
|
+
username: jb-us-seller_api1.paypal.com
|
38
|
+
password: WX4WTU3S8MY44S7F
|
39
|
+
signature: AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
|
40
|
+
app_id: APP-80W284485P519543T
|
41
|
+
http_timeout: 30
|
42
|
+
mode: sandbox
|
43
|
+
sandbox_email_address: Platform.sdk.seller@gmail.com
|
44
|
+
# # with certificate
|
45
|
+
# cert_path: "config/cert_key.pem"
|
46
|
+
# # with token authentication
|
47
|
+
# token: ESTy2hio5WJQo1iixkH29I53RJxaS0Gvno1A6.YQXZgktxbY4I2Tdg
|
48
|
+
# token_secret: ZKPhUYuwJwYsfWdzorozWO2U9pI
|
49
|
+
# # with Proxy
|
50
|
+
# http_proxy: http://proxy-ipaddress:3129/
|
51
|
+
# # with device ip address
|
52
|
+
# device_ipaddress: "127.0.0.1"
|
53
|
+
test:
|
54
|
+
<<: *default
|
55
|
+
production:
|
56
|
+
mode: live
|
57
|
+
username: USERNAME
|
58
|
+
password: PASSWORD
|
59
|
+
signature: SIGNATURE
|
60
|
+
app_id: APP_ID
|
61
|
+
```
|
62
|
+
|
63
|
+
Load Configurations from specified file:
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
PayPal::SDK.load('config/paypal.yml', ENV['RACK_ENV'] || 'development')
|
67
|
+
```
|
68
|
+
|
69
|
+
Or without configuration file:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
PayPal::SDK.configure(
|
73
|
+
:mode => "sandbox", # Set "live" for production
|
74
|
+
:app_id => "APP-80W284485P519543T",
|
75
|
+
:username => "jb-us-seller_api1.paypal.com",
|
76
|
+
:password => "WX4WTU3S8MY44S7F",
|
77
|
+
:signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
|
78
|
+
```
|
79
|
+
|
80
|
+
## Example
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
require 'paypal-sdk-adaptivepayments'
|
84
|
+
PayPal::SDK.configure(
|
85
|
+
:mode => "sandbox", # Set "live" for production
|
86
|
+
:app_id => "APP-80W284485P519543T",
|
87
|
+
:username => "jb-us-seller_api1.paypal.com",
|
88
|
+
:password => "WX4WTU3S8MY44S7F",
|
89
|
+
:signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
|
90
|
+
|
91
|
+
@api = PayPal::SDK::AdaptivePayments.new
|
92
|
+
|
93
|
+
# Build request object
|
94
|
+
@pay = @api.build_pay({
|
95
|
+
:actionType => "PAY",
|
96
|
+
:cancelUrl => "http://localhost:3000/samples/adaptive_payments/pay",
|
97
|
+
:currencyCode => "USD",
|
98
|
+
:feesPayer => "SENDER",
|
99
|
+
:ipnNotificationUrl => "http://localhost:3000/samples/adaptive_payments/ipn_notify",
|
100
|
+
:receiverList => {
|
101
|
+
:receiver => [{
|
102
|
+
:amount => 1.0,
|
103
|
+
:email => "platfo_1255612361_per@gmail.com" }] },
|
104
|
+
:returnUrl => "http://localhost:3000/samples/adaptive_payments/pay" })
|
105
|
+
|
106
|
+
# Make API call & get response
|
107
|
+
@response = @api.pay(@pay)
|
108
|
+
|
109
|
+
# Access response
|
110
|
+
if @response.success?
|
111
|
+
@response.payKey
|
112
|
+
@api.payment_url(@response) # Url to complete payment
|
113
|
+
else
|
114
|
+
@response.error[0].message
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
For more samples [https://paypal-sdk-samples.herokuapp.com/adaptive_payments/](https://paypal-sdk-samples.herokuapp.com/adaptive_payments/)
|
119
|
+
|
120
|
+
## Samples App
|
121
|
+
|
122
|
+
Add following line in rails `Gemfile`:
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
gem 'paypal-sdk-adaptivepayments'
|
126
|
+
gem 'adaptive_payments_samples', :git => "https://github.com/paypal/adaptivepayments-sdk-ruby.git", :group => :development
|
127
|
+
```
|
128
|
+
|
129
|
+
Configure routes(`config/routes.rb`):
|
130
|
+
|
131
|
+
```ruby
|
132
|
+
mount AdaptivePaymentsSamples::Engine => "/samples" if Rails.env.development?
|
133
|
+
```
|
134
|
+
|
135
|
+
To get default paypal configuration execute:
|
136
|
+
|
137
|
+
```sh
|
138
|
+
rails g paypal:sdk:install
|
139
|
+
```
|
140
|
+
|
141
|
+
Run `rails server` and check the samples.
|
@@ -1,17 +1,17 @@
|
|
1
|
-
require 'paypal-sdk-core'
|
2
|
-
|
3
|
-
module PayPal
|
4
|
-
module SDK
|
5
|
-
module AdaptivePayments
|
6
|
-
autoload :VERSION, "paypal-sdk/adaptive_payments/version"
|
7
|
-
autoload :Services, "paypal-sdk/adaptive_payments/services"
|
8
|
-
autoload :DataTypes, "paypal-sdk/adaptive_payments/data_types"
|
9
|
-
autoload :Urls, "paypal-sdk/adaptive_payments/urls"
|
10
|
-
autoload :API, "paypal-sdk/adaptive_payments/api"
|
11
|
-
|
12
|
-
def self.new(*args)
|
13
|
-
API.new(*args)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
1
|
+
require 'paypal-sdk-core'
|
2
|
+
|
3
|
+
module PayPal
|
4
|
+
module SDK
|
5
|
+
module AdaptivePayments
|
6
|
+
autoload :VERSION, "paypal-sdk/adaptive_payments/version"
|
7
|
+
autoload :Services, "paypal-sdk/adaptive_payments/services"
|
8
|
+
autoload :DataTypes, "paypal-sdk/adaptive_payments/data_types"
|
9
|
+
autoload :Urls, "paypal-sdk/adaptive_payments/urls"
|
10
|
+
autoload :API, "paypal-sdk/adaptive_payments/api"
|
11
|
+
|
12
|
+
def self.new(*args)
|
13
|
+
API.new(*args)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,27 +1,27 @@
|
|
1
|
-
require 'paypal-sdk-core'
|
2
|
-
|
3
|
-
module PayPal
|
4
|
-
module SDK
|
5
|
-
module AdaptivePayments
|
6
|
-
class API < Core::API::Platform
|
7
|
-
include Services
|
8
|
-
include Urls
|
9
|
-
|
10
|
-
def initialize(environment = nil, options = {})
|
11
|
-
super(SERVICE_NAME, environment, options)
|
12
|
-
end
|
13
|
-
|
14
|
-
ADAPTIVE_PAYMENTS_HTTP_HEADER = { "X-PAYPAL-REQUEST-SOURCE" => "adaptivepayments-ruby-sdk-#{VERSION}" }
|
15
|
-
def default_http_header
|
16
|
-
super.merge(ADAPTIVE_PAYMENTS_HTTP_HEADER)
|
17
|
-
end
|
18
|
-
|
19
|
-
# Validate IPN message
|
20
|
-
def ipn_valid?(raw_post_data)
|
21
|
-
Core::API::IPN.valid?(raw_post_data, config)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
1
|
+
require 'paypal-sdk-core'
|
2
|
+
|
3
|
+
module PayPal
|
4
|
+
module SDK
|
5
|
+
module AdaptivePayments
|
6
|
+
class API < Core::API::Platform
|
7
|
+
include Services
|
8
|
+
include Urls
|
9
|
+
|
10
|
+
def initialize(environment = nil, options = {})
|
11
|
+
super(SERVICE_NAME, environment, options)
|
12
|
+
end
|
13
|
+
|
14
|
+
ADAPTIVE_PAYMENTS_HTTP_HEADER = { "X-PAYPAL-REQUEST-SOURCE" => "adaptivepayments-ruby-sdk-#{VERSION}" }
|
15
|
+
def default_http_header
|
16
|
+
super.merge(ADAPTIVE_PAYMENTS_HTTP_HEADER)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Validate IPN message
|
20
|
+
def ipn_valid?(raw_post_data)
|
21
|
+
Core::API::IPN.valid?(raw_post_data, config)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
@@ -1,1214 +1,1215 @@
|
|
1
|
-
# Stub objects for AdaptivePayments
|
2
|
-
# Auto generated code
|
3
|
-
|
4
|
-
require 'paypal-sdk-core'
|
5
|
-
|
6
|
-
module PayPal::SDK
|
7
|
-
module AdaptivePayments
|
8
|
-
module DataTypes
|
9
|
-
|
10
|
-
class DataType < Core::API::DataTypes::Base
|
11
|
-
def self.load_members
|
12
|
-
add_attribute :xmlns
|
13
|
-
add_attribute :type, :namespace => :xsi
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
module ResponseStatus
|
18
|
-
Status = { :success => ["Success", "SuccessWithWarning"],
|
19
|
-
:warning => ["Warning", "SuccessWithWarning", "FailureWithWarning"],
|
20
|
-
:failure => ["Failure", "FailureWithWarning"] }
|
21
|
-
|
22
|
-
def response_status
|
23
|
-
self.responseEnvelope && self.responseEnvelope.ack
|
24
|
-
end
|
25
|
-
|
26
|
-
Status.keys.each do |status|
|
27
|
-
define_method("#{status}?") do
|
28
|
-
Status[status].include?(self.response_status)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class EnumType < Core::API::DataTypes::Enum
|
34
|
-
end
|
35
|
-
|
36
|
-
class AccountIdentifier < DataType
|
37
|
-
def self.load_members
|
38
|
-
object_of :email, String
|
39
|
-
object_of :phone, PhoneNumberType
|
40
|
-
object_of :accountId, String
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
class BaseAddress < DataType
|
47
|
-
def self.load_members
|
48
|
-
object_of :line1, String, :required => true
|
49
|
-
object_of :line2, String
|
50
|
-
object_of :city, String, :required => true
|
51
|
-
object_of :state, String
|
52
|
-
object_of :postalCode, String
|
53
|
-
object_of :countryCode, String, :required => true
|
54
|
-
object_of :type, String
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
# Details about the end user of the application invoking this service.
|
61
|
-
class ClientDetailsType < DataType
|
62
|
-
def self.load_members
|
63
|
-
object_of :ipAddress, String
|
64
|
-
object_of :deviceId, String
|
65
|
-
object_of :applicationId, String
|
66
|
-
object_of :model, String
|
67
|
-
object_of :geoLocation, String
|
68
|
-
object_of :customerType, String
|
69
|
-
object_of :partnerName, String
|
70
|
-
object_of :customerId, String
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
class CurrencyType < DataType
|
77
|
-
def self.load_members
|
78
|
-
object_of :code, String, :required => true
|
79
|
-
object_of :amount, Float, :required => true
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
# This type contains the detailed error information resulting from the service operation.
|
86
|
-
class ErrorData < DataType
|
87
|
-
def self.load_members
|
88
|
-
object_of :errorId, Integer
|
89
|
-
object_of :domain, String
|
90
|
-
object_of :subdomain, String
|
91
|
-
object_of :severity, ErrorSeverity
|
92
|
-
object_of :category, ErrorCategory
|
93
|
-
object_of :message, String
|
94
|
-
object_of :exceptionId, String
|
95
|
-
array_of :parameter, ErrorParameter
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
class ErrorParameter < DataType
|
102
|
-
def self.load_members
|
103
|
-
add_attribute :name, :required => true
|
104
|
-
object_of :value, String, :required => true
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
# This specifies a fault, encapsulating error data, with specific error codes.
|
111
|
-
class FaultMessage < DataType
|
112
|
-
def self.load_members
|
113
|
-
include ResponseStatus
|
114
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
115
|
-
array_of :error, ErrorData
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
class PhoneNumberType < DataType
|
122
|
-
def self.load_members
|
123
|
-
object_of :countryCode, String, :required => true
|
124
|
-
object_of :phoneNumber, String, :required => true
|
125
|
-
object_of :extension, String
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
# This specifies the list of parameters with every request to the service.
|
132
|
-
class RequestEnvelope < DataType
|
133
|
-
def self.load_members
|
134
|
-
# This specifies the required detail level that is needed by a client application pertaining to a particular data component (e.g., Item, Transaction, etc.). The detail level is specified in the DetailLevelCodeType which has all the enumerated values of the detail level for each component.
|
135
|
-
object_of :detailLevel, DetailLevelCode
|
136
|
-
# This should be the standard RFC 3066 language identification tag, e.g., en_US.
|
137
|
-
object_of :errorLanguage, String, :required => true
|
138
|
-
end
|
139
|
-
end
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
# This specifies a list of parameters with every response from a service.
|
144
|
-
class ResponseEnvelope < DataType
|
145
|
-
def self.load_members
|
146
|
-
object_of :timestamp, DateTime, :required => true
|
147
|
-
# Application level acknowledgment code.
|
148
|
-
object_of :ack, AckCode, :required => true
|
149
|
-
object_of :correlationId, String, :required => true
|
150
|
-
object_of :build, String, :required => true
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
# AckCodeType This code identifies the acknowledgment code types that could be used to communicate the status of processing a (request) message to an application. This code would be used as part of a response message that contains an application level acknowledgment element.
|
157
|
-
class AckCode < EnumType
|
158
|
-
self.options = { 'SUCCESS' => 'Success', 'FAILURE' => 'Failure', 'WARNING' => 'Warning', 'SUCCESSWITHWARNING' => 'SuccessWithWarning', 'FAILUREWITHWARNING' => 'FailureWithWarning' }
|
159
|
-
end
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
class DayOfWeek < EnumType
|
164
|
-
self.options = { 'NODAYSPECIFIED' => 'NO_DAY_SPECIFIED', 'SUNDAY' => 'SUNDAY', 'MONDAY' => 'MONDAY', 'TUESDAY' => 'TUESDAY', 'WEDNESDAY' => 'WEDNESDAY', 'THURSDAY' => 'THURSDAY', 'FRIDAY' => 'FRIDAY', 'SATURDAY' => 'SATURDAY' }
|
165
|
-
end
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
# DetailLevelCodeType
|
170
|
-
class DetailLevelCode < EnumType
|
171
|
-
self.options = { 'RETURNALL' => 'ReturnAll' }
|
172
|
-
end
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
class ErrorCategory < EnumType
|
177
|
-
self.options = { 'SYSTEM' => 'System', 'APPLICATION' => 'Application', 'REQUEST' => 'Request' }
|
178
|
-
end
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
class ErrorSeverity < EnumType
|
183
|
-
self.options = { 'ERROR' => 'Error', 'WARNING' => 'Warning' }
|
184
|
-
end
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
class Status < EnumType
|
189
|
-
self.options = { 'RTR' => 'RTR', 'NONRTR' => 'NON_RTR', 'MISSINGRECEIVERCOUNTRYINFORMATION' => 'MISSING_RECEIVER_COUNTRY_INFORMATION' }
|
190
|
-
end
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
class AgreementType < EnumType
|
195
|
-
self.options = { 'OFFLINE' => 'OFFLINE', 'ONLINE' => 'ONLINE' }
|
196
|
-
end
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
class PhoneType < EnumType
|
201
|
-
self.options = { 'NONE' => 'NONE', 'HOME' => 'HOME', 'WORK' => 'WORK', 'BUSINESS' => 'BUSINESS', 'MOBILE' => 'MOBILE', 'FAXHOME' => 'FAX_HOME', 'FAXBUSINESS' => 'FAX_BUSINESS' }
|
202
|
-
end
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
class Address < DataType
|
207
|
-
def self.load_members
|
208
|
-
object_of :addresseeName, String
|
209
|
-
object_of :baseAddress, BaseAddress, :required => true
|
210
|
-
object_of :addressId, String
|
211
|
-
end
|
212
|
-
end
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
class AddressList < DataType
|
217
|
-
def self.load_members
|
218
|
-
array_of :address, Address, :required => true
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
# A list of ISO currency codes.
|
225
|
-
class CurrencyCodeList < DataType
|
226
|
-
def self.load_members
|
227
|
-
array_of :currencyCode, String, :required => true
|
228
|
-
end
|
229
|
-
end
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
# A list of estimated currency conversions for a base currency.
|
234
|
-
class CurrencyConversionList < DataType
|
235
|
-
def self.load_members
|
236
|
-
object_of :baseAmount, CurrencyType, :required => true
|
237
|
-
object_of :currencyList, CurrencyList, :required => true
|
238
|
-
end
|
239
|
-
end
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
# A table that contains a list of estimated currency conversions for a base currency in each row.
|
244
|
-
class CurrencyConversionTable < DataType
|
245
|
-
def self.load_members
|
246
|
-
array_of :currencyConversionList, CurrencyConversionList, :required => true
|
247
|
-
end
|
248
|
-
end
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
# A list of ISO currencies.
|
253
|
-
class CurrencyList < DataType
|
254
|
-
def self.load_members
|
255
|
-
array_of :currency, CurrencyType, :required => true
|
256
|
-
end
|
257
|
-
end
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
# Customizable options that a client application can specify for display purposes.
|
262
|
-
class DisplayOptions < DataType
|
263
|
-
def self.load_members
|
264
|
-
object_of :emailHeaderImageUrl, String
|
265
|
-
object_of :emailMarketingImageUrl, String
|
266
|
-
object_of :headerImageUrl, String
|
267
|
-
object_of :businessName, String
|
268
|
-
end
|
269
|
-
end
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
class ErrorList < DataType
|
274
|
-
def self.load_members
|
275
|
-
array_of :error, ErrorData, :required => true
|
276
|
-
end
|
277
|
-
end
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
class FundingConstraint < DataType
|
282
|
-
def self.load_members
|
283
|
-
object_of :allowedFundingType, FundingTypeList
|
284
|
-
end
|
285
|
-
end
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
# FundingTypeInfo represents one allowed funding type.
|
290
|
-
class FundingTypeInfo < DataType
|
291
|
-
def self.load_members
|
292
|
-
object_of :fundingType, String, :required => true
|
293
|
-
end
|
294
|
-
end
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
# ShippingAddressInfo.
|
299
|
-
class ShippingAddressInfo < DataType
|
300
|
-
def self.load_members
|
301
|
-
object_of :addresseeName, String
|
302
|
-
object_of :street1, String
|
303
|
-
object_of :street2, String
|
304
|
-
object_of :city, String
|
305
|
-
object_of :state, String
|
306
|
-
object_of :zip, String
|
307
|
-
object_of :country, String
|
308
|
-
array_of :phone, PhoneNumber
|
309
|
-
end
|
310
|
-
end
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
class FundingTypeList < DataType
|
315
|
-
def self.load_members
|
316
|
-
array_of :fundingTypeInfo, FundingTypeInfo, :required => true
|
317
|
-
end
|
318
|
-
end
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
# Describes the conversion between 2 currencies.
|
323
|
-
class CurrencyConversion < DataType
|
324
|
-
def self.load_members
|
325
|
-
object_of :from, CurrencyType, :required => true
|
326
|
-
object_of :to, CurrencyType, :required => true
|
327
|
-
object_of :exchangeRate, Float, :required => true
|
328
|
-
end
|
329
|
-
end
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
# Funding source information.
|
334
|
-
class FundingSource < DataType
|
335
|
-
def self.load_members
|
336
|
-
object_of :lastFourOfAccountNumber, String
|
337
|
-
object_of :type, String, :required => true
|
338
|
-
object_of :displayName, String
|
339
|
-
object_of :fundingSourceId, String
|
340
|
-
object_of :allowed, Boolean
|
341
|
-
end
|
342
|
-
end
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
# Amount to be charged to a particular funding source.
|
347
|
-
class FundingPlanCharge < DataType
|
348
|
-
def self.load_members
|
349
|
-
object_of :charge, CurrencyType, :required => true
|
350
|
-
object_of :fundingSource, FundingSource, :required => true
|
351
|
-
end
|
352
|
-
end
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
# FundingPlan describes the funding sources to be used for a specific payment.
|
357
|
-
class FundingPlan < DataType
|
358
|
-
def self.load_members
|
359
|
-
object_of :fundingPlanId, String, :required => true
|
360
|
-
object_of :fundingAmount, CurrencyType, :required => true
|
361
|
-
object_of :backupFundingSource, FundingSource
|
362
|
-
object_of :senderFees, CurrencyType
|
363
|
-
object_of :currencyConversion, CurrencyConversion
|
364
|
-
array_of :charge, FundingPlanCharge, :required => true
|
365
|
-
end
|
366
|
-
end
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
# Details about the party that initiated this payment. The API user is making this payment on behalf of the initiator. The initiator can simply be an institution or a customer of the institution.
|
371
|
-
class InitiatingEntity < DataType
|
372
|
-
def self.load_members
|
373
|
-
object_of :institutionCustomer, InstitutionCustomer
|
374
|
-
end
|
375
|
-
end
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
# The customer of the initiating institution
|
380
|
-
class InstitutionCustomer < DataType
|
381
|
-
def self.load_members
|
382
|
-
# The unique identifier as assigned to the institution.
|
383
|
-
object_of :institutionId, String, :required => true
|
384
|
-
# The first (given) name of the end consumer as known by the institution.
|
385
|
-
object_of :firstName, String, :required => true
|
386
|
-
# The last (family) name of the end consumer as known by the institution.
|
387
|
-
object_of :lastName, String, :required => true
|
388
|
-
object_of :middleName, String
|
389
|
-
# The full name of the end consumer as known by the institution.
|
390
|
-
object_of :displayName, String, :required => true
|
391
|
-
# The unique identifier as assigned to the end consumer by the institution.
|
392
|
-
object_of :institutionCustomerId, String, :required => true
|
393
|
-
# The two-character ISO country code of the home country of the end consumer
|
394
|
-
object_of :countryCode, String, :required => true
|
395
|
-
object_of :email, String
|
396
|
-
object_of :dateOfBirth, Date
|
397
|
-
object_of :address, BaseAddress
|
398
|
-
end
|
399
|
-
end
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
# Describes an individual item for an invoice.
|
404
|
-
class InvoiceItem < DataType
|
405
|
-
def self.load_members
|
406
|
-
object_of :name, String
|
407
|
-
object_of :identifier, String
|
408
|
-
object_of :price, Float
|
409
|
-
object_of :itemPrice, Float
|
410
|
-
object_of :itemCount, Integer
|
411
|
-
end
|
412
|
-
end
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
# Describes a payment for a particular receiver (merchant), contains list of additional per item details.
|
417
|
-
class InvoiceData < DataType
|
418
|
-
def self.load_members
|
419
|
-
array_of :item, InvoiceItem
|
420
|
-
object_of :totalTax, Float
|
421
|
-
object_of :totalShipping, Float
|
422
|
-
end
|
423
|
-
end
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
# The error that resulted from an attempt to make a payment to a receiver.
|
428
|
-
class PayError < DataType
|
429
|
-
def self.load_members
|
430
|
-
object_of :receiver, Receiver, :required => true
|
431
|
-
object_of :error, ErrorData, :required => true
|
432
|
-
end
|
433
|
-
end
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
class PayErrorList < DataType
|
438
|
-
def self.load_members
|
439
|
-
array_of :payError, PayError, :required => true
|
440
|
-
end
|
441
|
-
end
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
# PaymentInfo represents the payment attempt made to a Receiver of a PayRequest. If the execution of the payment has not yet completed, there will not be any transaction details.
|
446
|
-
class PaymentInfo < DataType
|
447
|
-
def self.load_members
|
448
|
-
object_of :transactionId, String
|
449
|
-
object_of :transactionStatus, String
|
450
|
-
object_of :receiver, Receiver, :required => true
|
451
|
-
object_of :refundedAmount, Float
|
452
|
-
object_of :pendingRefund, Boolean
|
453
|
-
object_of :senderTransactionId, String
|
454
|
-
object_of :senderTransactionStatus, String
|
455
|
-
object_of :pendingReason, String
|
456
|
-
end
|
457
|
-
end
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
class PaymentInfoList < DataType
|
462
|
-
def self.load_members
|
463
|
-
array_of :paymentInfo, PaymentInfo, :required => true
|
464
|
-
end
|
465
|
-
end
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
# Receiver is the party where funds are transferred to. A primary receiver receives a payment directly from the sender in a chained split payment. A primary receiver should not be specified when making a single or parallel split payment.
|
470
|
-
class Receiver < DataType
|
471
|
-
def self.load_members
|
472
|
-
object_of :amount, Float, :required => true
|
473
|
-
object_of :email, String
|
474
|
-
object_of :phone, PhoneNumberType
|
475
|
-
object_of :primary, Boolean
|
476
|
-
object_of :invoiceId, String
|
477
|
-
object_of :paymentType, String
|
478
|
-
object_of :paymentSubType, String
|
479
|
-
object_of :accountId, String
|
480
|
-
end
|
481
|
-
end
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
class ReceiverList < DataType
|
486
|
-
def self.load_members
|
487
|
-
array_of :receiver, Receiver, :required => true
|
488
|
-
end
|
489
|
-
end
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
# The sender identifier type contains information to identify a PayPal account.
|
494
|
-
class ReceiverIdentifier < AccountIdentifier
|
495
|
-
def self.load_members
|
496
|
-
end
|
497
|
-
end
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
# Options that apply to the receiver of a payment, allows setting additional details for payment using invoice.
|
502
|
-
class ReceiverOptions < DataType
|
503
|
-
def self.load_members
|
504
|
-
object_of :description, String
|
505
|
-
object_of :customId, String
|
506
|
-
object_of :invoiceData, InvoiceData
|
507
|
-
object_of :receiver, ReceiverIdentifier, :required => true
|
508
|
-
object_of :referrerCode, String
|
509
|
-
end
|
510
|
-
end
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
# RefundInfo represents the refund attempt made to a Receiver of a PayRequest.
|
515
|
-
class RefundInfo < DataType
|
516
|
-
def self.load_members
|
517
|
-
object_of :receiver, Receiver, :required => true
|
518
|
-
object_of :refundStatus, String
|
519
|
-
object_of :refundNetAmount, Float
|
520
|
-
object_of :refundFeeAmount, Float
|
521
|
-
object_of :refundGrossAmount, Float
|
522
|
-
object_of :totalOfAllRefunds, Float
|
523
|
-
object_of :refundHasBecomeFull, Boolean
|
524
|
-
object_of :encryptedRefundTransactionId, String
|
525
|
-
object_of :refundTransactionStatus, String
|
526
|
-
object_of :errorList, ErrorList
|
527
|
-
end
|
528
|
-
end
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
class RefundInfoList < DataType
|
533
|
-
def self.load_members
|
534
|
-
array_of :refundInfo, RefundInfo, :required => true
|
535
|
-
end
|
536
|
-
end
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
# Options that apply to the sender of a payment.
|
541
|
-
class SenderOptions < DataType
|
542
|
-
def self.load_members
|
543
|
-
# Require the user to select a shipping address during the web flow.
|
544
|
-
object_of :requireShippingAddressSelection, Boolean
|
545
|
-
# Determines whether or not the UI pages should display the shipping address set by user in this SetPaymentOptions request.
|
546
|
-
object_of :addressOverride, Boolean
|
547
|
-
object_of :referrerCode, String
|
548
|
-
object_of :shippingAddress, ShippingAddressInfo
|
549
|
-
end
|
550
|
-
end
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
# Details about the payer's tax info passed in by the merchant or partner.
|
555
|
-
class TaxIdDetails < DataType
|
556
|
-
def self.load_members
|
557
|
-
# Tax id of the merchant/business.
|
558
|
-
object_of :taxId, String
|
559
|
-
# Tax type of the Tax Id.
|
560
|
-
object_of :taxIdType, String
|
561
|
-
end
|
562
|
-
end
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
# The sender identifier type contains information to identify a PayPal account.
|
567
|
-
class SenderIdentifier < AccountIdentifier
|
568
|
-
def self.load_members
|
569
|
-
object_of :useCredentials, Boolean
|
570
|
-
object_of :taxIdDetails, TaxIdDetails
|
571
|
-
end
|
572
|
-
end
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
class UserLimit < DataType
|
577
|
-
def self.load_members
|
578
|
-
object_of :limitType, String, :required => true
|
579
|
-
object_of :limitAmount, CurrencyType, :required => true
|
580
|
-
end
|
581
|
-
end
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
# This type contains the detailed warning information resulting from the service operation.
|
586
|
-
class WarningData < DataType
|
587
|
-
def self.load_members
|
588
|
-
object_of :warningId, Integer
|
589
|
-
object_of :message, String
|
590
|
-
end
|
591
|
-
end
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
class WarningDataList < DataType
|
596
|
-
def self.load_members
|
597
|
-
array_of :warningData, WarningData, :required => true
|
598
|
-
end
|
599
|
-
end
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
# The request to cancel a Preapproval.
|
604
|
-
class CancelPreapprovalRequest < DataType
|
605
|
-
def self.load_members
|
606
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
607
|
-
object_of :preapprovalKey, String, :required => true
|
608
|
-
end
|
609
|
-
end
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
# The result of the CancelPreapprovalRequest.
|
614
|
-
class CancelPreapprovalResponse < DataType
|
615
|
-
def self.load_members
|
616
|
-
include ResponseStatus
|
617
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
618
|
-
array_of :error, ErrorData
|
619
|
-
end
|
620
|
-
end
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
# The request to confirm a Preapproval.
|
625
|
-
class ConfirmPreapprovalRequest < DataType
|
626
|
-
def self.load_members
|
627
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
628
|
-
object_of :preapprovalKey, String, :required => true
|
629
|
-
object_of :fundingSourceId, String
|
630
|
-
object_of :pin, String
|
631
|
-
object_of :agreementType, AgreementType
|
632
|
-
end
|
633
|
-
end
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
# The result of the ConfirmPreapprovalRequest.
|
638
|
-
class ConfirmPreapprovalResponse < DataType
|
639
|
-
def self.load_members
|
640
|
-
include ResponseStatus
|
641
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
642
|
-
array_of :error, ErrorData
|
643
|
-
end
|
644
|
-
end
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
# A request to convert one or more currencies into their estimated values in other currencies.
|
649
|
-
class ConvertCurrencyRequest < DataType
|
650
|
-
def self.load_members
|
651
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
652
|
-
object_of :baseAmountList, CurrencyList, :required => true
|
653
|
-
object_of :convertToCurrencyList, CurrencyCodeList, :required => true
|
654
|
-
# The two-character ISO country code where fx suppposed to happen
|
655
|
-
object_of :countryCode, String
|
656
|
-
object_of :conversionType, String
|
657
|
-
end
|
658
|
-
end
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
# A response that contains a table of estimated converted currencies based on the Convert Currency Request.
|
663
|
-
class ConvertCurrencyResponse < DataType
|
664
|
-
def self.load_members
|
665
|
-
include ResponseStatus
|
666
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
667
|
-
object_of :estimatedAmountTable, CurrencyConversionTable, :required => true
|
668
|
-
array_of :error, ErrorData
|
669
|
-
end
|
670
|
-
end
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
# The request to execute the payment request.
|
675
|
-
class ExecutePaymentRequest < DataType
|
676
|
-
def self.load_members
|
677
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
678
|
-
object_of :payKey, String, :required => true
|
679
|
-
# Describes the action that is performed by this API
|
680
|
-
object_of :actionType, String
|
681
|
-
object_of :fundingPlanId, String
|
682
|
-
end
|
683
|
-
end
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
# Contains information related to Post Payment Disclosure Details This contains 1.Receivers information 2.Funds Avalibility Date
|
688
|
-
class PostPaymentDisclosure < DataType
|
689
|
-
def self.load_members
|
690
|
-
object_of :accountIdentifier, AccountIdentifier, :required => true
|
691
|
-
object_of :fundsAvailabilityDate, Date
|
692
|
-
object_of :fundsAvailabilityDateDisclaimerText, String
|
693
|
-
end
|
694
|
-
end
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
class PostPaymentDisclosureList < DataType
|
699
|
-
def self.load_members
|
700
|
-
array_of :postPaymentDisclosure, PostPaymentDisclosure, :required => true
|
701
|
-
end
|
702
|
-
end
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
# The result of a payment execution.
|
707
|
-
class ExecutePaymentResponse < DataType
|
708
|
-
def self.load_members
|
709
|
-
include ResponseStatus
|
710
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
711
|
-
object_of :paymentExecStatus, String, :required => true
|
712
|
-
object_of :payErrorList, PayErrorList
|
713
|
-
object_of :postPaymentDisclosureList, PostPaymentDisclosureList
|
714
|
-
array_of :error, ErrorData
|
715
|
-
end
|
716
|
-
end
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
# The request to get the allowed funding sources available for a preapproval.
|
721
|
-
class GetAllowedFundingSourcesRequest < DataType
|
722
|
-
def self.load_members
|
723
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
724
|
-
object_of :key, String, :required => true
|
725
|
-
end
|
726
|
-
end
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
# The response to get the backup funding sources available for a preapproval.
|
731
|
-
class GetAllowedFundingSourcesResponse < DataType
|
732
|
-
def self.load_members
|
733
|
-
include ResponseStatus
|
734
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
735
|
-
array_of :fundingSource, FundingSource
|
736
|
-
array_of :error, ErrorData
|
737
|
-
end
|
738
|
-
end
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
# The request to get the options of a payment request.
|
743
|
-
class GetPaymentOptionsRequest < DataType
|
744
|
-
def self.load_members
|
745
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
746
|
-
object_of :payKey, String, :required => true
|
747
|
-
end
|
748
|
-
end
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
# The response message for the GetPaymentOption request
|
753
|
-
class GetPaymentOptionsResponse < DataType
|
754
|
-
def self.load_members
|
755
|
-
include ResponseStatus
|
756
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
757
|
-
object_of :initiatingEntity, InitiatingEntity
|
758
|
-
object_of :displayOptions, DisplayOptions
|
759
|
-
object_of :shippingAddressId, String
|
760
|
-
object_of :senderOptions, SenderOptions
|
761
|
-
array_of :receiverOptions, ReceiverOptions
|
762
|
-
array_of :error, ErrorData
|
763
|
-
end
|
764
|
-
end
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
# The request to look up the details of a PayRequest. The PaymentDetailsRequest can be made with either a payKey, trackingId, or a transactionId of the PayRequest.
|
769
|
-
class PaymentDetailsRequest < DataType
|
770
|
-
def self.load_members
|
771
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
772
|
-
object_of :payKey, String
|
773
|
-
object_of :transactionId, String
|
774
|
-
object_of :trackingId, String
|
775
|
-
end
|
776
|
-
end
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
# The details of the PayRequest as specified in the Pay operation.
|
781
|
-
class PaymentDetailsResponse < DataType
|
782
|
-
def self.load_members
|
783
|
-
include ResponseStatus
|
784
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
785
|
-
object_of :cancelUrl, String, :required => true
|
786
|
-
object_of :currencyCode, String, :required => true
|
787
|
-
object_of :ipnNotificationUrl, String
|
788
|
-
object_of :memo, String
|
789
|
-
object_of :paymentInfoList, PaymentInfoList, :required => true
|
790
|
-
object_of :returnUrl, String, :required => true
|
791
|
-
object_of :senderEmail, String
|
792
|
-
object_of :status, String, :required => true
|
793
|
-
object_of :trackingId, String
|
794
|
-
object_of :payKey, String, :required => true
|
795
|
-
object_of :actionType, String, :required => true
|
796
|
-
object_of :feesPayer, String, :required => true
|
797
|
-
object_of :reverseAllParallelPaymentsOnError, Boolean
|
798
|
-
object_of :preapprovalKey, String
|
799
|
-
object_of :fundingConstraint, FundingConstraint
|
800
|
-
object_of :sender, SenderIdentifier
|
801
|
-
object_of :shippingAddress, ShippingAddressInfo
|
802
|
-
object_of :payKeyExpirationDate, DateTime
|
803
|
-
array_of :error, ErrorData
|
804
|
-
end
|
805
|
-
end
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
# The PayRequest contains the payment instructions to make from sender to receivers.
|
810
|
-
class PayRequest < DataType
|
811
|
-
def self.load_members
|
812
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
813
|
-
object_of :clientDetails, ClientDetailsType
|
814
|
-
object_of :actionType, String, :required => true
|
815
|
-
object_of :cancelUrl, String, :required => true
|
816
|
-
object_of :currencyCode, String, :required => true
|
817
|
-
object_of :feesPayer, String
|
818
|
-
object_of :ipnNotificationUrl, String
|
819
|
-
object_of :memo, String
|
820
|
-
object_of :pin, String
|
821
|
-
object_of :preapprovalKey, String
|
822
|
-
object_of :receiverList, ReceiverList, :required => true
|
823
|
-
object_of :reverseAllParallelPaymentsOnError, Boolean
|
824
|
-
object_of :senderEmail, String
|
825
|
-
object_of :returnUrl, String, :required => true
|
826
|
-
object_of :trackingId, String
|
827
|
-
object_of :fundingConstraint, FundingConstraint
|
828
|
-
object_of :sender, SenderIdentifier
|
829
|
-
# The pay key expires after the duration specified in this column. If not provided, it defaults to normal expiration behavior. Valid values are 5 minutes to 30 days.
|
830
|
-
object_of :payKeyDuration, String
|
831
|
-
end
|
832
|
-
end
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
# The PayResponse contains the result of the Pay operation. The payKey and execution status of the request should always be provided.
|
837
|
-
class PayResponse < DataType
|
838
|
-
def self.load_members
|
839
|
-
include ResponseStatus
|
840
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
841
|
-
object_of :payKey, String, :required => true
|
842
|
-
object_of :paymentExecStatus, String, :required => true
|
843
|
-
object_of :payErrorList, PayErrorList
|
844
|
-
object_of :paymentInfoList, PaymentInfoList, :required => true
|
845
|
-
object_of :sender, SenderIdentifier
|
846
|
-
object_of :defaultFundingPlan, FundingPlan
|
847
|
-
object_of :warningDataList, WarningDataList
|
848
|
-
array_of :error, ErrorData
|
849
|
-
end
|
850
|
-
end
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
# The request to look up the details of a Preapproval.
|
855
|
-
class PreapprovalDetailsRequest < DataType
|
856
|
-
def self.load_members
|
857
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
858
|
-
object_of :preapprovalKey, String, :required => true
|
859
|
-
object_of :getBillingAddress, Boolean
|
860
|
-
end
|
861
|
-
end
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
# The details of the Preapproval as specified in the Preapproval operation.
|
866
|
-
class PreapprovalDetailsResponse < DataType
|
867
|
-
def self.load_members
|
868
|
-
include ResponseStatus
|
869
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
870
|
-
object_of :approved, Boolean, :required => true
|
871
|
-
object_of :cancelUrl, String, :required => true
|
872
|
-
object_of :curPayments, Integer, :required => true
|
873
|
-
object_of :curPaymentsAmount, Float, :required => true
|
874
|
-
object_of :curPeriodAttempts, Integer
|
875
|
-
object_of :curPeriodEndingDate, DateTime
|
876
|
-
object_of :currencyCode, String, :required => true
|
877
|
-
object_of :dateOfMonth, Integer
|
878
|
-
object_of :dayOfWeek, DayOfWeek
|
879
|
-
object_of :endingDate, DateTime
|
880
|
-
object_of :maxAmountPerPayment, Float
|
881
|
-
object_of :maxNumberOfPayments, Integer
|
882
|
-
object_of :maxNumberOfPaymentsPerPeriod, Integer
|
883
|
-
object_of :maxTotalAmountOfAllPayments, Float
|
884
|
-
object_of :paymentPeriod, String
|
885
|
-
object_of :pinType, String
|
886
|
-
object_of :returnUrl, String, :required => true
|
887
|
-
object_of :senderEmail, String
|
888
|
-
object_of :memo, String
|
889
|
-
object_of :startingDate, DateTime, :required => true
|
890
|
-
object_of :status, String, :required => true
|
891
|
-
object_of :ipnNotificationUrl, String
|
892
|
-
object_of :addressList, AddressList
|
893
|
-
object_of :feesPayer, String
|
894
|
-
object_of :displayMaxTotalAmount, Boolean
|
895
|
-
object_of :sender, SenderIdentifier
|
896
|
-
object_of :agreementType, AgreementType
|
897
|
-
array_of :error, ErrorData
|
898
|
-
end
|
899
|
-
end
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
# A request to create a Preapproval. A Preapproval is an agreement between a Paypal account holder (the sender) and the API caller (the service invoker) to make payment(s) on the the sender's behalf with various limitations defined.
|
904
|
-
class PreapprovalRequest < DataType
|
905
|
-
def self.load_members
|
906
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
907
|
-
object_of :clientDetails, ClientDetailsType
|
908
|
-
object_of :cancelUrl, String, :required => true
|
909
|
-
object_of :currencyCode, String, :required => true
|
910
|
-
object_of :dateOfMonth, Integer
|
911
|
-
object_of :dayOfWeek, DayOfWeek
|
912
|
-
object_of :endingDate, DateTime
|
913
|
-
object_of :maxAmountPerPayment, Float
|
914
|
-
object_of :maxNumberOfPayments, Integer
|
915
|
-
object_of :maxNumberOfPaymentsPerPeriod, Integer
|
916
|
-
object_of :maxTotalAmountOfAllPayments, Float
|
917
|
-
object_of :paymentPeriod, String
|
918
|
-
object_of :returnUrl, String, :required => true
|
919
|
-
object_of :memo, String
|
920
|
-
object_of :ipnNotificationUrl, String
|
921
|
-
object_of :senderEmail, String
|
922
|
-
object_of :startingDate, DateTime, :required => true
|
923
|
-
object_of :pinType, String
|
924
|
-
object_of :feesPayer, String
|
925
|
-
object_of :displayMaxTotalAmount, Boolean
|
926
|
-
object_of :requireInstantFundingSource, Boolean
|
927
|
-
object_of :sender, SenderIdentifier
|
928
|
-
end
|
929
|
-
end
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
# The result of the PreapprovalRequest is a preapprovalKey.
|
934
|
-
class PreapprovalResponse < DataType
|
935
|
-
def self.load_members
|
936
|
-
include ResponseStatus
|
937
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
938
|
-
object_of :preapprovalKey, String, :required => true
|
939
|
-
array_of :error, ErrorData
|
940
|
-
end
|
941
|
-
end
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
# A request to make a refund based on various criteria. A refund can be made against the entire payKey, an individual transaction belonging to a payKey, a tracking id, or a specific receiver of a payKey.
|
946
|
-
class RefundRequest < DataType
|
947
|
-
def self.load_members
|
948
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
949
|
-
object_of :currencyCode, String
|
950
|
-
object_of :payKey, String
|
951
|
-
object_of :transactionId, String
|
952
|
-
object_of :trackingId, String
|
953
|
-
object_of :receiverList, ReceiverList
|
954
|
-
end
|
955
|
-
end
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
# The result of a Refund request.
|
960
|
-
class RefundResponse < DataType
|
961
|
-
def self.load_members
|
962
|
-
include ResponseStatus
|
963
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
964
|
-
object_of :currencyCode, String, :required => true
|
965
|
-
object_of :refundInfoList, RefundInfoList, :required => true
|
966
|
-
array_of :error, ErrorData
|
967
|
-
end
|
968
|
-
end
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
# Phone number with Type of phone number
|
973
|
-
class PhoneNumber < PhoneNumberType
|
974
|
-
def self.load_members
|
975
|
-
object_of :type, PhoneType, :required => true
|
976
|
-
end
|
977
|
-
end
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
# The request to set the options of a payment request.
|
982
|
-
class SetPaymentOptionsRequest < DataType
|
983
|
-
def self.load_members
|
984
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
985
|
-
object_of :payKey, String, :required => true
|
986
|
-
object_of :initiatingEntity, InitiatingEntity
|
987
|
-
object_of :displayOptions, DisplayOptions
|
988
|
-
object_of :shippingAddressId, String
|
989
|
-
object_of :senderOptions, SenderOptions
|
990
|
-
array_of :receiverOptions, ReceiverOptions
|
991
|
-
end
|
992
|
-
end
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
# The response message for the SetPaymentOption request
|
997
|
-
class SetPaymentOptionsResponse < DataType
|
998
|
-
def self.load_members
|
999
|
-
include ResponseStatus
|
1000
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1001
|
-
array_of :error, ErrorData
|
1002
|
-
end
|
1003
|
-
end
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
# The request to get the funding plans available for a payment.
|
1008
|
-
class GetFundingPlansRequest < DataType
|
1009
|
-
def self.load_members
|
1010
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1011
|
-
object_of :payKey, String, :required => true
|
1012
|
-
end
|
1013
|
-
end
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
# The response to get the funding plans available for a payment.
|
1018
|
-
class GetFundingPlansResponse < DataType
|
1019
|
-
def self.load_members
|
1020
|
-
include ResponseStatus
|
1021
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1022
|
-
array_of :fundingPlan, FundingPlan
|
1023
|
-
array_of :error, ErrorData
|
1024
|
-
end
|
1025
|
-
end
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
# The request to get the addresses available for a payment.
|
1030
|
-
class GetAvailableShippingAddressesRequest < DataType
|
1031
|
-
def self.load_members
|
1032
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1033
|
-
# The key for which to provide the available addresses. Key can be an AdaptivePayments key such as payKey or preapprovalKey
|
1034
|
-
object_of :key, String, :required => true
|
1035
|
-
end
|
1036
|
-
end
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
# The response to get the shipping addresses available for a payment.
|
1041
|
-
class GetAvailableShippingAddressesResponse < DataType
|
1042
|
-
def self.load_members
|
1043
|
-
include ResponseStatus
|
1044
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1045
|
-
array_of :availableAddress, Address
|
1046
|
-
array_of :error, ErrorData
|
1047
|
-
end
|
1048
|
-
end
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
# The request to get the addresses available for a payment.
|
1053
|
-
class GetShippingAddressesRequest < DataType
|
1054
|
-
def self.load_members
|
1055
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1056
|
-
# The key for which to provide the available addresses. Key can be an AdaptivePayments key such as payKey or preapprovalKey
|
1057
|
-
object_of :key, String, :required => true
|
1058
|
-
end
|
1059
|
-
end
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
# The response to get the shipping addresses available for a payment.
|
1064
|
-
class GetShippingAddressesResponse < DataType
|
1065
|
-
def self.load_members
|
1066
|
-
include ResponseStatus
|
1067
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1068
|
-
object_of :selectedAddress, Address
|
1069
|
-
array_of :error, ErrorData
|
1070
|
-
end
|
1071
|
-
end
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
# The request to get the remaining limits for a user
|
1076
|
-
class GetUserLimitsRequest < DataType
|
1077
|
-
def self.load_members
|
1078
|
-
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1079
|
-
# The account identifier for the user
|
1080
|
-
object_of :user, AccountIdentifier, :required => true
|
1081
|
-
object_of :country, String, :required => true
|
1082
|
-
object_of :currencyCode, String, :required => true
|
1083
|
-
# List of limit types
|
1084
|
-
array_of :limitType, String, :required => true
|
1085
|
-
end
|
1086
|
-
end
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
# A response that contains a list of remaining limits
|
1091
|
-
class GetUserLimitsResponse < DataType
|
1092
|
-
def self.load_members
|
1093
|
-
include ResponseStatus
|
1094
|
-
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1095
|
-
array_of :userLimit, UserLimit, :required => true
|
1096
|
-
object_of :warningDataList, WarningDataList
|
1097
|
-
array_of :error, ErrorData
|
1098
|
-
end
|
1099
|
-
end
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
# ReceiverInfo needs to be populate for the receiver who doesn't have paypal account.
|
1104
|
-
class ReceiverInfo < AccountIdentifier
|
1105
|
-
def self.load_members
|
1106
|
-
# The two-character ISO country code of the home country of the Receiver
|
1107
|
-
object_of :countryCode, String
|
1108
|
-
object_of :firstName, String
|
1109
|
-
object_of :lastName, String
|
1110
|
-
end
|
1111
|
-
end
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
# FeeDisclosure contains the information related to Fees and taxes.
|
1116
|
-
class FeeDisclosure < DataType
|
1117
|
-
def self.load_members
|
1118
|
-
object_of :fee, CurrencyType, :required => true
|
1119
|
-
object_of :taxes, CurrencyType, :required => true
|
1120
|
-
end
|
1121
|
-
end
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
# SenderDisclosure contains the disclosure related to Sender
|
1126
|
-
class SenderDisclosure < DataType
|
1127
|
-
def self.load_members
|
1128
|
-
object_of :amountToTransfer, CurrencyType, :required => true
|
1129
|
-
object_of :feeDisclosure, FeeDisclosure
|
1130
|
-
object_of :totalAmountToTransfer, CurrencyType, :required => true
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
object_of :
|
1141
|
-
object_of :
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
object_of :
|
1152
|
-
|
1153
|
-
|
1154
|
-
object_of :
|
1155
|
-
object_of :
|
1156
|
-
object_of :
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
object_of :
|
1183
|
-
object_of :
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
object_of :
|
1195
|
-
object_of :
|
1196
|
-
object_of :
|
1197
|
-
object_of :
|
1198
|
-
object_of :
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
data_type_klass
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
end
|
1
|
+
# Stub objects for AdaptivePayments
|
2
|
+
# Auto generated code
|
3
|
+
|
4
|
+
require 'paypal-sdk-core'
|
5
|
+
|
6
|
+
module PayPal::SDK
|
7
|
+
module AdaptivePayments
|
8
|
+
module DataTypes
|
9
|
+
|
10
|
+
class DataType < Core::API::DataTypes::Base
|
11
|
+
def self.load_members
|
12
|
+
add_attribute :xmlns
|
13
|
+
add_attribute :type, :namespace => :xsi
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module ResponseStatus
|
18
|
+
Status = { :success => ["Success", "SuccessWithWarning"],
|
19
|
+
:warning => ["Warning", "SuccessWithWarning", "FailureWithWarning"],
|
20
|
+
:failure => ["Failure", "FailureWithWarning"] }
|
21
|
+
|
22
|
+
def response_status
|
23
|
+
self.responseEnvelope && self.responseEnvelope.ack
|
24
|
+
end
|
25
|
+
|
26
|
+
Status.keys.each do |status|
|
27
|
+
define_method("#{status}?") do
|
28
|
+
Status[status].include?(self.response_status)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class EnumType < Core::API::DataTypes::Enum
|
34
|
+
end
|
35
|
+
|
36
|
+
class AccountIdentifier < DataType
|
37
|
+
def self.load_members
|
38
|
+
object_of :email, String
|
39
|
+
object_of :phone, PhoneNumberType
|
40
|
+
object_of :accountId, String
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
class BaseAddress < DataType
|
47
|
+
def self.load_members
|
48
|
+
object_of :line1, String, :required => true
|
49
|
+
object_of :line2, String
|
50
|
+
object_of :city, String, :required => true
|
51
|
+
object_of :state, String
|
52
|
+
object_of :postalCode, String
|
53
|
+
object_of :countryCode, String, :required => true
|
54
|
+
object_of :type, String
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
# Details about the end user of the application invoking this service.
|
61
|
+
class ClientDetailsType < DataType
|
62
|
+
def self.load_members
|
63
|
+
object_of :ipAddress, String
|
64
|
+
object_of :deviceId, String
|
65
|
+
object_of :applicationId, String
|
66
|
+
object_of :model, String
|
67
|
+
object_of :geoLocation, String
|
68
|
+
object_of :customerType, String
|
69
|
+
object_of :partnerName, String
|
70
|
+
object_of :customerId, String
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
class CurrencyType < DataType
|
77
|
+
def self.load_members
|
78
|
+
object_of :code, String, :required => true
|
79
|
+
object_of :amount, Float, :required => true
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
# This type contains the detailed error information resulting from the service operation.
|
86
|
+
class ErrorData < DataType
|
87
|
+
def self.load_members
|
88
|
+
object_of :errorId, Integer
|
89
|
+
object_of :domain, String
|
90
|
+
object_of :subdomain, String
|
91
|
+
object_of :severity, ErrorSeverity
|
92
|
+
object_of :category, ErrorCategory
|
93
|
+
object_of :message, String
|
94
|
+
object_of :exceptionId, String
|
95
|
+
array_of :parameter, ErrorParameter
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
class ErrorParameter < DataType
|
102
|
+
def self.load_members
|
103
|
+
add_attribute :name, :required => true
|
104
|
+
object_of :value, String, :required => true
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
# This specifies a fault, encapsulating error data, with specific error codes.
|
111
|
+
class FaultMessage < DataType
|
112
|
+
def self.load_members
|
113
|
+
include ResponseStatus
|
114
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
115
|
+
array_of :error, ErrorData
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
class PhoneNumberType < DataType
|
122
|
+
def self.load_members
|
123
|
+
object_of :countryCode, String, :required => true
|
124
|
+
object_of :phoneNumber, String, :required => true
|
125
|
+
object_of :extension, String
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
# This specifies the list of parameters with every request to the service.
|
132
|
+
class RequestEnvelope < DataType
|
133
|
+
def self.load_members
|
134
|
+
# This specifies the required detail level that is needed by a client application pertaining to a particular data component (e.g., Item, Transaction, etc.). The detail level is specified in the DetailLevelCodeType which has all the enumerated values of the detail level for each component.
|
135
|
+
object_of :detailLevel, DetailLevelCode
|
136
|
+
# This should be the standard RFC 3066 language identification tag, e.g., en_US.
|
137
|
+
object_of :errorLanguage, String, :required => true
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
# This specifies a list of parameters with every response from a service.
|
144
|
+
class ResponseEnvelope < DataType
|
145
|
+
def self.load_members
|
146
|
+
object_of :timestamp, DateTime, :required => true
|
147
|
+
# Application level acknowledgment code.
|
148
|
+
object_of :ack, AckCode, :required => true
|
149
|
+
object_of :correlationId, String, :required => true
|
150
|
+
object_of :build, String, :required => true
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
# AckCodeType This code identifies the acknowledgment code types that could be used to communicate the status of processing a (request) message to an application. This code would be used as part of a response message that contains an application level acknowledgment element.
|
157
|
+
class AckCode < EnumType
|
158
|
+
self.options = { 'SUCCESS' => 'Success', 'FAILURE' => 'Failure', 'WARNING' => 'Warning', 'SUCCESSWITHWARNING' => 'SuccessWithWarning', 'FAILUREWITHWARNING' => 'FailureWithWarning' }
|
159
|
+
end
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
class DayOfWeek < EnumType
|
164
|
+
self.options = { 'NODAYSPECIFIED' => 'NO_DAY_SPECIFIED', 'SUNDAY' => 'SUNDAY', 'MONDAY' => 'MONDAY', 'TUESDAY' => 'TUESDAY', 'WEDNESDAY' => 'WEDNESDAY', 'THURSDAY' => 'THURSDAY', 'FRIDAY' => 'FRIDAY', 'SATURDAY' => 'SATURDAY' }
|
165
|
+
end
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
# DetailLevelCodeType
|
170
|
+
class DetailLevelCode < EnumType
|
171
|
+
self.options = { 'RETURNALL' => 'ReturnAll' }
|
172
|
+
end
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
class ErrorCategory < EnumType
|
177
|
+
self.options = { 'SYSTEM' => 'System', 'APPLICATION' => 'Application', 'REQUEST' => 'Request' }
|
178
|
+
end
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
class ErrorSeverity < EnumType
|
183
|
+
self.options = { 'ERROR' => 'Error', 'WARNING' => 'Warning' }
|
184
|
+
end
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
class Status < EnumType
|
189
|
+
self.options = { 'RTR' => 'RTR', 'NONRTR' => 'NON_RTR', 'MISSINGRECEIVERCOUNTRYINFORMATION' => 'MISSING_RECEIVER_COUNTRY_INFORMATION', 'MISSINGRECEIVERCOUNTRYFNAMELNAMEINFORMATION' => 'MISSING_RECEIVER_COUNTRY_FNAME_LNAME_INFORMATION' }
|
190
|
+
end
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
class AgreementType < EnumType
|
195
|
+
self.options = { 'OFFLINE' => 'OFFLINE', 'ONLINE' => 'ONLINE' }
|
196
|
+
end
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
class PhoneType < EnumType
|
201
|
+
self.options = { 'NONE' => 'NONE', 'HOME' => 'HOME', 'WORK' => 'WORK', 'BUSINESS' => 'BUSINESS', 'MOBILE' => 'MOBILE', 'FAXHOME' => 'FAX_HOME', 'FAXBUSINESS' => 'FAX_BUSINESS' }
|
202
|
+
end
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
class Address < DataType
|
207
|
+
def self.load_members
|
208
|
+
object_of :addresseeName, String
|
209
|
+
object_of :baseAddress, BaseAddress, :required => true
|
210
|
+
object_of :addressId, String
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
class AddressList < DataType
|
217
|
+
def self.load_members
|
218
|
+
array_of :address, Address, :required => true
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
# A list of ISO currency codes.
|
225
|
+
class CurrencyCodeList < DataType
|
226
|
+
def self.load_members
|
227
|
+
array_of :currencyCode, String, :required => true
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
# A list of estimated currency conversions for a base currency.
|
234
|
+
class CurrencyConversionList < DataType
|
235
|
+
def self.load_members
|
236
|
+
object_of :baseAmount, CurrencyType, :required => true
|
237
|
+
object_of :currencyList, CurrencyList, :required => true
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
# A table that contains a list of estimated currency conversions for a base currency in each row.
|
244
|
+
class CurrencyConversionTable < DataType
|
245
|
+
def self.load_members
|
246
|
+
array_of :currencyConversionList, CurrencyConversionList, :required => true
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
# A list of ISO currencies.
|
253
|
+
class CurrencyList < DataType
|
254
|
+
def self.load_members
|
255
|
+
array_of :currency, CurrencyType, :required => true
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
# Customizable options that a client application can specify for display purposes.
|
262
|
+
class DisplayOptions < DataType
|
263
|
+
def self.load_members
|
264
|
+
object_of :emailHeaderImageUrl, String
|
265
|
+
object_of :emailMarketingImageUrl, String
|
266
|
+
object_of :headerImageUrl, String
|
267
|
+
object_of :businessName, String
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
class ErrorList < DataType
|
274
|
+
def self.load_members
|
275
|
+
array_of :error, ErrorData, :required => true
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
class FundingConstraint < DataType
|
282
|
+
def self.load_members
|
283
|
+
object_of :allowedFundingType, FundingTypeList
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
# FundingTypeInfo represents one allowed funding type.
|
290
|
+
class FundingTypeInfo < DataType
|
291
|
+
def self.load_members
|
292
|
+
object_of :fundingType, String, :required => true
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
# ShippingAddressInfo.
|
299
|
+
class ShippingAddressInfo < DataType
|
300
|
+
def self.load_members
|
301
|
+
object_of :addresseeName, String
|
302
|
+
object_of :street1, String
|
303
|
+
object_of :street2, String
|
304
|
+
object_of :city, String
|
305
|
+
object_of :state, String
|
306
|
+
object_of :zip, String
|
307
|
+
object_of :country, String
|
308
|
+
array_of :phone, PhoneNumber
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
class FundingTypeList < DataType
|
315
|
+
def self.load_members
|
316
|
+
array_of :fundingTypeInfo, FundingTypeInfo, :required => true
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
# Describes the conversion between 2 currencies.
|
323
|
+
class CurrencyConversion < DataType
|
324
|
+
def self.load_members
|
325
|
+
object_of :from, CurrencyType, :required => true
|
326
|
+
object_of :to, CurrencyType, :required => true
|
327
|
+
object_of :exchangeRate, Float, :required => true
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
# Funding source information.
|
334
|
+
class FundingSource < DataType
|
335
|
+
def self.load_members
|
336
|
+
object_of :lastFourOfAccountNumber, String
|
337
|
+
object_of :type, String, :required => true
|
338
|
+
object_of :displayName, String
|
339
|
+
object_of :fundingSourceId, String
|
340
|
+
object_of :allowed, Boolean
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
# Amount to be charged to a particular funding source.
|
347
|
+
class FundingPlanCharge < DataType
|
348
|
+
def self.load_members
|
349
|
+
object_of :charge, CurrencyType, :required => true
|
350
|
+
object_of :fundingSource, FundingSource, :required => true
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
# FundingPlan describes the funding sources to be used for a specific payment.
|
357
|
+
class FundingPlan < DataType
|
358
|
+
def self.load_members
|
359
|
+
object_of :fundingPlanId, String, :required => true
|
360
|
+
object_of :fundingAmount, CurrencyType, :required => true
|
361
|
+
object_of :backupFundingSource, FundingSource
|
362
|
+
object_of :senderFees, CurrencyType
|
363
|
+
object_of :currencyConversion, CurrencyConversion
|
364
|
+
array_of :charge, FundingPlanCharge, :required => true
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
# Details about the party that initiated this payment. The API user is making this payment on behalf of the initiator. The initiator can simply be an institution or a customer of the institution.
|
371
|
+
class InitiatingEntity < DataType
|
372
|
+
def self.load_members
|
373
|
+
object_of :institutionCustomer, InstitutionCustomer
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
# The customer of the initiating institution
|
380
|
+
class InstitutionCustomer < DataType
|
381
|
+
def self.load_members
|
382
|
+
# The unique identifier as assigned to the institution.
|
383
|
+
object_of :institutionId, String, :required => true
|
384
|
+
# The first (given) name of the end consumer as known by the institution.
|
385
|
+
object_of :firstName, String, :required => true
|
386
|
+
# The last (family) name of the end consumer as known by the institution.
|
387
|
+
object_of :lastName, String, :required => true
|
388
|
+
object_of :middleName, String
|
389
|
+
# The full name of the end consumer as known by the institution.
|
390
|
+
object_of :displayName, String, :required => true
|
391
|
+
# The unique identifier as assigned to the end consumer by the institution.
|
392
|
+
object_of :institutionCustomerId, String, :required => true
|
393
|
+
# The two-character ISO country code of the home country of the end consumer
|
394
|
+
object_of :countryCode, String, :required => true
|
395
|
+
object_of :email, String
|
396
|
+
object_of :dateOfBirth, Date
|
397
|
+
object_of :address, BaseAddress
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
# Describes an individual item for an invoice.
|
404
|
+
class InvoiceItem < DataType
|
405
|
+
def self.load_members
|
406
|
+
object_of :name, String
|
407
|
+
object_of :identifier, String
|
408
|
+
object_of :price, Float
|
409
|
+
object_of :itemPrice, Float
|
410
|
+
object_of :itemCount, Integer
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
# Describes a payment for a particular receiver (merchant), contains list of additional per item details.
|
417
|
+
class InvoiceData < DataType
|
418
|
+
def self.load_members
|
419
|
+
array_of :item, InvoiceItem
|
420
|
+
object_of :totalTax, Float
|
421
|
+
object_of :totalShipping, Float
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
# The error that resulted from an attempt to make a payment to a receiver.
|
428
|
+
class PayError < DataType
|
429
|
+
def self.load_members
|
430
|
+
object_of :receiver, Receiver, :required => true
|
431
|
+
object_of :error, ErrorData, :required => true
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
class PayErrorList < DataType
|
438
|
+
def self.load_members
|
439
|
+
array_of :payError, PayError, :required => true
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
# PaymentInfo represents the payment attempt made to a Receiver of a PayRequest. If the execution of the payment has not yet completed, there will not be any transaction details.
|
446
|
+
class PaymentInfo < DataType
|
447
|
+
def self.load_members
|
448
|
+
object_of :transactionId, String
|
449
|
+
object_of :transactionStatus, String
|
450
|
+
object_of :receiver, Receiver, :required => true
|
451
|
+
object_of :refundedAmount, Float
|
452
|
+
object_of :pendingRefund, Boolean
|
453
|
+
object_of :senderTransactionId, String
|
454
|
+
object_of :senderTransactionStatus, String
|
455
|
+
object_of :pendingReason, String
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
class PaymentInfoList < DataType
|
462
|
+
def self.load_members
|
463
|
+
array_of :paymentInfo, PaymentInfo, :required => true
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
# Receiver is the party where funds are transferred to. A primary receiver receives a payment directly from the sender in a chained split payment. A primary receiver should not be specified when making a single or parallel split payment.
|
470
|
+
class Receiver < DataType
|
471
|
+
def self.load_members
|
472
|
+
object_of :amount, Float, :required => true
|
473
|
+
object_of :email, String
|
474
|
+
object_of :phone, PhoneNumberType
|
475
|
+
object_of :primary, Boolean
|
476
|
+
object_of :invoiceId, String
|
477
|
+
object_of :paymentType, String
|
478
|
+
object_of :paymentSubType, String
|
479
|
+
object_of :accountId, String
|
480
|
+
end
|
481
|
+
end
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
class ReceiverList < DataType
|
486
|
+
def self.load_members
|
487
|
+
array_of :receiver, Receiver, :required => true
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
# The sender identifier type contains information to identify a PayPal account.
|
494
|
+
class ReceiverIdentifier < AccountIdentifier
|
495
|
+
def self.load_members
|
496
|
+
end
|
497
|
+
end
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
# Options that apply to the receiver of a payment, allows setting additional details for payment using invoice.
|
502
|
+
class ReceiverOptions < DataType
|
503
|
+
def self.load_members
|
504
|
+
object_of :description, String
|
505
|
+
object_of :customId, String
|
506
|
+
object_of :invoiceData, InvoiceData
|
507
|
+
object_of :receiver, ReceiverIdentifier, :required => true
|
508
|
+
object_of :referrerCode, String
|
509
|
+
end
|
510
|
+
end
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
# RefundInfo represents the refund attempt made to a Receiver of a PayRequest.
|
515
|
+
class RefundInfo < DataType
|
516
|
+
def self.load_members
|
517
|
+
object_of :receiver, Receiver, :required => true
|
518
|
+
object_of :refundStatus, String
|
519
|
+
object_of :refundNetAmount, Float
|
520
|
+
object_of :refundFeeAmount, Float
|
521
|
+
object_of :refundGrossAmount, Float
|
522
|
+
object_of :totalOfAllRefunds, Float
|
523
|
+
object_of :refundHasBecomeFull, Boolean
|
524
|
+
object_of :encryptedRefundTransactionId, String
|
525
|
+
object_of :refundTransactionStatus, String
|
526
|
+
object_of :errorList, ErrorList
|
527
|
+
end
|
528
|
+
end
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
class RefundInfoList < DataType
|
533
|
+
def self.load_members
|
534
|
+
array_of :refundInfo, RefundInfo, :required => true
|
535
|
+
end
|
536
|
+
end
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
# Options that apply to the sender of a payment.
|
541
|
+
class SenderOptions < DataType
|
542
|
+
def self.load_members
|
543
|
+
# Require the user to select a shipping address during the web flow.
|
544
|
+
object_of :requireShippingAddressSelection, Boolean
|
545
|
+
# Determines whether or not the UI pages should display the shipping address set by user in this SetPaymentOptions request.
|
546
|
+
object_of :addressOverride, Boolean
|
547
|
+
object_of :referrerCode, String
|
548
|
+
object_of :shippingAddress, ShippingAddressInfo
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
# Details about the payer's tax info passed in by the merchant or partner.
|
555
|
+
class TaxIdDetails < DataType
|
556
|
+
def self.load_members
|
557
|
+
# Tax id of the merchant/business.
|
558
|
+
object_of :taxId, String
|
559
|
+
# Tax type of the Tax Id.
|
560
|
+
object_of :taxIdType, String
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
# The sender identifier type contains information to identify a PayPal account.
|
567
|
+
class SenderIdentifier < AccountIdentifier
|
568
|
+
def self.load_members
|
569
|
+
object_of :useCredentials, Boolean
|
570
|
+
object_of :taxIdDetails, TaxIdDetails
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
class UserLimit < DataType
|
577
|
+
def self.load_members
|
578
|
+
object_of :limitType, String, :required => true
|
579
|
+
object_of :limitAmount, CurrencyType, :required => true
|
580
|
+
end
|
581
|
+
end
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
# This type contains the detailed warning information resulting from the service operation.
|
586
|
+
class WarningData < DataType
|
587
|
+
def self.load_members
|
588
|
+
object_of :warningId, Integer
|
589
|
+
object_of :message, String
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
class WarningDataList < DataType
|
596
|
+
def self.load_members
|
597
|
+
array_of :warningData, WarningData, :required => true
|
598
|
+
end
|
599
|
+
end
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
# The request to cancel a Preapproval.
|
604
|
+
class CancelPreapprovalRequest < DataType
|
605
|
+
def self.load_members
|
606
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
607
|
+
object_of :preapprovalKey, String, :required => true
|
608
|
+
end
|
609
|
+
end
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
# The result of the CancelPreapprovalRequest.
|
614
|
+
class CancelPreapprovalResponse < DataType
|
615
|
+
def self.load_members
|
616
|
+
include ResponseStatus
|
617
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
618
|
+
array_of :error, ErrorData
|
619
|
+
end
|
620
|
+
end
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
# The request to confirm a Preapproval.
|
625
|
+
class ConfirmPreapprovalRequest < DataType
|
626
|
+
def self.load_members
|
627
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
628
|
+
object_of :preapprovalKey, String, :required => true
|
629
|
+
object_of :fundingSourceId, String
|
630
|
+
object_of :pin, String
|
631
|
+
object_of :agreementType, AgreementType
|
632
|
+
end
|
633
|
+
end
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
# The result of the ConfirmPreapprovalRequest.
|
638
|
+
class ConfirmPreapprovalResponse < DataType
|
639
|
+
def self.load_members
|
640
|
+
include ResponseStatus
|
641
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
642
|
+
array_of :error, ErrorData
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
# A request to convert one or more currencies into their estimated values in other currencies.
|
649
|
+
class ConvertCurrencyRequest < DataType
|
650
|
+
def self.load_members
|
651
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
652
|
+
object_of :baseAmountList, CurrencyList, :required => true
|
653
|
+
object_of :convertToCurrencyList, CurrencyCodeList, :required => true
|
654
|
+
# The two-character ISO country code where fx suppposed to happen
|
655
|
+
object_of :countryCode, String
|
656
|
+
object_of :conversionType, String
|
657
|
+
end
|
658
|
+
end
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
# A response that contains a table of estimated converted currencies based on the Convert Currency Request.
|
663
|
+
class ConvertCurrencyResponse < DataType
|
664
|
+
def self.load_members
|
665
|
+
include ResponseStatus
|
666
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
667
|
+
object_of :estimatedAmountTable, CurrencyConversionTable, :required => true
|
668
|
+
array_of :error, ErrorData
|
669
|
+
end
|
670
|
+
end
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
# The request to execute the payment request.
|
675
|
+
class ExecutePaymentRequest < DataType
|
676
|
+
def self.load_members
|
677
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
678
|
+
object_of :payKey, String, :required => true
|
679
|
+
# Describes the action that is performed by this API
|
680
|
+
object_of :actionType, String
|
681
|
+
object_of :fundingPlanId, String
|
682
|
+
end
|
683
|
+
end
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
# Contains information related to Post Payment Disclosure Details This contains 1.Receivers information 2.Funds Avalibility Date
|
688
|
+
class PostPaymentDisclosure < DataType
|
689
|
+
def self.load_members
|
690
|
+
object_of :accountIdentifier, AccountIdentifier, :required => true
|
691
|
+
object_of :fundsAvailabilityDate, Date
|
692
|
+
object_of :fundsAvailabilityDateDisclaimerText, String
|
693
|
+
end
|
694
|
+
end
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
class PostPaymentDisclosureList < DataType
|
699
|
+
def self.load_members
|
700
|
+
array_of :postPaymentDisclosure, PostPaymentDisclosure, :required => true
|
701
|
+
end
|
702
|
+
end
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
# The result of a payment execution.
|
707
|
+
class ExecutePaymentResponse < DataType
|
708
|
+
def self.load_members
|
709
|
+
include ResponseStatus
|
710
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
711
|
+
object_of :paymentExecStatus, String, :required => true
|
712
|
+
object_of :payErrorList, PayErrorList
|
713
|
+
object_of :postPaymentDisclosureList, PostPaymentDisclosureList
|
714
|
+
array_of :error, ErrorData
|
715
|
+
end
|
716
|
+
end
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
# The request to get the allowed funding sources available for a preapproval.
|
721
|
+
class GetAllowedFundingSourcesRequest < DataType
|
722
|
+
def self.load_members
|
723
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
724
|
+
object_of :key, String, :required => true
|
725
|
+
end
|
726
|
+
end
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
# The response to get the backup funding sources available for a preapproval.
|
731
|
+
class GetAllowedFundingSourcesResponse < DataType
|
732
|
+
def self.load_members
|
733
|
+
include ResponseStatus
|
734
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
735
|
+
array_of :fundingSource, FundingSource
|
736
|
+
array_of :error, ErrorData
|
737
|
+
end
|
738
|
+
end
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
# The request to get the options of a payment request.
|
743
|
+
class GetPaymentOptionsRequest < DataType
|
744
|
+
def self.load_members
|
745
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
746
|
+
object_of :payKey, String, :required => true
|
747
|
+
end
|
748
|
+
end
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
# The response message for the GetPaymentOption request
|
753
|
+
class GetPaymentOptionsResponse < DataType
|
754
|
+
def self.load_members
|
755
|
+
include ResponseStatus
|
756
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
757
|
+
object_of :initiatingEntity, InitiatingEntity
|
758
|
+
object_of :displayOptions, DisplayOptions
|
759
|
+
object_of :shippingAddressId, String
|
760
|
+
object_of :senderOptions, SenderOptions
|
761
|
+
array_of :receiverOptions, ReceiverOptions
|
762
|
+
array_of :error, ErrorData
|
763
|
+
end
|
764
|
+
end
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
# The request to look up the details of a PayRequest. The PaymentDetailsRequest can be made with either a payKey, trackingId, or a transactionId of the PayRequest.
|
769
|
+
class PaymentDetailsRequest < DataType
|
770
|
+
def self.load_members
|
771
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
772
|
+
object_of :payKey, String
|
773
|
+
object_of :transactionId, String
|
774
|
+
object_of :trackingId, String
|
775
|
+
end
|
776
|
+
end
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
# The details of the PayRequest as specified in the Pay operation.
|
781
|
+
class PaymentDetailsResponse < DataType
|
782
|
+
def self.load_members
|
783
|
+
include ResponseStatus
|
784
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
785
|
+
object_of :cancelUrl, String, :required => true
|
786
|
+
object_of :currencyCode, String, :required => true
|
787
|
+
object_of :ipnNotificationUrl, String
|
788
|
+
object_of :memo, String
|
789
|
+
object_of :paymentInfoList, PaymentInfoList, :required => true
|
790
|
+
object_of :returnUrl, String, :required => true
|
791
|
+
object_of :senderEmail, String
|
792
|
+
object_of :status, String, :required => true
|
793
|
+
object_of :trackingId, String
|
794
|
+
object_of :payKey, String, :required => true
|
795
|
+
object_of :actionType, String, :required => true
|
796
|
+
object_of :feesPayer, String, :required => true
|
797
|
+
object_of :reverseAllParallelPaymentsOnError, Boolean
|
798
|
+
object_of :preapprovalKey, String
|
799
|
+
object_of :fundingConstraint, FundingConstraint
|
800
|
+
object_of :sender, SenderIdentifier
|
801
|
+
object_of :shippingAddress, ShippingAddressInfo
|
802
|
+
object_of :payKeyExpirationDate, DateTime
|
803
|
+
array_of :error, ErrorData
|
804
|
+
end
|
805
|
+
end
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
# The PayRequest contains the payment instructions to make from sender to receivers.
|
810
|
+
class PayRequest < DataType
|
811
|
+
def self.load_members
|
812
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
813
|
+
object_of :clientDetails, ClientDetailsType
|
814
|
+
object_of :actionType, String, :required => true
|
815
|
+
object_of :cancelUrl, String, :required => true
|
816
|
+
object_of :currencyCode, String, :required => true
|
817
|
+
object_of :feesPayer, String
|
818
|
+
object_of :ipnNotificationUrl, String
|
819
|
+
object_of :memo, String
|
820
|
+
object_of :pin, String
|
821
|
+
object_of :preapprovalKey, String
|
822
|
+
object_of :receiverList, ReceiverList, :required => true
|
823
|
+
object_of :reverseAllParallelPaymentsOnError, Boolean
|
824
|
+
object_of :senderEmail, String
|
825
|
+
object_of :returnUrl, String, :required => true
|
826
|
+
object_of :trackingId, String
|
827
|
+
object_of :fundingConstraint, FundingConstraint
|
828
|
+
object_of :sender, SenderIdentifier
|
829
|
+
# The pay key expires after the duration specified in this column. If not provided, it defaults to normal expiration behavior. Valid values are 5 minutes to 30 days.
|
830
|
+
object_of :payKeyDuration, String
|
831
|
+
end
|
832
|
+
end
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
# The PayResponse contains the result of the Pay operation. The payKey and execution status of the request should always be provided.
|
837
|
+
class PayResponse < DataType
|
838
|
+
def self.load_members
|
839
|
+
include ResponseStatus
|
840
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
841
|
+
object_of :payKey, String, :required => true
|
842
|
+
object_of :paymentExecStatus, String, :required => true
|
843
|
+
object_of :payErrorList, PayErrorList
|
844
|
+
object_of :paymentInfoList, PaymentInfoList, :required => true
|
845
|
+
object_of :sender, SenderIdentifier
|
846
|
+
object_of :defaultFundingPlan, FundingPlan
|
847
|
+
object_of :warningDataList, WarningDataList
|
848
|
+
array_of :error, ErrorData
|
849
|
+
end
|
850
|
+
end
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
# The request to look up the details of a Preapproval.
|
855
|
+
class PreapprovalDetailsRequest < DataType
|
856
|
+
def self.load_members
|
857
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
858
|
+
object_of :preapprovalKey, String, :required => true
|
859
|
+
object_of :getBillingAddress, Boolean
|
860
|
+
end
|
861
|
+
end
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
# The details of the Preapproval as specified in the Preapproval operation.
|
866
|
+
class PreapprovalDetailsResponse < DataType
|
867
|
+
def self.load_members
|
868
|
+
include ResponseStatus
|
869
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
870
|
+
object_of :approved, Boolean, :required => true
|
871
|
+
object_of :cancelUrl, String, :required => true
|
872
|
+
object_of :curPayments, Integer, :required => true
|
873
|
+
object_of :curPaymentsAmount, Float, :required => true
|
874
|
+
object_of :curPeriodAttempts, Integer
|
875
|
+
object_of :curPeriodEndingDate, DateTime
|
876
|
+
object_of :currencyCode, String, :required => true
|
877
|
+
object_of :dateOfMonth, Integer
|
878
|
+
object_of :dayOfWeek, DayOfWeek
|
879
|
+
object_of :endingDate, DateTime
|
880
|
+
object_of :maxAmountPerPayment, Float
|
881
|
+
object_of :maxNumberOfPayments, Integer
|
882
|
+
object_of :maxNumberOfPaymentsPerPeriod, Integer
|
883
|
+
object_of :maxTotalAmountOfAllPayments, Float
|
884
|
+
object_of :paymentPeriod, String
|
885
|
+
object_of :pinType, String
|
886
|
+
object_of :returnUrl, String, :required => true
|
887
|
+
object_of :senderEmail, String
|
888
|
+
object_of :memo, String
|
889
|
+
object_of :startingDate, DateTime, :required => true
|
890
|
+
object_of :status, String, :required => true
|
891
|
+
object_of :ipnNotificationUrl, String
|
892
|
+
object_of :addressList, AddressList
|
893
|
+
object_of :feesPayer, String
|
894
|
+
object_of :displayMaxTotalAmount, Boolean
|
895
|
+
object_of :sender, SenderIdentifier
|
896
|
+
object_of :agreementType, AgreementType
|
897
|
+
array_of :error, ErrorData
|
898
|
+
end
|
899
|
+
end
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
# A request to create a Preapproval. A Preapproval is an agreement between a Paypal account holder (the sender) and the API caller (the service invoker) to make payment(s) on the the sender's behalf with various limitations defined.
|
904
|
+
class PreapprovalRequest < DataType
|
905
|
+
def self.load_members
|
906
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
907
|
+
object_of :clientDetails, ClientDetailsType
|
908
|
+
object_of :cancelUrl, String, :required => true
|
909
|
+
object_of :currencyCode, String, :required => true
|
910
|
+
object_of :dateOfMonth, Integer
|
911
|
+
object_of :dayOfWeek, DayOfWeek
|
912
|
+
object_of :endingDate, DateTime
|
913
|
+
object_of :maxAmountPerPayment, Float
|
914
|
+
object_of :maxNumberOfPayments, Integer
|
915
|
+
object_of :maxNumberOfPaymentsPerPeriod, Integer
|
916
|
+
object_of :maxTotalAmountOfAllPayments, Float
|
917
|
+
object_of :paymentPeriod, String
|
918
|
+
object_of :returnUrl, String, :required => true
|
919
|
+
object_of :memo, String
|
920
|
+
object_of :ipnNotificationUrl, String
|
921
|
+
object_of :senderEmail, String
|
922
|
+
object_of :startingDate, DateTime, :required => true
|
923
|
+
object_of :pinType, String
|
924
|
+
object_of :feesPayer, String
|
925
|
+
object_of :displayMaxTotalAmount, Boolean
|
926
|
+
object_of :requireInstantFundingSource, Boolean
|
927
|
+
object_of :sender, SenderIdentifier
|
928
|
+
end
|
929
|
+
end
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
# The result of the PreapprovalRequest is a preapprovalKey.
|
934
|
+
class PreapprovalResponse < DataType
|
935
|
+
def self.load_members
|
936
|
+
include ResponseStatus
|
937
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
938
|
+
object_of :preapprovalKey, String, :required => true
|
939
|
+
array_of :error, ErrorData
|
940
|
+
end
|
941
|
+
end
|
942
|
+
|
943
|
+
|
944
|
+
|
945
|
+
# A request to make a refund based on various criteria. A refund can be made against the entire payKey, an individual transaction belonging to a payKey, a tracking id, or a specific receiver of a payKey.
|
946
|
+
class RefundRequest < DataType
|
947
|
+
def self.load_members
|
948
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
949
|
+
object_of :currencyCode, String
|
950
|
+
object_of :payKey, String
|
951
|
+
object_of :transactionId, String
|
952
|
+
object_of :trackingId, String
|
953
|
+
object_of :receiverList, ReceiverList
|
954
|
+
end
|
955
|
+
end
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
# The result of a Refund request.
|
960
|
+
class RefundResponse < DataType
|
961
|
+
def self.load_members
|
962
|
+
include ResponseStatus
|
963
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
964
|
+
object_of :currencyCode, String, :required => true
|
965
|
+
object_of :refundInfoList, RefundInfoList, :required => true
|
966
|
+
array_of :error, ErrorData
|
967
|
+
end
|
968
|
+
end
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
# Phone number with Type of phone number
|
973
|
+
class PhoneNumber < PhoneNumberType
|
974
|
+
def self.load_members
|
975
|
+
object_of :type, PhoneType, :required => true
|
976
|
+
end
|
977
|
+
end
|
978
|
+
|
979
|
+
|
980
|
+
|
981
|
+
# The request to set the options of a payment request.
|
982
|
+
class SetPaymentOptionsRequest < DataType
|
983
|
+
def self.load_members
|
984
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
985
|
+
object_of :payKey, String, :required => true
|
986
|
+
object_of :initiatingEntity, InitiatingEntity
|
987
|
+
object_of :displayOptions, DisplayOptions
|
988
|
+
object_of :shippingAddressId, String
|
989
|
+
object_of :senderOptions, SenderOptions
|
990
|
+
array_of :receiverOptions, ReceiverOptions
|
991
|
+
end
|
992
|
+
end
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
# The response message for the SetPaymentOption request
|
997
|
+
class SetPaymentOptionsResponse < DataType
|
998
|
+
def self.load_members
|
999
|
+
include ResponseStatus
|
1000
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1001
|
+
array_of :error, ErrorData
|
1002
|
+
end
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
|
1006
|
+
|
1007
|
+
# The request to get the funding plans available for a payment.
|
1008
|
+
class GetFundingPlansRequest < DataType
|
1009
|
+
def self.load_members
|
1010
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1011
|
+
object_of :payKey, String, :required => true
|
1012
|
+
end
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
# The response to get the funding plans available for a payment.
|
1018
|
+
class GetFundingPlansResponse < DataType
|
1019
|
+
def self.load_members
|
1020
|
+
include ResponseStatus
|
1021
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1022
|
+
array_of :fundingPlan, FundingPlan
|
1023
|
+
array_of :error, ErrorData
|
1024
|
+
end
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
# The request to get the addresses available for a payment.
|
1030
|
+
class GetAvailableShippingAddressesRequest < DataType
|
1031
|
+
def self.load_members
|
1032
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1033
|
+
# The key for which to provide the available addresses. Key can be an AdaptivePayments key such as payKey or preapprovalKey
|
1034
|
+
object_of :key, String, :required => true
|
1035
|
+
end
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
|
1039
|
+
|
1040
|
+
# The response to get the shipping addresses available for a payment.
|
1041
|
+
class GetAvailableShippingAddressesResponse < DataType
|
1042
|
+
def self.load_members
|
1043
|
+
include ResponseStatus
|
1044
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1045
|
+
array_of :availableAddress, Address
|
1046
|
+
array_of :error, ErrorData
|
1047
|
+
end
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
# The request to get the addresses available for a payment.
|
1053
|
+
class GetShippingAddressesRequest < DataType
|
1054
|
+
def self.load_members
|
1055
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1056
|
+
# The key for which to provide the available addresses. Key can be an AdaptivePayments key such as payKey or preapprovalKey
|
1057
|
+
object_of :key, String, :required => true
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
# The response to get the shipping addresses available for a payment.
|
1064
|
+
class GetShippingAddressesResponse < DataType
|
1065
|
+
def self.load_members
|
1066
|
+
include ResponseStatus
|
1067
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1068
|
+
object_of :selectedAddress, Address
|
1069
|
+
array_of :error, ErrorData
|
1070
|
+
end
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
|
1074
|
+
|
1075
|
+
# The request to get the remaining limits for a user
|
1076
|
+
class GetUserLimitsRequest < DataType
|
1077
|
+
def self.load_members
|
1078
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1079
|
+
# The account identifier for the user
|
1080
|
+
object_of :user, AccountIdentifier, :required => true
|
1081
|
+
object_of :country, String, :required => true
|
1082
|
+
object_of :currencyCode, String, :required => true
|
1083
|
+
# List of limit types
|
1084
|
+
array_of :limitType, String, :required => true
|
1085
|
+
end
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
# A response that contains a list of remaining limits
|
1091
|
+
class GetUserLimitsResponse < DataType
|
1092
|
+
def self.load_members
|
1093
|
+
include ResponseStatus
|
1094
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1095
|
+
array_of :userLimit, UserLimit, :required => true
|
1096
|
+
object_of :warningDataList, WarningDataList
|
1097
|
+
array_of :error, ErrorData
|
1098
|
+
end
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
|
1102
|
+
|
1103
|
+
# ReceiverInfo needs to be populate for the receiver who doesn't have paypal account.
|
1104
|
+
class ReceiverInfo < AccountIdentifier
|
1105
|
+
def self.load_members
|
1106
|
+
# The two-character ISO country code of the home country of the Receiver
|
1107
|
+
object_of :countryCode, String
|
1108
|
+
object_of :firstName, String
|
1109
|
+
object_of :lastName, String
|
1110
|
+
end
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
# FeeDisclosure contains the information related to Fees and taxes.
|
1116
|
+
class FeeDisclosure < DataType
|
1117
|
+
def self.load_members
|
1118
|
+
object_of :fee, CurrencyType, :required => true
|
1119
|
+
object_of :taxes, CurrencyType, :required => true
|
1120
|
+
end
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
|
1124
|
+
|
1125
|
+
# SenderDisclosure contains the disclosure related to Sender
|
1126
|
+
class SenderDisclosure < DataType
|
1127
|
+
def self.load_members
|
1128
|
+
object_of :amountToTransfer, CurrencyType, :required => true
|
1129
|
+
object_of :feeDisclosure, FeeDisclosure
|
1130
|
+
object_of :totalAmountToTransfer, CurrencyType, :required => true
|
1131
|
+
object_of :conversionRate, ConversionRate, :required => true
|
1132
|
+
end
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
# This holds the conversion rate from "Sender currency for one bucks to equivalent value in the receivers currency"
|
1138
|
+
class ConversionRate < DataType
|
1139
|
+
def self.load_members
|
1140
|
+
object_of :senderCurrency, String, :required => true
|
1141
|
+
object_of :receiverCurrency, String, :required => true
|
1142
|
+
object_of :exchangeRate, Float, :required => true
|
1143
|
+
end
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
|
1147
|
+
|
1148
|
+
# ReceiverDisclosure contains the disclosure related to Receiver/Receivers.
|
1149
|
+
class ReceiverDisclosure < DataType
|
1150
|
+
def self.load_members
|
1151
|
+
object_of :accountIdentifier, AccountIdentifier, :required => true
|
1152
|
+
object_of :amountReceivedFromSender, CurrencyType, :required => true
|
1153
|
+
# The two-character ISO country code of the home country of the Receiver
|
1154
|
+
object_of :countryCode, String, :required => true
|
1155
|
+
object_of :conversionRate, ConversionRate, :required => true
|
1156
|
+
object_of :feeDisclosure, FeeDisclosure
|
1157
|
+
object_of :totalAmountReceived, CurrencyType, :required => true
|
1158
|
+
end
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
|
1162
|
+
|
1163
|
+
class ReceiverDisclosureList < DataType
|
1164
|
+
def self.load_members
|
1165
|
+
array_of :receiverDisclosure, ReceiverDisclosure, :required => true
|
1166
|
+
end
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
|
1170
|
+
|
1171
|
+
class ReceiverInfoList < DataType
|
1172
|
+
def self.load_members
|
1173
|
+
array_of :receiverInfo, ReceiverInfo, :required => true
|
1174
|
+
end
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
|
1178
|
+
|
1179
|
+
# GetPrePaymentDisclosureRequest is used to get the PrePayment Disclosure.; GetPrePaymentDisclosureRequest contains following parameters payKey :The pay key that identifies the payment for which you want to retrieve details. this is the pay key returned in the PayResponse message. receiverInfoList : This is an optional.This needs to be provided in case of Unilateral scenario. receiverInfoList has a list of ReceiverInfo type. List is provided here to support in future for Parallel/Chained Payemnts. Each ReceiverInfo has following variables firstName : firstName of recipient. lastName : lastName of recipient. countryCode : CountryCode of Recipient.
|
1180
|
+
class GetPrePaymentDisclosureRequest < DataType
|
1181
|
+
def self.load_members
|
1182
|
+
object_of :requestEnvelope, RequestEnvelope, :required => true
|
1183
|
+
object_of :payKey, String, :required => true
|
1184
|
+
object_of :receiverInfoList, ReceiverInfoList
|
1185
|
+
end
|
1186
|
+
end
|
1187
|
+
|
1188
|
+
|
1189
|
+
|
1190
|
+
# GetPrePaymentDisclosureResponse contains the information related to PrePayment disclosure. status : indicates the status of response. If Status = RTR then it means that this is RTR transaction. If Status = NON_RTR then it means that this is non RTR transaction. If Status = MISSING_RECEIVER_COUNTRY_INFORMATION then it means the Receiver country information is not found in PayPal database. So merchant has to call the API again with same set of parameter along with Receiver country code.This is useful in case of Unilateral scenario. where receiver is not holding paypal account. This is currently a place holder to support backward compatibility since first name and last name are mandated too. If Status = MISSING_RECEIVER_COUNTRY_FNAME_LNAME_INFORMATION then it means the Receiver country, first name and last name information is not found in PayPal database. So merchant has to call the API again with same set of parameter along with Receiver country code.This is useful in case of Unilateral scenario. where receiver is not holding paypal account. feePayer:Indicates who has agreed to Pay a Fee for the RTR transaction. Merchant can use this information to decide who actually has to pay the fee . senderDisclosure : This Variable Holds the disclosure related to sender. receiverDisclosureList : This list contains the disclosure information related to receivers. Merchant can just parse the details what ever is avaliable in the response and display the same to user.
|
1191
|
+
class GetPrePaymentDisclosureResponse < DataType
|
1192
|
+
def self.load_members
|
1193
|
+
include ResponseStatus
|
1194
|
+
object_of :responseEnvelope, ResponseEnvelope, :required => true
|
1195
|
+
object_of :status, Status, :required => true
|
1196
|
+
object_of :feesPayer, String
|
1197
|
+
object_of :senderDisclosure, SenderDisclosure
|
1198
|
+
object_of :receiverDisclosureList, ReceiverDisclosureList
|
1199
|
+
object_of :disclaimer, String
|
1200
|
+
array_of :error, ErrorData
|
1201
|
+
end
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
|
1208
|
+
constants.each do |data_type_klass|
|
1209
|
+
data_type_klass = const_get(data_type_klass)
|
1210
|
+
data_type_klass.load_members if defined? data_type_klass.load_members
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
end
|
1214
|
+
end
|
1215
|
+
end
|