paypal-sdk-invoice 1.103.0 → 1.106.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,17 +1,17 @@
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/invoice_samples.gemspec', __FILE__)
8
- gem 'invoice_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
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/invoice_samples.gemspec', __FILE__)
8
+ gem 'invoice_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
data/README.md CHANGED
@@ -1,125 +1,125 @@
1
- # Invoice SDK
2
-
3
- The PayPal Invoice SDK provides Ruby APIs to create and manage Invoices using the PayPal's Invoicing Service API.
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'paypal-sdk-invoice'
11
- ```
12
-
13
- And then execute:
14
-
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
-
21
- ```bash
22
- $ gem install paypal-sdk-invoice
23
- ```
24
-
25
- ## Configuration
26
-
27
- For Rails application:
28
-
29
- ```bash
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
- # # with certificate
44
- # cert_path: "config/cert_key.pem"
45
- # # with token authentication
46
- # token: ESTy2hio5WJQo1iixkH29I53RJxaS0Gvno1A6.YQXZgktxbY4I2Tdg
47
- # token_secret: ZKPhUYuwJwYsfWdzorozWO2U9pI
48
- # # with Proxy
49
- # http_proxy: http://proxy-ipaddress:3129/
50
- # # with device ip address
51
- # device_ipaddress: "127.0.0.1"
52
- test:
53
- <<: *default
54
- production:
55
- <<: *default
56
- mode: live
57
- ```
58
-
59
- Load Configurations from specified file:
60
-
61
- ```ruby
62
- PayPal::SDK::Core::Config.load('config/paypal.yml', ENV['RACK_ENV'] || 'development')
63
- ```
64
-
65
- ## Example
66
-
67
- ```ruby
68
- require 'paypal-sdk-invoice'
69
- @api = PayPal::SDK::Invoice::API.new(
70
- :mode => "sandbox", # Set "live" for production
71
- :app_id => "APP-80W284485P519543T",
72
- :username => "jb-us-seller_api1.paypal.com",
73
- :password => "WX4WTU3S8MY44S7F",
74
- :signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
75
-
76
- # Build request object
77
- @create_invoice = @api.build_create_invoice({
78
- :invoice => {
79
- :merchantEmail => "jb-us-seller@paypal.com",
80
- :payerEmail => "sender@yahoo.com",
81
- :itemList => {
82
- :item => [{
83
- :name => "item1",
84
- :quantity => 2.0,
85
- :unitPrice => 5.0 }] },
86
- :currencyCode => "USD",
87
- :paymentTerms => "DueOnReceipt" } })
88
-
89
- # Make API call & get response
90
- @create_invoice_response = @api.create_invoice(@create_invoice)
91
-
92
- # Access Response
93
- if @create_invoice_response.success?
94
- @create_invoice_response.invoiceID
95
- @create_invoice_response.invoiceNumber
96
- @create_invoice_response.invoiceURL
97
- else
98
- @create_invoice_response.error
99
- end
100
- ```
101
-
102
- For more samples [paypal-sdk-samples.herokuapp.com/invoice/](https://paypal-sdk-samples.herokuapp.com/invoice/)
103
-
104
- ## Samples App
105
-
106
- Add following line in rails `Gemfile`:
107
-
108
- ```ruby
109
- gem 'paypal-sdk-invoice'
110
- gem 'invoice_samples', :git => "https://github.com/paypal/invoice-sdk-ruby.git", :group => :development
111
- ```
112
-
113
- Configure routes(`config/routes.rb`):
114
-
115
- ```ruby
116
- mount InvoiceSamples::Engine => "/samples" if Rails.env.development?
117
- ```
118
-
119
- To get default paypal configuration execute:
120
-
121
- ```bash
122
- $ rails g paypal:sdk:install
123
- ```
124
-
125
- Run `rails server` and check the samples.
1
+ # Invoice SDK
2
+
3
+ The PayPal Invoice SDK provides Ruby APIs to create and manage Invoices using the PayPal's Invoicing Service API.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'paypal-sdk-invoice'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+
21
+ ```bash
22
+ $ gem install paypal-sdk-invoice
23
+ ```
24
+
25
+ ## Configuration
26
+
27
+ For Rails application:
28
+
29
+ ```bash
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
+ # # with certificate
44
+ # cert_path: "config/cert_key.pem"
45
+ # # with token authentication
46
+ # token: ESTy2hio5WJQo1iixkH29I53RJxaS0Gvno1A6.YQXZgktxbY4I2Tdg
47
+ # token_secret: ZKPhUYuwJwYsfWdzorozWO2U9pI
48
+ # # with Proxy
49
+ # http_proxy: http://proxy-ipaddress:3129/
50
+ # # with device ip address
51
+ # device_ipaddress: "127.0.0.1"
52
+ test:
53
+ <<: *default
54
+ production:
55
+ <<: *default
56
+ mode: live
57
+ ```
58
+
59
+ Load Configurations from specified file:
60
+
61
+ ```ruby
62
+ PayPal::SDK::Core::Config.load('config/paypal.yml', ENV['RACK_ENV'] || 'development')
63
+ ```
64
+
65
+ ## Example
66
+
67
+ ```ruby
68
+ require 'paypal-sdk-invoice'
69
+ @api = PayPal::SDK::Invoice::API.new(
70
+ :mode => "sandbox", # Set "live" for production
71
+ :app_id => "APP-80W284485P519543T",
72
+ :username => "jb-us-seller_api1.paypal.com",
73
+ :password => "WX4WTU3S8MY44S7F",
74
+ :signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
75
+
76
+ # Build request object
77
+ @create_invoice = @api.build_create_invoice({
78
+ :invoice => {
79
+ :merchantEmail => "jb-us-seller@paypal.com",
80
+ :payerEmail => "sender@yahoo.com",
81
+ :itemList => {
82
+ :item => [{
83
+ :name => "item1",
84
+ :quantity => 2.0,
85
+ :unitPrice => 5.0 }] },
86
+ :currencyCode => "USD",
87
+ :paymentTerms => "DueOnReceipt" } })
88
+
89
+ # Make API call & get response
90
+ @create_invoice_response = @api.create_invoice(@create_invoice)
91
+
92
+ # Access Response
93
+ if @create_invoice_response.success?
94
+ @create_invoice_response.invoiceID
95
+ @create_invoice_response.invoiceNumber
96
+ @create_invoice_response.invoiceURL
97
+ else
98
+ @create_invoice_response.error
99
+ end
100
+ ```
101
+
102
+ For more samples [paypal-sdk-samples.herokuapp.com/invoice/](https://paypal-sdk-samples.herokuapp.com/invoice/)
103
+
104
+ ## Samples App
105
+
106
+ Add following line in rails `Gemfile`:
107
+
108
+ ```ruby
109
+ gem 'paypal-sdk-invoice'
110
+ gem 'invoice_samples', :git => "https://github.com/paypal/invoice-sdk-ruby.git", :group => :development
111
+ ```
112
+
113
+ Configure routes(`config/routes.rb`):
114
+
115
+ ```ruby
116
+ mount InvoiceSamples::Engine => "/samples" if Rails.env.development?
117
+ ```
118
+
119
+ To get default paypal configuration execute:
120
+
121
+ ```bash
122
+ $ rails g paypal:sdk:install
123
+ ```
124
+
125
+ Run `rails server` and check the samples.
data/Rakefile CHANGED
@@ -1,14 +1,14 @@
1
- require "bundler/gem_tasks"
2
-
3
- desc "Run tests"
4
- task :rspec do
5
- cmd = "bundle exec rspec && cd samples && bundle exec rspec"
6
- system(cmd) || raise("#{cmd} failed")
7
- end
8
-
9
- desc "View samples"
10
- task :samples do
11
- system("cd samples/spec/dummy && bundle exec rails server")
12
- end
13
-
14
- task :default => :rspec
1
+ require "bundler/gem_tasks"
2
+
3
+ desc "Run tests"
4
+ task :rspec do
5
+ cmd = "bundle exec rspec && cd samples && bundle exec rspec"
6
+ system(cmd) || raise("#{cmd} failed")
7
+ end
8
+
9
+ desc "View samples"
10
+ task :samples do
11
+ system("cd samples/spec/dummy && bundle exec rails server")
12
+ end
13
+
14
+ task :default => :rspec
@@ -1,2 +1,2 @@
1
- require "paypal-sdk/invoice"
2
-
1
+ require "paypal-sdk/invoice"
2
+
@@ -1,16 +1,16 @@
1
- require 'paypal-sdk-core'
2
-
3
- module PayPal
4
- module SDK
5
- module Invoice
6
- autoload :VERSION, "paypal-sdk/invoice/version"
7
- autoload :Services, "paypal-sdk/invoice/services"
8
- autoload :DataTypes, "paypal-sdk/invoice/data_types"
9
- autoload :API, "paypal-sdk/invoice/api"
10
-
11
- def self.new(*args)
12
- API.new(*args)
13
- end
14
- end
15
- end
16
- end
1
+ require 'paypal-sdk-core'
2
+
3
+ module PayPal
4
+ module SDK
5
+ module Invoice
6
+ autoload :VERSION, "paypal-sdk/invoice/version"
7
+ autoload :Services, "paypal-sdk/invoice/services"
8
+ autoload :DataTypes, "paypal-sdk/invoice/data_types"
9
+ autoload :API, "paypal-sdk/invoice/api"
10
+
11
+ def self.new(*args)
12
+ API.new(*args)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,21 +1,21 @@
1
- require 'paypal-sdk-core'
2
-
3
- module PayPal
4
- module SDK
5
- module Invoice
6
- class API < Core::API::Platform
7
- include Services
8
-
9
- def initialize(environment = nil, options = {})
10
- super(SERVICE_NAME, environment, options)
11
- end
12
-
13
- INVOICE_HTTP_HEADER = { "X-PAYPAL-REQUEST-SOURCE" => "invoice-ruby-sdk-#{VERSION}" }
14
- def default_http_header
15
- super.merge(INVOICE_HTTP_HEADER)
16
- end
17
- end
18
- end
19
- end
20
- end
21
-
1
+ require 'paypal-sdk-core'
2
+
3
+ module PayPal
4
+ module SDK
5
+ module Invoice
6
+ class API < Core::API::Platform
7
+ include Services
8
+
9
+ def initialize(environment = nil, options = {})
10
+ super(SERVICE_NAME, environment, options)
11
+ end
12
+
13
+ INVOICE_HTTP_HEADER = { "X-PAYPAL-REQUEST-SOURCE" => "invoice-ruby-sdk-#{VERSION}" }
14
+ def default_http_header
15
+ super.merge(INVOICE_HTTP_HEADER)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+
@@ -1,841 +1,871 @@
1
- # Stub objects for Invoice
2
- # Auto generated code
3
-
4
- require 'paypal-sdk-core'
5
-
6
- module PayPal::SDK
7
- module Invoice
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 BaseAddress < DataType
37
- def self.load_members
38
- object_of :line1, String, :required => true
39
- object_of :line2, String
40
- object_of :city, String, :required => true
41
- object_of :state, String
42
- object_of :postalCode, String
43
- object_of :countryCode, String, :required => true
44
- object_of :type, String
45
- end
46
- end
47
-
48
-
49
-
50
- # This type contains the detailed error information resulting from the service operation.
51
- class ErrorData < DataType
52
- def self.load_members
53
- object_of :errorId, Integer
54
- object_of :domain, String
55
- object_of :subdomain, String
56
- object_of :severity, ErrorSeverity
57
- object_of :category, ErrorCategory
58
- object_of :message, String
59
- object_of :exceptionId, String
60
- array_of :parameter, ErrorParameter
61
- end
62
- end
63
-
64
-
65
-
66
- class ErrorParameter < DataType
67
- def self.load_members
68
- add_attribute :name, :required => true
69
- object_of :value, String, :required => true
70
- end
71
- end
72
-
73
-
74
-
75
- # This specifies a fault, encapsulating error data, with specific error codes.
76
- class FaultMessage < DataType
77
- def self.load_members
78
- include ResponseStatus
79
- object_of :responseEnvelope, ResponseEnvelope, :required => true
80
- array_of :error, ErrorData
81
- end
82
- end
83
-
84
-
85
-
86
- # This specifies the list of parameters with every request to the service.
87
- class RequestEnvelope < DataType
88
- def self.load_members
89
- # 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.
90
- object_of :detailLevel, DetailLevelCode
91
- # This should be the standard RFC 3066 language identification tag, e.g., en_US.
92
- object_of :errorLanguage, String
93
- end
94
- end
95
-
96
-
97
-
98
- # This specifies a list of parameters with every response from a service.
99
- class ResponseEnvelope < DataType
100
- def self.load_members
101
- object_of :timestamp, DateTime, :required => true
102
- # Application level acknowledgment code.
103
- object_of :ack, AckCode, :required => true
104
- object_of :correlationId, String, :required => true
105
- object_of :build, String, :required => true
106
- end
107
- end
108
-
109
-
110
-
111
- # 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.
112
- class AckCode < EnumType
113
- self.options = { 'SUCCESS' => 'Success', 'FAILURE' => 'Failure', 'WARNING' => 'Warning', 'SUCCESSWITHWARNING' => 'SuccessWithWarning', 'FAILUREWITHWARNING' => 'FailureWithWarning' }
114
- end
115
-
116
-
117
-
118
- # DetailLevelCodeType
119
- class DetailLevelCode < EnumType
120
- self.options = { 'RETURNALL' => 'ReturnAll' }
121
- end
122
-
123
-
124
-
125
- class ErrorCategory < EnumType
126
- self.options = { 'SYSTEM' => 'System', 'APPLICATION' => 'Application', 'REQUEST' => 'Request' }
127
- end
128
-
129
-
130
-
131
- class ErrorSeverity < EnumType
132
- self.options = { 'ERROR' => 'Error', 'WARNING' => 'Warning' }
133
- end
134
-
135
-
136
-
137
- # Specifies the payment terms for this invoice.
138
- class PaymentTermsType < EnumType
139
- self.options = { 'DUEONRECEIPT' => 'DueOnReceipt', 'DUEONDATESPECIFIED' => 'DueOnDateSpecified', 'NET1' => 'Net10', 'NET2' => 'Net15', 'NET3' => 'Net30', 'NET4' => 'Net45' }
140
- end
141
-
142
-
143
-
144
- # Specifies the payment methods that can be used to mark an invoice as paid.
145
- class PaymentMethodsType < EnumType
146
- self.options = { 'BANKTRANSFER' => 'BankTransfer', 'CASH' => 'Cash', 'CHECK' => 'Check', 'CREDITCARD' => 'CreditCard', 'DEBITCARD' => 'DebitCard', 'OTHER' => 'Other', 'PAYPAL' => 'PayPal', 'WIRETRANSFER' => 'WireTransfer' }
147
- end
148
-
149
-
150
-
151
- # Specifies the invoice status.
152
- class StatusType < EnumType
153
- self.options = { 'DRAFT' => 'Draft', 'SENT' => 'Sent', 'PAID' => 'Paid', 'MARKEDASPAID' => 'MarkedAsPaid', 'CANCELED' => 'Canceled', 'REFUNDED' => 'Refunded', 'PARTIALLYREFUNDED' => 'PartiallyRefunded', 'MARKEDASREFUNDED' => 'MarkedAsRefunded' }
154
- end
155
-
156
-
157
-
158
- # Specifies the merchant or payer.
159
- class OriginType < EnumType
160
- self.options = { 'WEB' => 'Web', 'API' => 'API' }
161
- end
162
-
163
-
164
-
165
- # Specifies the merchant or payer.
166
- class ActorType < EnumType
167
- self.options = { 'MERCHANT' => 'Merchant', 'PAYER' => 'Payer' }
168
- end
169
-
170
-
171
-
172
- # Contact information for a company participating in the invoicing system.
173
- class BusinessInfoType < DataType
174
- def self.load_members
175
- # First name of the company contact.
176
- object_of :firstName, String
177
- # Last name of the company contact.
178
- object_of :lastName, String
179
- # Business name of the company.
180
- object_of :businessName, String
181
- # Phone number for contacting the company.
182
- object_of :phone, String
183
- # Fax number used by the company.
184
- object_of :fax, String
185
- # Website used by the company.
186
- object_of :website, String
187
- # Tax ID of the merchant.
188
- object_of :taxId, String
189
- # Custom value to be displayed in the contact information details.
190
- object_of :customValue, String
191
- # Street address of the company.
192
- object_of :address, BaseAddress
193
- end
194
- end
195
-
196
-
197
-
198
- # Item information about a service or product listed in the invoice.
199
- class InvoiceItemType < DataType
200
- def self.load_members
201
- # SKU or item name.
202
- object_of :name, String, :required => true
203
- # Description of the item.
204
- object_of :description, String
205
- # Date on which the product or service was provided.
206
- object_of :date, DateTime
207
- # Item count.
208
- object_of :quantity, Float, :required => true
209
- # Price of the item, in the currency specified by the invoice.
210
- object_of :unitPrice, Float, :required => true
211
- # Name of an applicable tax, if any.
212
- object_of :taxName, String
213
- # Rate of an applicable tax, if any.
214
- object_of :taxRate, Float
215
- end
216
- end
217
-
218
-
219
-
220
- # A list of invoice items.
221
- class InvoiceItemListType < DataType
222
- def self.load_members
223
- array_of :item, InvoiceItemType, :required => true
224
- end
225
- end
226
-
227
-
228
-
229
- # Invoice details about the merchant, payer, totals and terms.
230
- class InvoiceType < DataType
231
- def self.load_members
232
- # Merchant's email.
233
- object_of :merchantEmail, String, :required => true
234
- # Email to which the invoice will be sent.
235
- object_of :payerEmail, String, :required => true
236
- # Unique identifier for the invoice.
237
- object_of :number, String
238
- # Company contact information of the merchant company sending the invoice.
239
- object_of :merchantInfo, BusinessInfoType
240
- # List of items included in this invoice.
241
- object_of :itemList, InvoiceItemListType, :required => true
242
- # If True, indicates tax calculated after discount. Default is False.
243
- object_of :taxCalculatedAfterDiscount, Boolean
244
- # Currency used for all invoice item amounts and totals.
245
- object_of :currencyCode, String, :required => true
246
- # Date on which the invoice will be enabled.
247
- object_of :invoiceDate, DateTime
248
- # Date on which the invoice payment is due.
249
- object_of :dueDate, DateTime
250
- # Terms by which the invoice payment is due.
251
- object_of :paymentTerms, PaymentTermsType, :required => true
252
- # A discount percent applied to the invoice, if any.
253
- object_of :discountPercent, Float
254
- # A discount amount applied to the invoice, if any. If DiscountPercent is provided, DiscountAmount is ignored.
255
- object_of :discountAmount, Float
256
- # If true, indicates tax included in item amount. If present, this setting will supersede the merchant’s default setting.
257
- object_of :taxInclusive, Boolean
258
- # General terms for the invoice.
259
- object_of :terms, String
260
- # Note to the payer company.
261
- object_of :note, String
262
- # Memo for book keeping that is private to the Merchant.
263
- object_of :merchantMemo, String
264
- # Details of the receipt. Applicable only when invoice is a receipt.
265
- object_of :receiptDetails, String
266
- # Billing information for the payer.
267
- object_of :billingInfo, BusinessInfoType
268
- # Shipping information for the payer.
269
- object_of :shippingInfo, BusinessInfoType
270
- # Cost of shipping.
271
- object_of :shippingAmount, Float
272
- # Name of the applicable tax on shipping cost, if any.
273
- object_of :shippingTaxName, String
274
- # Rate of the applicable tax on shipping cost, if any.
275
- object_of :shippingTaxRate, Float
276
- # The external image URL of the invoice's logo, if any
277
- object_of :logoUrl, String
278
- # BN code for tracking transactions with a particular partner.
279
- object_of :referrerCode, String
280
- # Label used to display custom amount value. If a value is entered for customAmountLabel, then customAmountValue cannot be empty.
281
- object_of :customAmountLabel, String
282
- # Value of custom amount. If a value is entered for customAmountValue, then customAmountLabel cannot be empty.
283
- object_of :customAmountValue, Float
284
- end
285
- end
286
-
287
-
288
-
289
- # Invoice details about the invoice status and state change dates.
290
- class InvoiceDetailsType < DataType
291
- def self.load_members
292
- # Status of the invoice.
293
- object_of :status, StatusType, :required => true
294
- # The total amount of the invoice (cost of items, shipping and tax, less any discount). This field is set by the invoicing system and will ignore any changes made by API callers.
295
- object_of :totalAmount, Float
296
- # Whether the invoice was created via the website or via an API call.
297
- object_of :origin, OriginType, :required => true
298
- # Date when the invoice was created.
299
- object_of :createdDate, DateTime, :required => true
300
- # Account that created the invoice.
301
- object_of :createdBy, String
302
- # If canceled, date when the invoice was canceled.
303
- object_of :canceledDate, DateTime
304
- # Actor who canceled the invoice.
305
- object_of :canceledByActor, ActorType
306
- # Account that canceled the invoice.
307
- object_of :canceledBy, String
308
- # Date when the invoice was last edited.
309
- object_of :lastUpdatedDate, DateTime
310
- # Account that last edited the invoice.
311
- object_of :lastUpdatedBy, String
312
- # Date when the invoice was first sent.
313
- object_of :firstSentDate, DateTime
314
- # Date when the invoice was last sent.
315
- object_of :lastSentDate, DateTime
316
- # Account that last sent the invoice.
317
- object_of :lastSentBy, String
318
- # If the invoice was paid, date when the invoice was paid.
319
- object_of :paidDate, DateTime
320
- end
321
- end
322
-
323
-
324
-
325
- # Details of the refund made against this invoice.
326
- class OtherPaymentRefundDetailsType < DataType
327
- def self.load_members
328
- # Optional note associated with the refund.
329
- object_of :note, String
330
- # Date when the invoice was marked as refunded. If the date is not specified, the current date and time is used as a default. In addition, the date must be after the payment date of the invoice.
331
- object_of :date, DateTime
332
- end
333
- end
334
-
335
-
336
-
337
- # Details of the paypal refund made against this invoice.
338
- class PayPalPaymentRefundDetailsType < DataType
339
- def self.load_members
340
- # Date when the invoice was marked as refunded by PayPal.
341
- object_of :date, DateTime
342
- end
343
- end
344
-
345
-
346
-
347
- # PayPal payment details about the invoice.
348
- class PayPalPaymentDetailsType < DataType
349
- def self.load_members
350
- # Transaction ID of the PayPal payment.
351
- object_of :transactionID, String, :required => true
352
- # Date when the invoice was paid.
353
- object_of :date, DateTime
354
- end
355
- end
356
-
357
-
358
-
359
- # Offline payment details about the invoice.
360
- class OtherPaymentDetailsType < DataType
361
- def self.load_members
362
- # Method used for the offline payment.
363
- object_of :method, PaymentMethodsType
364
- # Optional note associated with the payment.
365
- object_of :note, String
366
- # Date when the invoice was paid.
367
- object_of :date, DateTime
368
- end
369
- end
370
-
371
-
372
-
373
- # Payment details about the invoice.
374
- class PaymentDetailsType < DataType
375
- def self.load_members
376
- # True if the invoice was paid using PayPal.
377
- object_of :viaPayPal, Boolean, :required => true
378
- # PayPal payment details.
379
- object_of :paypalPayment, PayPalPaymentDetailsType
380
- # Other payment details.
381
- object_of :otherPayment, OtherPaymentDetailsType
382
- end
383
- end
384
-
385
-
386
-
387
- # Determines an inclusive date range.
388
- class DateRangeType < DataType
389
- def self.load_members
390
- # Start of the date range.
391
- object_of :startDate, DateTime
392
- # End of the date range.
393
- object_of :endDate, DateTime
394
- end
395
- end
396
-
397
-
398
-
399
- # Search parameters criteria.
400
- class SearchParametersType < DataType
401
- def self.load_members
402
- # Email search string.
403
- object_of :email, String
404
- # Recipient search string.
405
- object_of :recipientName, String
406
- # Company search string.
407
- object_of :businessName, String
408
- # Invoice number search string.
409
- object_of :invoiceNumber, String
410
- # Invoice status search.
411
- array_of :status, StatusType
412
- # Invoice amount search. Specifies the smallest amount to be returned.
413
- object_of :lowerAmount, Float
414
- # Invoice amount search. Specifies the largest amount to be returned.
415
- object_of :upperAmount, Float
416
- # Currency used for lower and upper amounts. Required when lowerAmount or upperAmount is specified.
417
- object_of :currencyCode, String
418
- # Invoice memo search string.
419
- object_of :memo, String
420
- # Whether the invoice was created via the website or via an API call.
421
- object_of :origin, OriginType
422
- # Invoice date range filter.
423
- object_of :invoiceDate, DateRangeType
424
- # Invoice due date range filter.
425
- object_of :dueDate, DateRangeType
426
- # Invoice payment date range filter.
427
- object_of :paymentDate, DateRangeType
428
- # Invoice creation date range filter.
429
- object_of :creationDate, DateRangeType
430
- end
431
- end
432
-
433
-
434
-
435
- # Summary of invoice information.
436
- class InvoiceSummaryType < DataType
437
- def self.load_members
438
- # The created invoice's ID.
439
- object_of :invoiceID, String, :required => true
440
- # Invoice creator's email.
441
- object_of :merchantEmail, String, :required => true
442
- # Email to which the invoice will be sent.
443
- object_of :payerEmail, String, :required => true
444
- # Unique identifier for the invoice.
445
- object_of :number, String, :required => true
446
- # Business name of the billing info.
447
- object_of :billingBusinessName, String
448
- # First name of the billing info.
449
- object_of :billingFirstName, String
450
- # Last name of the billing info.
451
- object_of :billingLastName, String
452
- # Business name of the shipping info.
453
- object_of :shippingBusinessName, String
454
- # First name of the shipping info.
455
- object_of :shippingFirstName, String
456
- # Last name of the shipping info.
457
- object_of :shippingLastName, String
458
- # Total amount of the invoice.
459
- object_of :totalAmount, Float, :required => true
460
- # Currency used for all invoice item amounts and totals.
461
- object_of :currencyCode, String, :required => true
462
- # Date on which the invoice will be enabled.
463
- object_of :invoiceDate, DateTime, :required => true
464
- # Date on which the invoice payment is due.
465
- object_of :dueDate, DateTime, :required => true
466
- # Status of the invoice.
467
- object_of :status, StatusType, :required => true
468
- # Whether the invoice was created via the website or via an API call.
469
- object_of :origin, OriginType, :required => true
470
- # BN code for tracking transactions with a particular partner.
471
- object_of :referrerCode, String
472
- end
473
- end
474
-
475
-
476
-
477
- # A list of invoice summaries.
478
- class InvoiceSummaryListType < DataType
479
- def self.load_members
480
- array_of :invoice, InvoiceSummaryType
481
- end
482
- end
483
-
484
-
485
-
486
- # The request object for CreateInvoice.
487
- class CreateInvoiceRequest < DataType
488
- def self.load_members
489
- object_of :requestEnvelope, RequestEnvelope, :required => true
490
- # Data to populate the newly created invoice.
491
- object_of :invoice, InvoiceType, :required => true
492
- end
493
- end
494
-
495
-
496
-
497
- # The response object for CreateInvoice.
498
- class CreateInvoiceResponse < DataType
499
- def self.load_members
500
- include ResponseStatus
501
- object_of :responseEnvelope, ResponseEnvelope, :required => true
502
- # The created invoice's ID.
503
- object_of :invoiceID, String, :required => true
504
- # The created invoice's number.
505
- object_of :invoiceNumber, String, :required => true
506
- # The URL which lead merchant to view the invoice details on web.
507
- object_of :invoiceURL, String, :required => true
508
- # The total amount of the invoice (cost of items, shipping and tax, less any discount).
509
- object_of :totalAmount, Integer, :required => true
510
- array_of :error, ErrorData
511
- end
512
- end
513
-
514
-
515
-
516
- # The request object for SendInvoice.
517
- class SendInvoiceRequest < DataType
518
- def self.load_members
519
- object_of :requestEnvelope, RequestEnvelope, :required => true
520
- # ID of the invoice to send.
521
- object_of :invoiceID, String, :required => true
522
- end
523
- end
524
-
525
-
526
-
527
- # The response object for SendInvoice.
528
- class SendInvoiceResponse < DataType
529
- def self.load_members
530
- include ResponseStatus
531
- object_of :responseEnvelope, ResponseEnvelope, :required => true
532
- # The sent invoice's ID.
533
- object_of :invoiceID, String, :required => true
534
- # The URL which lead merchant to view the invoice details on web.
535
- object_of :invoiceURL, String, :required => true
536
- array_of :error, ErrorData
537
- end
538
- end
539
-
540
-
541
-
542
- # The request object for CreateAndSendInvoice.
543
- class CreateAndSendInvoiceRequest < DataType
544
- def self.load_members
545
- object_of :requestEnvelope, RequestEnvelope, :required => true
546
- # Data to populate the newly created invoice.
547
- object_of :invoice, InvoiceType, :required => true
548
- end
549
- end
550
-
551
-
552
-
553
- # The response object for CreateAndSendInvoice.
554
- class CreateAndSendInvoiceResponse < DataType
555
- def self.load_members
556
- include ResponseStatus
557
- object_of :responseEnvelope, ResponseEnvelope, :required => true
558
- # The created invoice's ID.
559
- object_of :invoiceID, String, :required => true
560
- # The created invoice's number.
561
- object_of :invoiceNumber, String, :required => true
562
- # The URL which lead merchant to view the invoice details on web.
563
- object_of :invoiceURL, String, :required => true
564
- # The total amount of the invoice (cost of items, shipping and tax, less any discount).
565
- object_of :totalAmount, Integer, :required => true
566
- array_of :error, ErrorData
567
- end
568
- end
569
-
570
-
571
-
572
- # The request object for UpdateInvoice.
573
- class UpdateInvoiceRequest < DataType
574
- def self.load_members
575
- object_of :requestEnvelope, RequestEnvelope, :required => true
576
- # invoice's ID
577
- object_of :invoiceID, String, :required => true
578
- # Data to populate the newly created invoice.
579
- object_of :invoice, InvoiceType, :required => true
580
- end
581
- end
582
-
583
-
584
-
585
- # The response object for UpdateInvoice.
586
- class UpdateInvoiceResponse < DataType
587
- def self.load_members
588
- include ResponseStatus
589
- object_of :responseEnvelope, ResponseEnvelope, :required => true
590
- # The invoice's ID.
591
- object_of :invoiceID, String, :required => true
592
- # The updated invoice's number.
593
- object_of :invoiceNumber, String, :required => true
594
- # The URL which lead merchant to view the invoice details on web.
595
- object_of :invoiceURL, String, :required => true
596
- # The total amount of the invoice (cost of items, shipping and tax, less any discount).
597
- object_of :totalAmount, Integer, :required => true
598
- array_of :error, ErrorData
599
- end
600
- end
601
-
602
-
603
-
604
- # The request object for GetInvoiceDetails.
605
- class GetInvoiceDetailsRequest < DataType
606
- def self.load_members
607
- object_of :requestEnvelope, RequestEnvelope, :required => true
608
- # ID of the invoice to retrieve.
609
- object_of :invoiceID, String, :required => true
610
- end
611
- end
612
-
613
-
614
-
615
- # The response object for CreateInvoice.
616
- class GetInvoiceDetailsResponse < DataType
617
- def self.load_members
618
- include ResponseStatus
619
- object_of :responseEnvelope, ResponseEnvelope, :required => true
620
- # The requested invoice.
621
- object_of :invoice, InvoiceType, :required => true
622
- # The requested invoice details.
623
- object_of :invoiceDetails, InvoiceDetailsType, :required => true
624
- # The requested invoice payment details.
625
- object_of :paymentDetails, PaymentDetailsType
626
- # The requested invoice refund details.
627
- object_of :refundDetails, PaymentRefundDetailsType
628
- # The URL which lead merchant to view the invoice details on web.
629
- object_of :invoiceURL, String, :required => true
630
- array_of :error, ErrorData
631
- end
632
- end
633
-
634
-
635
-
636
- # The request object for CancelInvoice.
637
- class CancelInvoiceRequest < DataType
638
- def self.load_members
639
- object_of :requestEnvelope, RequestEnvelope, :required => true
640
- # invoice's ID
641
- object_of :invoiceID, String
642
- # Subject of the cancellation notification
643
- object_of :subject, String
644
- # Note to send payer within the cancellation notification
645
- object_of :noteForPayer, String
646
- # send a copy of cancellation notification to merchant
647
- object_of :sendCopyToMerchant, Boolean
648
- end
649
- end
650
-
651
-
652
-
653
- # The response object for CancelInvoice.
654
- class CancelInvoiceResponse < DataType
655
- def self.load_members
656
- include ResponseStatus
657
- object_of :responseEnvelope, ResponseEnvelope, :required => true
658
- # The canceled invoice's ID.
659
- object_of :invoiceID, String, :required => true
660
- # The canceled invoice's number.
661
- object_of :invoiceNumber, String, :required => true
662
- # The URL which lead merchant to view the invoice details on web.
663
- object_of :invoiceURL, String, :required => true
664
- array_of :error, ErrorData
665
- end
666
- end
667
-
668
-
669
-
670
- # The request object for SearchInvoices.
671
- class SearchInvoicesRequest < DataType
672
- def self.load_members
673
- object_of :requestEnvelope, RequestEnvelope, :required => true
674
- # Invoice creator's email.
675
- object_of :merchantEmail, String, :required => true
676
- # Parameters constraining the search.
677
- object_of :parameters, SearchParametersType, :required => true
678
- # Page number of result set, starting with 1.
679
- object_of :page, Integer, :required => true
680
- # Number of results per page, between 1 and 100.
681
- object_of :pageSize, Integer, :required => true
682
- end
683
- end
684
-
685
-
686
-
687
- # The response object for SearchInvoices.
688
- class SearchInvoicesResponse < DataType
689
- def self.load_members
690
- include ResponseStatus
691
- object_of :responseEnvelope, ResponseEnvelope, :required => true
692
- # Number of invoices that matched the search.
693
- object_of :count, Integer, :required => true
694
- # Page of invoice summaries that matched the search.
695
- object_of :invoiceList, InvoiceSummaryListType
696
- # Page number of result set.
697
- object_of :page, Integer, :required => true
698
- # True if another page of invoice summary results exists.
699
- object_of :hasNextPage, Boolean, :required => true
700
- # True if a previous page of invoice summary results exists.
701
- object_of :hasPreviousPage, Boolean, :required => true
702
- array_of :error, ErrorData
703
- end
704
- end
705
-
706
-
707
-
708
- # The request object for MarkInvoiceAsPaid.
709
- class MarkInvoiceAsPaidRequest < DataType
710
- def self.load_members
711
- object_of :requestEnvelope, RequestEnvelope, :required => true
712
- # ID of the invoice to mark as paid.
713
- object_of :invoiceID, String, :required => true
714
- # Details of the payment made against this invoice.
715
- object_of :payment, OtherPaymentDetailsType, :required => true
716
- end
717
- end
718
-
719
-
720
-
721
- # The response object for MarkInvoiceAsPaid.
722
- class MarkInvoiceAsPaidResponse < DataType
723
- def self.load_members
724
- include ResponseStatus
725
- object_of :responseEnvelope, ResponseEnvelope, :required => true
726
- # The paid invoice ID.
727
- object_of :invoiceID, String, :required => true
728
- # The paid invoice number.
729
- object_of :invoiceNumber, String, :required => true
730
- # The URL which lead merchant to view the invoice details on web.
731
- object_of :invoiceURL, String, :required => true
732
- array_of :error, ErrorData
733
- end
734
- end
735
-
736
-
737
-
738
- # The request object for MarkInvoiceAsRefunded.
739
- class MarkInvoiceAsRefundedRequest < DataType
740
- def self.load_members
741
- object_of :requestEnvelope, RequestEnvelope, :required => true
742
- # ID of the invoice to mark as refunded.
743
- object_of :invoiceID, String, :required => true
744
- # Details of the refund made against this invoice.
745
- object_of :refundDetail, OtherPaymentRefundDetailsType, :required => true
746
- end
747
- end
748
-
749
-
750
-
751
- # The response object for MarkInvoiceAsRefunded.
752
- class MarkInvoiceAsRefundedResponse < DataType
753
- def self.load_members
754
- include ResponseStatus
755
- object_of :responseEnvelope, ResponseEnvelope, :required => true
756
- # The invoice ID of the invoice that was marked as refunded.
757
- object_of :invoiceID, String, :required => true
758
- # The invoice number of the invoice that was marked as refunded.
759
- object_of :invoiceNumber, String, :required => true
760
- # The URL of the details page of the invoice that was marked as refunded.
761
- object_of :invoiceURL, String, :required => true
762
- array_of :error, ErrorData
763
- end
764
- end
765
-
766
-
767
-
768
- # The request object for MarkInvoiceAsUnpaid.
769
- class MarkInvoiceAsUnpaidRequest < DataType
770
- def self.load_members
771
- object_of :requestEnvelope, RequestEnvelope, :required => true
772
- # ID of the invoice to mark as unpaid.
773
- object_of :invoiceID, String, :required => true
774
- end
775
- end
776
-
777
-
778
-
779
- # The response object for MarkInvoiceAsUnpaid.
780
- class MarkInvoiceAsUnpaidResponse < DataType
781
- def self.load_members
782
- include ResponseStatus
783
- object_of :responseEnvelope, ResponseEnvelope, :required => true
784
- # The invoice ID of the invoice that was marked as unpaid.
785
- object_of :invoiceID, String, :required => true
786
- # The invoice number of the invoice that was marked as unpaid.
787
- object_of :invoiceNumber, String, :required => true
788
- # The URL of the details page of the invoice that was marked as unpaid.
789
- object_of :invoiceURL, String, :required => true
790
- array_of :error, ErrorData
791
- end
792
- end
793
-
794
-
795
-
796
- # Payment refund details about the invoice.
797
- class PaymentRefundDetailsType < DataType
798
- def self.load_members
799
- # True if the invoice was refunded using PayPal.
800
- object_of :viaPayPal, Boolean, :required => true
801
- # Other payment refund details.
802
- object_of :paypalPayment, PayPalPaymentRefundDetailsType
803
- # details.
804
- object_of :otherPayment, OtherPaymentRefundDetailsType
805
- end
806
- end
807
-
808
-
809
-
810
- # The request object for DeleteInvoice.
811
- class DeleteInvoiceRequest < DataType
812
- def self.load_members
813
- object_of :requestEnvelope, RequestEnvelope, :required => true
814
- # ID of the invoice to be deleted.
815
- object_of :invoiceID, String, :required => true
816
- end
817
- end
818
-
819
-
820
-
821
- # The response object for DeleteInvoice.
822
- class DeleteInvoiceResponse < DataType
823
- def self.load_members
824
- include ResponseStatus
825
- object_of :responseEnvelope, ResponseEnvelope, :required => true
826
- array_of :error, ErrorData
827
- end
828
- end
829
-
830
-
831
-
832
-
833
-
834
- constants.each do |data_type_klass|
835
- data_type_klass = const_get(data_type_klass)
836
- data_type_klass.load_members if defined? data_type_klass.load_members
837
- end
838
-
839
- end
840
- end
841
- end
1
+ # Stub objects for Invoice
2
+ # Auto generated code
3
+
4
+ require 'paypal-sdk-core'
5
+
6
+ module PayPal::SDK
7
+ module Invoice
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 BaseAddress < DataType
37
+ def self.load_members
38
+ object_of :line1, String, :required => true
39
+ object_of :line2, String
40
+ object_of :city, String, :required => true
41
+ object_of :state, String
42
+ object_of :postalCode, String
43
+ object_of :countryCode, String, :required => true
44
+ object_of :type, String
45
+ end
46
+ end
47
+
48
+
49
+
50
+ # This type contains the detailed error information resulting from the service operation.
51
+ class ErrorData < DataType
52
+ def self.load_members
53
+ object_of :errorId, Integer
54
+ object_of :domain, String
55
+ object_of :subdomain, String
56
+ object_of :severity, ErrorSeverity
57
+ object_of :category, ErrorCategory
58
+ object_of :message, String
59
+ object_of :exceptionId, String
60
+ array_of :parameter, ErrorParameter
61
+ end
62
+ end
63
+
64
+
65
+
66
+ class ErrorParameter < DataType
67
+ def self.load_members
68
+ add_attribute :name, :required => true
69
+ object_of :value, String, :required => true
70
+ end
71
+ end
72
+
73
+
74
+
75
+ # This specifies a fault, encapsulating error data, with specific error codes.
76
+ class FaultMessage < DataType
77
+ def self.load_members
78
+ include ResponseStatus
79
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
80
+ array_of :error, ErrorData
81
+ end
82
+ end
83
+
84
+
85
+
86
+ # This specifies the list of parameters with every request to the service.
87
+ class RequestEnvelope < DataType
88
+ def self.load_members
89
+ # 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.
90
+ object_of :detailLevel, DetailLevelCode
91
+ # This should be the standard RFC 3066 language identification tag, e.g., en_US.
92
+ object_of :errorLanguage, String
93
+ end
94
+ end
95
+
96
+
97
+
98
+ # This specifies a list of parameters with every response from a service.
99
+ class ResponseEnvelope < DataType
100
+ def self.load_members
101
+ object_of :timestamp, DateTime, :required => true
102
+ # Application level acknowledgment code.
103
+ object_of :ack, AckCode, :required => true
104
+ object_of :correlationId, String, :required => true
105
+ object_of :build, String, :required => true
106
+ end
107
+ end
108
+
109
+
110
+
111
+ # 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.
112
+ class AckCode < EnumType
113
+ self.options = { 'SUCCESS' => 'Success', 'FAILURE' => 'Failure', 'WARNING' => 'Warning', 'SUCCESSWITHWARNING' => 'SuccessWithWarning', 'FAILUREWITHWARNING' => 'FailureWithWarning' }
114
+ end
115
+
116
+
117
+
118
+ # DetailLevelCodeType
119
+ class DetailLevelCode < EnumType
120
+ self.options = { 'RETURNALL' => 'ReturnAll' }
121
+ end
122
+
123
+
124
+
125
+ class ErrorCategory < EnumType
126
+ self.options = { 'SYSTEM' => 'System', 'APPLICATION' => 'Application', 'REQUEST' => 'Request' }
127
+ end
128
+
129
+
130
+
131
+ class ErrorSeverity < EnumType
132
+ self.options = { 'ERROR' => 'Error', 'WARNING' => 'Warning' }
133
+ end
134
+
135
+
136
+
137
+ # Specifies the payment terms for this invoice.
138
+ class PaymentTermsType < EnumType
139
+ self.options = { 'NODUEDATE' => 'NoDueDate', 'DUEONRECEIPT' => 'DueOnReceipt', 'DUEONDATESPECIFIED' => 'DueOnDateSpecified', 'NET1' => 'Net10', 'NET2' => 'Net15', 'NET3' => 'Net30', 'NET4' => 'Net45' }
140
+ end
141
+
142
+
143
+
144
+ # Specifies the payment methods that can be used to mark an invoice as paid.
145
+ class PaymentMethodsType < EnumType
146
+ self.options = { 'BANKTRANSFER' => 'BankTransfer', 'CASH' => 'Cash', 'CHECK' => 'Check', 'CREDITCARD' => 'CreditCard', 'DEBITCARD' => 'DebitCard', 'OTHER' => 'Other', 'PAYPAL' => 'PayPal', 'WIRETRANSFER' => 'WireTransfer' }
147
+ end
148
+
149
+
150
+
151
+ # Specifies the invoice status.
152
+ class StatusType < EnumType
153
+ self.options = { 'DRAFT' => 'Draft', 'SENT' => 'Sent', 'PAID' => 'Paid', 'MARKEDASPAID' => 'MarkedAsPaid', 'CANCELED' => 'Canceled', 'REFUNDED' => 'Refunded', 'PARTIALLYREFUNDED' => 'PartiallyRefunded', 'MARKEDASREFUNDED' => 'MarkedAsRefunded' }
154
+ end
155
+
156
+
157
+
158
+ # Specifies the merchant or payer.
159
+ class OriginType < EnumType
160
+ self.options = { 'WEB' => 'Web', 'API' => 'API' }
161
+ end
162
+
163
+
164
+
165
+ # Specifies the merchant or payer.
166
+ class ActorType < EnumType
167
+ self.options = { 'MERCHANT' => 'Merchant', 'PAYER' => 'Payer' }
168
+ end
169
+
170
+
171
+
172
+ # Contact information for a company participating in the invoicing system.
173
+ class BusinessInfoType < DataType
174
+ def self.load_members
175
+ # First name of the company contact.
176
+ object_of :firstName, String
177
+ # Last name of the company contact.
178
+ object_of :lastName, String
179
+ # Business name of the company.
180
+ object_of :businessName, String
181
+ # Phone number for contacting the company.
182
+ object_of :phone, String
183
+ # Fax number used by the company.
184
+ object_of :fax, String
185
+ # Website used by the company.
186
+ object_of :website, String
187
+ # Tax ID of the merchant.
188
+ object_of :taxId, String
189
+ # Custom value to be displayed in the contact information details.
190
+ object_of :customValue, String
191
+ # Street address of the company.
192
+ object_of :address, BaseAddress
193
+ end
194
+ end
195
+
196
+
197
+
198
+ # Item information about a service or product listed in the invoice.
199
+ class InvoiceItemType < DataType
200
+ def self.load_members
201
+ # SKU or item name.
202
+ object_of :name, String, :required => true
203
+ # Description of the item.
204
+ object_of :description, String
205
+ # Date on which the product or service was provided.
206
+ object_of :date, DateTime
207
+ # Item count.
208
+ object_of :quantity, Float, :required => true
209
+ # Price of the item, in the currency specified by the invoice.
210
+ object_of :unitPrice, Float, :required => true
211
+ # Name of an applicable tax, if any.
212
+ object_of :taxName, String
213
+ # Rate of an applicable tax, if any.
214
+ object_of :taxRate, Float
215
+ end
216
+ end
217
+
218
+
219
+
220
+ # A list of invoice items.
221
+ class InvoiceItemListType < DataType
222
+ def self.load_members
223
+ array_of :item, InvoiceItemType, :required => true
224
+ end
225
+ end
226
+
227
+
228
+
229
+ # Invoice details about the merchant, payer, totals and terms.
230
+ class InvoiceType < DataType
231
+ def self.load_members
232
+ # Merchant's email.
233
+ object_of :merchantEmail, String, :required => true
234
+ # Email to which the invoice will be sent.
235
+ object_of :payerEmail, String, :required => true
236
+ # Unique identifier for the invoice.
237
+ object_of :number, String
238
+ # Company contact information of the merchant company sending the invoice.
239
+ object_of :merchantInfo, BusinessInfoType
240
+ # List of items included in this invoice.
241
+ object_of :itemList, InvoiceItemListType, :required => true
242
+ # If True, indicates tax calculated after discount. Default is False.
243
+ object_of :taxCalculatedAfterDiscount, Boolean
244
+ # Currency used for all invoice item amounts and totals.
245
+ object_of :currencyCode, String, :required => true
246
+ # Date on which the invoice will be enabled.
247
+ object_of :invoiceDate, DateTime
248
+ # Date on which the invoice payment is due.
249
+ object_of :dueDate, DateTime
250
+ # Terms by which the invoice payment is due.
251
+ object_of :paymentTerms, PaymentTermsType
252
+ # A discount percent applied to the invoice, if any.
253
+ object_of :discountPercent, Float
254
+ # A discount amount applied to the invoice, if any. If DiscountPercent is provided, DiscountAmount is ignored.
255
+ object_of :discountAmount, Float
256
+ # If true, indicates tax included in item amount. If present, this setting will supersede the merchant’s default setting.
257
+ object_of :taxInclusive, Boolean
258
+ # General terms for the invoice.
259
+ object_of :terms, String
260
+ # Note to the payer company.
261
+ object_of :note, String
262
+ # Memo for book keeping that is private to the Merchant.
263
+ object_of :merchantMemo, String
264
+ # Details of the receipt. Applicable only when invoice is a receipt.
265
+ object_of :receiptDetails, String
266
+ # Billing information for the payer.
267
+ object_of :billingInfo, BusinessInfoType
268
+ # Shipping information for the payer.
269
+ object_of :shippingInfo, BusinessInfoType
270
+ # Cost of shipping.
271
+ object_of :shippingAmount, Float
272
+ # Name of the applicable tax on shipping cost, if any.
273
+ object_of :shippingTaxName, String
274
+ # Rate of the applicable tax on shipping cost, if any.
275
+ object_of :shippingTaxRate, Float
276
+ # The external image URL of the invoice's logo, if any
277
+ object_of :logoUrl, String
278
+ # BN code for tracking transactions with a particular partner.
279
+ object_of :referrerCode, String
280
+ # Label used to display custom amount value. If a value is entered for customAmountLabel, then customAmountValue cannot be empty.
281
+ object_of :customAmountLabel, String
282
+ # Value of custom amount. If a value is entered for customAmountValue, then customAmountLabel cannot be empty.
283
+ object_of :customAmountValue, Float
284
+ end
285
+ end
286
+
287
+
288
+
289
+ # Invoice details about the invoice status and state change dates.
290
+ class InvoiceDetailsType < DataType
291
+ def self.load_members
292
+ # Status of the invoice.
293
+ object_of :status, StatusType, :required => true
294
+ # The total amount of the invoice (cost of items, shipping and tax, less any discount). This field is set by the invoicing system and will ignore any changes made by API callers.
295
+ object_of :totalAmount, Float
296
+ # Whether the invoice was created via the website or via an API call.
297
+ object_of :origin, OriginType, :required => true
298
+ # Date when the invoice was created.
299
+ object_of :createdDate, DateTime, :required => true
300
+ # Account that created the invoice.
301
+ object_of :createdBy, String
302
+ # If canceled, date when the invoice was canceled.
303
+ object_of :canceledDate, DateTime
304
+ # Actor who canceled the invoice.
305
+ object_of :canceledByActor, ActorType
306
+ # Account that canceled the invoice.
307
+ object_of :canceledBy, String
308
+ # Date when the invoice was last edited.
309
+ object_of :lastUpdatedDate, DateTime
310
+ # Account that last edited the invoice.
311
+ object_of :lastUpdatedBy, String
312
+ # Date when the invoice was first sent.
313
+ object_of :firstSentDate, DateTime
314
+ # Date when the invoice was last sent.
315
+ object_of :lastSentDate, DateTime
316
+ # Account that last sent the invoice.
317
+ object_of :lastSentBy, String
318
+ # If the invoice was paid, date when the invoice was paid.
319
+ object_of :paidDate, DateTime
320
+ end
321
+ end
322
+
323
+
324
+
325
+ # Details of the refund made against this invoice.
326
+ class OtherPaymentRefundDetailsType < DataType
327
+ def self.load_members
328
+ # Optional note associated with the refund.
329
+ object_of :note, String
330
+ # Date when the invoice was marked as refunded. If the date is not specified, the current date and time is used as a default. In addition, the date must be after the payment date of the invoice.
331
+ object_of :date, DateTime
332
+ end
333
+ end
334
+
335
+
336
+
337
+ # Details of the paypal refund made against this invoice.
338
+ class PayPalPaymentRefundDetailsType < DataType
339
+ def self.load_members
340
+ # Date when the invoice was marked as refunded by PayPal.
341
+ object_of :date, DateTime
342
+ end
343
+ end
344
+
345
+
346
+
347
+ # PayPal payment details about the invoice.
348
+ class PayPalPaymentDetailsType < DataType
349
+ def self.load_members
350
+ # Transaction ID of the PayPal payment.
351
+ object_of :transactionID, String, :required => true
352
+ # Date when the invoice was paid.
353
+ object_of :date, DateTime
354
+ end
355
+ end
356
+
357
+
358
+
359
+ # Offline payment details about the invoice.
360
+ class OtherPaymentDetailsType < DataType
361
+ def self.load_members
362
+ # Method used for the offline payment.
363
+ object_of :method, PaymentMethodsType
364
+ # Optional note associated with the payment.
365
+ object_of :note, String
366
+ # Date when the invoice was paid.
367
+ object_of :date, DateTime
368
+ end
369
+ end
370
+
371
+
372
+
373
+ # Payment details about the invoice.
374
+ class PaymentDetailsType < DataType
375
+ def self.load_members
376
+ # True if the invoice was paid using PayPal.
377
+ object_of :viaPayPal, Boolean, :required => true
378
+ # PayPal payment details.
379
+ object_of :paypalPayment, PayPalPaymentDetailsType
380
+ # Other payment details.
381
+ object_of :otherPayment, OtherPaymentDetailsType
382
+ end
383
+ end
384
+
385
+
386
+
387
+ # Determines an inclusive date range.
388
+ class DateRangeType < DataType
389
+ def self.load_members
390
+ # Start of the date range.
391
+ object_of :startDate, DateTime
392
+ # End of the date range.
393
+ object_of :endDate, DateTime
394
+ end
395
+ end
396
+
397
+
398
+
399
+ # Search parameters criteria.
400
+ class SearchParametersType < DataType
401
+ def self.load_members
402
+ # Email search string.
403
+ object_of :email, String
404
+ # Recipient search string.
405
+ object_of :recipientName, String
406
+ # Company search string.
407
+ object_of :businessName, String
408
+ # Invoice number search string.
409
+ object_of :invoiceNumber, String
410
+ # Invoice status search.
411
+ array_of :status, StatusType
412
+ # Invoice amount search. Specifies the smallest amount to be returned.
413
+ object_of :lowerAmount, Float
414
+ # Invoice amount search. Specifies the largest amount to be returned.
415
+ object_of :upperAmount, Float
416
+ # Currency used for lower and upper amounts. Required when lowerAmount or upperAmount is specified.
417
+ object_of :currencyCode, String
418
+ # Invoice memo search string.
419
+ object_of :memo, String
420
+ # Whether the invoice was created via the website or via an API call.
421
+ object_of :origin, OriginType
422
+ # Invoice date range filter.
423
+ object_of :invoiceDate, DateRangeType
424
+ # Invoice due date range filter.
425
+ object_of :dueDate, DateRangeType
426
+ # Invoice payment date range filter.
427
+ object_of :paymentDate, DateRangeType
428
+ # Invoice creation date range filter.
429
+ object_of :creationDate, DateRangeType
430
+ end
431
+ end
432
+
433
+
434
+
435
+ # Summary of invoice information.
436
+ class InvoiceSummaryType < DataType
437
+ def self.load_members
438
+ # The created invoice's ID.
439
+ object_of :invoiceID, String, :required => true
440
+ # Invoice creator's email.
441
+ object_of :merchantEmail, String, :required => true
442
+ # Email to which the invoice will be sent.
443
+ object_of :payerEmail, String, :required => true
444
+ # Unique identifier for the invoice.
445
+ object_of :number, String, :required => true
446
+ # Business name of the billing info.
447
+ object_of :billingBusinessName, String
448
+ # First name of the billing info.
449
+ object_of :billingFirstName, String
450
+ # Last name of the billing info.
451
+ object_of :billingLastName, String
452
+ # Business name of the shipping info.
453
+ object_of :shippingBusinessName, String
454
+ # First name of the shipping info.
455
+ object_of :shippingFirstName, String
456
+ # Last name of the shipping info.
457
+ object_of :shippingLastName, String
458
+ # Total amount of the invoice.
459
+ object_of :totalAmount, Float, :required => true
460
+ # Currency used for all invoice item amounts and totals.
461
+ object_of :currencyCode, String, :required => true
462
+ # Date on which the invoice will be enabled.
463
+ object_of :invoiceDate, DateTime, :required => true
464
+ # Date on which the invoice payment is due.
465
+ object_of :dueDate, DateTime, :required => true
466
+ # Status of the invoice.
467
+ object_of :status, StatusType, :required => true
468
+ # Whether the invoice was created via the website or via an API call.
469
+ object_of :origin, OriginType, :required => true
470
+ # BN code for tracking transactions with a particular partner.
471
+ object_of :referrerCode, String
472
+ end
473
+ end
474
+
475
+
476
+
477
+ # A list of invoice summaries.
478
+ class InvoiceSummaryListType < DataType
479
+ def self.load_members
480
+ array_of :invoice, InvoiceSummaryType
481
+ end
482
+ end
483
+
484
+
485
+
486
+ # The request object for CreateInvoice.
487
+ class CreateInvoiceRequest < DataType
488
+ def self.load_members
489
+ object_of :requestEnvelope, RequestEnvelope, :required => true
490
+ # Data to populate the newly created invoice.
491
+ object_of :invoice, InvoiceType, :required => true
492
+ end
493
+ end
494
+
495
+
496
+
497
+ # The response object for CreateInvoice.
498
+ class CreateInvoiceResponse < DataType
499
+ def self.load_members
500
+ include ResponseStatus
501
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
502
+ # The created invoice's ID.
503
+ object_of :invoiceID, String, :required => true
504
+ # The created invoice's number.
505
+ object_of :invoiceNumber, String, :required => true
506
+ # The URL which lead merchant to view the invoice details on web.
507
+ object_of :invoiceURL, String, :required => true
508
+ # The total amount of the invoice (cost of items, shipping and tax, less any discount).
509
+ object_of :totalAmount, Integer, :required => true
510
+ array_of :error, ErrorData
511
+ end
512
+ end
513
+
514
+
515
+
516
+ # The request object for SendInvoice.
517
+ class SendInvoiceRequest < DataType
518
+ def self.load_members
519
+ object_of :requestEnvelope, RequestEnvelope, :required => true
520
+ # ID of the invoice to send.
521
+ object_of :invoiceID, String, :required => true
522
+ end
523
+ end
524
+
525
+
526
+
527
+ # The response object for SendInvoice.
528
+ class SendInvoiceResponse < DataType
529
+ def self.load_members
530
+ include ResponseStatus
531
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
532
+ # The sent invoice's ID.
533
+ object_of :invoiceID, String, :required => true
534
+ # The URL which lead merchant to view the invoice details on web.
535
+ object_of :invoiceURL, String, :required => true
536
+ array_of :error, ErrorData
537
+ end
538
+ end
539
+
540
+
541
+
542
+ # The request object for RemindInvoice.
543
+ class RemindInvoiceRequest < DataType
544
+ def self.load_members
545
+ object_of :requestEnvelope, RequestEnvelope, :required => true
546
+ # ID of the invoice to remind.
547
+ object_of :invoiceID, String, :required => true
548
+ # Subject of the Reminder notification
549
+ object_of :subject, String
550
+ # Note to send payer within the reminder notification
551
+ object_of :noteForPayer, String
552
+ end
553
+ end
554
+
555
+
556
+
557
+ # The response object for RemindInvoice.
558
+ class RemindInvoiceResponse < DataType
559
+ def self.load_members
560
+ include ResponseStatus
561
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
562
+ # The sent invoice's ID.
563
+ object_of :invoiceID, String, :required => true
564
+ # The URL which lead merchant to view the invoice details on web.
565
+ object_of :invoiceURL, String, :required => true
566
+ array_of :error, ErrorData
567
+ end
568
+ end
569
+
570
+
571
+
572
+ # The request object for CreateAndSendInvoice.
573
+ class CreateAndSendInvoiceRequest < DataType
574
+ def self.load_members
575
+ object_of :requestEnvelope, RequestEnvelope, :required => true
576
+ # Data to populate the newly created invoice.
577
+ object_of :invoice, InvoiceType, :required => true
578
+ end
579
+ end
580
+
581
+
582
+
583
+ # The response object for CreateAndSendInvoice.
584
+ class CreateAndSendInvoiceResponse < DataType
585
+ def self.load_members
586
+ include ResponseStatus
587
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
588
+ # The created invoice's ID.
589
+ object_of :invoiceID, String, :required => true
590
+ # The created invoice's number.
591
+ object_of :invoiceNumber, String, :required => true
592
+ # The URL which lead merchant to view the invoice details on web.
593
+ object_of :invoiceURL, String, :required => true
594
+ # The total amount of the invoice (cost of items, shipping and tax, less any discount).
595
+ object_of :totalAmount, Integer, :required => true
596
+ array_of :error, ErrorData
597
+ end
598
+ end
599
+
600
+
601
+
602
+ # The request object for UpdateInvoice.
603
+ class UpdateInvoiceRequest < DataType
604
+ def self.load_members
605
+ object_of :requestEnvelope, RequestEnvelope, :required => true
606
+ # invoice's ID
607
+ object_of :invoiceID, String, :required => true
608
+ # Data to populate the newly created invoice.
609
+ object_of :invoice, InvoiceType, :required => true
610
+ end
611
+ end
612
+
613
+
614
+
615
+ # The response object for UpdateInvoice.
616
+ class UpdateInvoiceResponse < DataType
617
+ def self.load_members
618
+ include ResponseStatus
619
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
620
+ # The invoice's ID.
621
+ object_of :invoiceID, String, :required => true
622
+ # The updated invoice's number.
623
+ object_of :invoiceNumber, String, :required => true
624
+ # The URL which lead merchant to view the invoice details on web.
625
+ object_of :invoiceURL, String, :required => true
626
+ # The total amount of the invoice (cost of items, shipping and tax, less any discount).
627
+ object_of :totalAmount, Integer, :required => true
628
+ array_of :error, ErrorData
629
+ end
630
+ end
631
+
632
+
633
+
634
+ # The request object for GetInvoiceDetails.
635
+ class GetInvoiceDetailsRequest < DataType
636
+ def self.load_members
637
+ object_of :requestEnvelope, RequestEnvelope, :required => true
638
+ # ID of the invoice to retrieve.
639
+ object_of :invoiceID, String, :required => true
640
+ end
641
+ end
642
+
643
+
644
+
645
+ # The response object for CreateInvoice.
646
+ class GetInvoiceDetailsResponse < DataType
647
+ def self.load_members
648
+ include ResponseStatus
649
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
650
+ # The requested invoice.
651
+ object_of :invoice, InvoiceType, :required => true
652
+ # The requested invoice details.
653
+ object_of :invoiceDetails, InvoiceDetailsType, :required => true
654
+ # The requested invoice payment details.
655
+ object_of :paymentDetails, PaymentDetailsType
656
+ # The requested invoice refund details.
657
+ object_of :refundDetails, PaymentRefundDetailsType
658
+ # The URL which lead merchant to view the invoice details on web.
659
+ object_of :invoiceURL, String, :required => true
660
+ array_of :error, ErrorData
661
+ end
662
+ end
663
+
664
+
665
+
666
+ # The request object for CancelInvoice.
667
+ class CancelInvoiceRequest < DataType
668
+ def self.load_members
669
+ object_of :requestEnvelope, RequestEnvelope, :required => true
670
+ # invoice's ID
671
+ object_of :invoiceID, String
672
+ # Subject of the cancellation notification
673
+ object_of :subject, String
674
+ # Note to send payer within the cancellation notification
675
+ object_of :noteForPayer, String
676
+ # send a copy of cancellation notification to merchant
677
+ object_of :sendCopyToMerchant, Boolean
678
+ end
679
+ end
680
+
681
+
682
+
683
+ # The response object for CancelInvoice.
684
+ class CancelInvoiceResponse < DataType
685
+ def self.load_members
686
+ include ResponseStatus
687
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
688
+ # The canceled invoice's ID.
689
+ object_of :invoiceID, String, :required => true
690
+ # The canceled invoice's number.
691
+ object_of :invoiceNumber, String, :required => true
692
+ # The URL which lead merchant to view the invoice details on web.
693
+ object_of :invoiceURL, String, :required => true
694
+ array_of :error, ErrorData
695
+ end
696
+ end
697
+
698
+
699
+
700
+ # The request object for SearchInvoices.
701
+ class SearchInvoicesRequest < DataType
702
+ def self.load_members
703
+ object_of :requestEnvelope, RequestEnvelope, :required => true
704
+ # Invoice creator's email.
705
+ object_of :merchantEmail, String, :required => true
706
+ # Parameters constraining the search.
707
+ object_of :parameters, SearchParametersType, :required => true
708
+ # Page number of result set, starting with 1.
709
+ object_of :page, Integer, :required => true
710
+ # Number of results per page, between 1 and 100.
711
+ object_of :pageSize, Integer, :required => true
712
+ end
713
+ end
714
+
715
+
716
+
717
+ # The response object for SearchInvoices.
718
+ class SearchInvoicesResponse < DataType
719
+ def self.load_members
720
+ include ResponseStatus
721
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
722
+ # Number of invoices that matched the search.
723
+ object_of :count, Integer, :required => true
724
+ # Page of invoice summaries that matched the search.
725
+ object_of :invoiceList, InvoiceSummaryListType
726
+ # Page number of result set.
727
+ object_of :page, Integer, :required => true
728
+ # True if another page of invoice summary results exists.
729
+ object_of :hasNextPage, Boolean, :required => true
730
+ # True if a previous page of invoice summary results exists.
731
+ object_of :hasPreviousPage, Boolean, :required => true
732
+ array_of :error, ErrorData
733
+ end
734
+ end
735
+
736
+
737
+
738
+ # The request object for MarkInvoiceAsPaid.
739
+ class MarkInvoiceAsPaidRequest < DataType
740
+ def self.load_members
741
+ object_of :requestEnvelope, RequestEnvelope, :required => true
742
+ # ID of the invoice to mark as paid.
743
+ object_of :invoiceID, String, :required => true
744
+ # Details of the payment made against this invoice.
745
+ object_of :payment, OtherPaymentDetailsType, :required => true
746
+ end
747
+ end
748
+
749
+
750
+
751
+ # The response object for MarkInvoiceAsPaid.
752
+ class MarkInvoiceAsPaidResponse < DataType
753
+ def self.load_members
754
+ include ResponseStatus
755
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
756
+ # The paid invoice ID.
757
+ object_of :invoiceID, String, :required => true
758
+ # The paid invoice number.
759
+ object_of :invoiceNumber, String, :required => true
760
+ # The URL which lead merchant to view the invoice details on web.
761
+ object_of :invoiceURL, String, :required => true
762
+ array_of :error, ErrorData
763
+ end
764
+ end
765
+
766
+
767
+
768
+ # The request object for MarkInvoiceAsRefunded.
769
+ class MarkInvoiceAsRefundedRequest < DataType
770
+ def self.load_members
771
+ object_of :requestEnvelope, RequestEnvelope, :required => true
772
+ # ID of the invoice to mark as refunded.
773
+ object_of :invoiceID, String, :required => true
774
+ # Details of the refund made against this invoice.
775
+ object_of :refundDetail, OtherPaymentRefundDetailsType, :required => true
776
+ end
777
+ end
778
+
779
+
780
+
781
+ # The response object for MarkInvoiceAsRefunded.
782
+ class MarkInvoiceAsRefundedResponse < DataType
783
+ def self.load_members
784
+ include ResponseStatus
785
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
786
+ # The invoice ID of the invoice that was marked as refunded.
787
+ object_of :invoiceID, String, :required => true
788
+ # The invoice number of the invoice that was marked as refunded.
789
+ object_of :invoiceNumber, String, :required => true
790
+ # The URL of the details page of the invoice that was marked as refunded.
791
+ object_of :invoiceURL, String, :required => true
792
+ array_of :error, ErrorData
793
+ end
794
+ end
795
+
796
+
797
+
798
+ # The request object for MarkInvoiceAsUnpaid.
799
+ class MarkInvoiceAsUnpaidRequest < DataType
800
+ def self.load_members
801
+ object_of :requestEnvelope, RequestEnvelope, :required => true
802
+ # ID of the invoice to mark as unpaid.
803
+ object_of :invoiceID, String, :required => true
804
+ end
805
+ end
806
+
807
+
808
+
809
+ # The response object for MarkInvoiceAsUnpaid.
810
+ class MarkInvoiceAsUnpaidResponse < DataType
811
+ def self.load_members
812
+ include ResponseStatus
813
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
814
+ # The invoice ID of the invoice that was marked as unpaid.
815
+ object_of :invoiceID, String, :required => true
816
+ # The invoice number of the invoice that was marked as unpaid.
817
+ object_of :invoiceNumber, String, :required => true
818
+ # The URL of the details page of the invoice that was marked as unpaid.
819
+ object_of :invoiceURL, String, :required => true
820
+ array_of :error, ErrorData
821
+ end
822
+ end
823
+
824
+
825
+
826
+ # Payment refund details about the invoice.
827
+ class PaymentRefundDetailsType < DataType
828
+ def self.load_members
829
+ # True if the invoice was refunded using PayPal.
830
+ object_of :viaPayPal, Boolean, :required => true
831
+ # Other payment refund details.
832
+ object_of :paypalPayment, PayPalPaymentRefundDetailsType
833
+ # details.
834
+ object_of :otherPayment, OtherPaymentRefundDetailsType
835
+ end
836
+ end
837
+
838
+
839
+
840
+ # The request object for DeleteInvoice.
841
+ class DeleteInvoiceRequest < DataType
842
+ def self.load_members
843
+ object_of :requestEnvelope, RequestEnvelope, :required => true
844
+ # ID of the invoice to be deleted.
845
+ object_of :invoiceID, String, :required => true
846
+ end
847
+ end
848
+
849
+
850
+
851
+ # The response object for DeleteInvoice.
852
+ class DeleteInvoiceResponse < DataType
853
+ def self.load_members
854
+ include ResponseStatus
855
+ object_of :responseEnvelope, ResponseEnvelope, :required => true
856
+ array_of :error, ErrorData
857
+ end
858
+ end
859
+
860
+
861
+
862
+
863
+
864
+ constants.each do |data_type_klass|
865
+ data_type_klass = const_get(data_type_klass)
866
+ data_type_klass.load_members if defined? data_type_klass.load_members
867
+ end
868
+
869
+ end
870
+ end
871
+ end