processout 3.4.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +1 -1
- data/lib/processout/alternative_merchant_certificate.rb +5 -3
- data/lib/processout/apm_payment_processing_configuration.rb +81 -0
- data/lib/processout/apple_pay_alternative_merchant_certificates.rb +5 -3
- data/lib/processout/balances.rb +5 -3
- data/lib/processout/card.rb +45 -1
- data/lib/processout/card_contact.rb +11 -0
- data/lib/processout/card_create_request.rb +38 -2
- data/lib/processout/card_information.rb +1 -1
- data/lib/processout/card_scheme_details.rb +81 -0
- data/lib/processout/card_update_request.rb +37 -2
- data/lib/processout/customer.rb +8 -63
- data/lib/processout/device.rb +22 -0
- data/lib/processout/event.rb +1 -1
- data/lib/processout/export_layout.rb +4 -4
- data/lib/processout/export_layout_configuration_options.rb +1 -1
- data/lib/processout/gateway_configuration.rb +3 -3
- data/lib/processout/invoice.rb +163 -80
- data/lib/processout/invoice_device.rb +11 -0
- data/lib/processout/invoice_external_fraud_tools.rb +12 -0
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/payment_processing_configuration.rb +93 -0
- data/lib/processout/payout.rb +1 -1
- data/lib/processout/product.rb +8 -6
- data/lib/processout/project.rb +2 -63
- data/lib/processout/project_sftp_settings_public.rb +1 -1
- data/lib/processout/refund.rb +1 -1
- data/lib/processout/submerchant.rb +92 -0
- data/lib/processout/submerchant_mapping.rb +103 -0
- data/lib/processout/token.rb +22 -7
- data/lib/processout/transaction.rb +17 -38
- data/lib/processout/transaction_operation.rb +11 -0
- data/lib/processout/unsupported_feature_bypass.rb +11 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +40 -46
- metadata +12 -13
- data/lib/processout/activity.rb +0 -206
- data/lib/processout/addon.rb +0 -401
- data/lib/processout/coupon.rb +0 -352
- data/lib/processout/discount.rb +0 -360
- data/lib/processout/plan.rb +0 -368
- data/lib/processout/subscription.rb +0 -910
data/lib/processout/payout.rb
CHANGED
data/lib/processout/product.rb
CHANGED
|
@@ -214,9 +214,11 @@ module ProcessOut
|
|
|
214
214
|
return_values = Array.new
|
|
215
215
|
|
|
216
216
|
body = response.body
|
|
217
|
-
body = body["invoice"]
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
body = body.key?("invoice") ? body["invoice"] : nil
|
|
218
|
+
if !body.nil?
|
|
219
|
+
invoice = Invoice.new(@client)
|
|
220
|
+
return_values.push(invoice.fill_with_data(body))
|
|
221
|
+
end
|
|
220
222
|
|
|
221
223
|
|
|
222
224
|
return_values[0]
|
|
@@ -273,7 +275,7 @@ module ProcessOut
|
|
|
273
275
|
return_values = Array.new
|
|
274
276
|
|
|
275
277
|
body = response.body
|
|
276
|
-
body = body["product"]
|
|
278
|
+
body = body.key?("product") ? body["product"] : nil
|
|
277
279
|
|
|
278
280
|
|
|
279
281
|
return_values.push(self.fill_with_data(body))
|
|
@@ -300,7 +302,7 @@ module ProcessOut
|
|
|
300
302
|
return_values = Array.new
|
|
301
303
|
|
|
302
304
|
body = response.body
|
|
303
|
-
body = body["product"]
|
|
305
|
+
body = body.key?("product") ? body["product"] : nil
|
|
304
306
|
|
|
305
307
|
|
|
306
308
|
obj = Product.new(@client)
|
|
@@ -332,7 +334,7 @@ module ProcessOut
|
|
|
332
334
|
return_values = Array.new
|
|
333
335
|
|
|
334
336
|
body = response.body
|
|
335
|
-
body = body["product"]
|
|
337
|
+
body = body.key?("product") ? body["product"] : nil
|
|
336
338
|
|
|
337
339
|
|
|
338
340
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/project.rb
CHANGED
|
@@ -231,7 +231,7 @@ module ProcessOut
|
|
|
231
231
|
return_values = Array.new
|
|
232
232
|
|
|
233
233
|
body = response.body
|
|
234
|
-
body = body["project"]
|
|
234
|
+
body = body.key?("project") ? body["project"] : nil
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
return_values.push(self.fill_with_data(body))
|
|
@@ -257,7 +257,7 @@ module ProcessOut
|
|
|
257
257
|
return_values = Array.new
|
|
258
258
|
|
|
259
259
|
body = response.body
|
|
260
|
-
body = body["project"]
|
|
260
|
+
body = body.key?("project") ? body["project"] : nil
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
return_values.push(self.fill_with_data(body))
|
|
@@ -285,67 +285,6 @@ module ProcessOut
|
|
|
285
285
|
return_values.push(response.success)
|
|
286
286
|
|
|
287
287
|
|
|
288
|
-
return_values[0]
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# Get all the supervised projects.
|
|
292
|
-
# Params:
|
|
293
|
-
# +options+:: +Hash+ of options
|
|
294
|
-
def fetch_supervised(options = {})
|
|
295
|
-
self.prefill(options)
|
|
296
|
-
|
|
297
|
-
request = Request.new(@client)
|
|
298
|
-
path = "/supervised-projects"
|
|
299
|
-
data = {
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
response = Response.new(request.get(path, data, options))
|
|
304
|
-
return_values = Array.new
|
|
305
|
-
|
|
306
|
-
a = Array.new
|
|
307
|
-
body = response.body
|
|
308
|
-
for v in body['projects']
|
|
309
|
-
tmp = Project.new(@client)
|
|
310
|
-
tmp.fill_with_data(v)
|
|
311
|
-
a.push(tmp)
|
|
312
|
-
end
|
|
313
|
-
|
|
314
|
-
return_values.push(a)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return_values[0]
|
|
319
|
-
end
|
|
320
|
-
|
|
321
|
-
# Create a new supervised project.
|
|
322
|
-
# Params:
|
|
323
|
-
# +options+:: +Hash+ of options
|
|
324
|
-
def create_supervised(options = {})
|
|
325
|
-
self.prefill(options)
|
|
326
|
-
|
|
327
|
-
request = Request.new(@client)
|
|
328
|
-
path = "/supervised-projects"
|
|
329
|
-
data = {
|
|
330
|
-
"id" => @id,
|
|
331
|
-
"name" => @name,
|
|
332
|
-
"default_currency" => @default_currency,
|
|
333
|
-
"dunning_configuration" => @dunning_configuration,
|
|
334
|
-
"applepay_settings" => options.fetch(:applepay_settings, nil),
|
|
335
|
-
"public_metadata" => options.fetch(:public_metadata, nil)
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
response = Response.new(request.post(path, data, options))
|
|
339
|
-
return_values = Array.new
|
|
340
|
-
|
|
341
|
-
body = response.body
|
|
342
|
-
body = body["project"]
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
return_values.push(self.fill_with_data(body))
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
288
|
return_values[0]
|
|
350
289
|
end
|
|
351
290
|
|
data/lib/processout/refund.rb
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# The content of this file was automatically generated
|
|
2
|
+
|
|
3
|
+
require "cgi"
|
|
4
|
+
require "json"
|
|
5
|
+
require "processout/networking/request"
|
|
6
|
+
require "processout/networking/response"
|
|
7
|
+
|
|
8
|
+
module ProcessOut
|
|
9
|
+
class Submerchant
|
|
10
|
+
|
|
11
|
+
attr_reader :id
|
|
12
|
+
attr_reader :name
|
|
13
|
+
attr_reader :created_at
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def id=(val)
|
|
17
|
+
@id = val
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def name=(val)
|
|
21
|
+
@name = val
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def created_at=(val)
|
|
25
|
+
@created_at = val
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Initializes the Submerchant object
|
|
30
|
+
# Params:
|
|
31
|
+
# +client+:: +ProcessOut+ client instance
|
|
32
|
+
# +data+:: data that can be used to fill the object
|
|
33
|
+
def initialize(client, data = {})
|
|
34
|
+
@client = client
|
|
35
|
+
|
|
36
|
+
self.id = data.fetch(:id, nil)
|
|
37
|
+
self.name = data.fetch(:name, nil)
|
|
38
|
+
self.created_at = data.fetch(:created_at, nil)
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Create a new Submerchant using the current client
|
|
43
|
+
def new(data = {})
|
|
44
|
+
Submerchant.new(@client, data)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Overrides the JSON marshaller to only send the fields we want
|
|
48
|
+
def to_json(options)
|
|
49
|
+
{
|
|
50
|
+
"id": self.id,
|
|
51
|
+
"name": self.name,
|
|
52
|
+
"created_at": self.created_at,
|
|
53
|
+
}.to_json
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Fills the object with data coming from the API
|
|
57
|
+
# Params:
|
|
58
|
+
# +data+:: +Hash+ of data coming from the API
|
|
59
|
+
def fill_with_data(data)
|
|
60
|
+
if data.nil?
|
|
61
|
+
return self
|
|
62
|
+
end
|
|
63
|
+
if data.include? "id"
|
|
64
|
+
self.id = data["id"]
|
|
65
|
+
end
|
|
66
|
+
if data.include? "name"
|
|
67
|
+
self.name = data["name"]
|
|
68
|
+
end
|
|
69
|
+
if data.include? "created_at"
|
|
70
|
+
self.created_at = data["created_at"]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
self
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Prefills the object with the data passed as parameters
|
|
77
|
+
# Params:
|
|
78
|
+
# +data+:: +Hash+ of data
|
|
79
|
+
def prefill(data)
|
|
80
|
+
if data.nil?
|
|
81
|
+
return self
|
|
82
|
+
end
|
|
83
|
+
self.id = data.fetch(:id, self.id)
|
|
84
|
+
self.name = data.fetch(:name, self.name)
|
|
85
|
+
self.created_at = data.fetch(:created_at, self.created_at)
|
|
86
|
+
|
|
87
|
+
self
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# The content of this file was automatically generated
|
|
2
|
+
|
|
3
|
+
require "cgi"
|
|
4
|
+
require "json"
|
|
5
|
+
require "processout/networking/request"
|
|
6
|
+
require "processout/networking/response"
|
|
7
|
+
|
|
8
|
+
module ProcessOut
|
|
9
|
+
class SubmerchantMapping
|
|
10
|
+
|
|
11
|
+
attr_reader :submerchant_id
|
|
12
|
+
attr_reader :gateway_configuration_id
|
|
13
|
+
attr_reader :psp_submerchant_id
|
|
14
|
+
attr_reader :created_at
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def submerchant_id=(val)
|
|
18
|
+
@submerchant_id = val
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def gateway_configuration_id=(val)
|
|
22
|
+
@gateway_configuration_id = val
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def psp_submerchant_id=(val)
|
|
26
|
+
@psp_submerchant_id = val
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def created_at=(val)
|
|
30
|
+
@created_at = val
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Initializes the SubmerchantMapping object
|
|
35
|
+
# Params:
|
|
36
|
+
# +client+:: +ProcessOut+ client instance
|
|
37
|
+
# +data+:: data that can be used to fill the object
|
|
38
|
+
def initialize(client, data = {})
|
|
39
|
+
@client = client
|
|
40
|
+
|
|
41
|
+
self.submerchant_id = data.fetch(:submerchant_id, nil)
|
|
42
|
+
self.gateway_configuration_id = data.fetch(:gateway_configuration_id, nil)
|
|
43
|
+
self.psp_submerchant_id = data.fetch(:psp_submerchant_id, nil)
|
|
44
|
+
self.created_at = data.fetch(:created_at, nil)
|
|
45
|
+
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Create a new SubmerchantMapping using the current client
|
|
49
|
+
def new(data = {})
|
|
50
|
+
SubmerchantMapping.new(@client, data)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Overrides the JSON marshaller to only send the fields we want
|
|
54
|
+
def to_json(options)
|
|
55
|
+
{
|
|
56
|
+
"submerchant_id": self.submerchant_id,
|
|
57
|
+
"gateway_configuration_id": self.gateway_configuration_id,
|
|
58
|
+
"psp_submerchant_id": self.psp_submerchant_id,
|
|
59
|
+
"created_at": self.created_at,
|
|
60
|
+
}.to_json
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Fills the object with data coming from the API
|
|
64
|
+
# Params:
|
|
65
|
+
# +data+:: +Hash+ of data coming from the API
|
|
66
|
+
def fill_with_data(data)
|
|
67
|
+
if data.nil?
|
|
68
|
+
return self
|
|
69
|
+
end
|
|
70
|
+
if data.include? "submerchant_id"
|
|
71
|
+
self.submerchant_id = data["submerchant_id"]
|
|
72
|
+
end
|
|
73
|
+
if data.include? "gateway_configuration_id"
|
|
74
|
+
self.gateway_configuration_id = data["gateway_configuration_id"]
|
|
75
|
+
end
|
|
76
|
+
if data.include? "psp_submerchant_id"
|
|
77
|
+
self.psp_submerchant_id = data["psp_submerchant_id"]
|
|
78
|
+
end
|
|
79
|
+
if data.include? "created_at"
|
|
80
|
+
self.created_at = data["created_at"]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
self
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Prefills the object with the data passed as parameters
|
|
87
|
+
# Params:
|
|
88
|
+
# +data+:: +Hash+ of data
|
|
89
|
+
def prefill(data)
|
|
90
|
+
if data.nil?
|
|
91
|
+
return self
|
|
92
|
+
end
|
|
93
|
+
self.submerchant_id = data.fetch(:submerchant_id, self.submerchant_id)
|
|
94
|
+
self.gateway_configuration_id = data.fetch(:gateway_configuration_id, self.gateway_configuration_id)
|
|
95
|
+
self.psp_submerchant_id = data.fetch(:psp_submerchant_id, self.psp_submerchant_id)
|
|
96
|
+
self.created_at = data.fetch(:created_at, self.created_at)
|
|
97
|
+
|
|
98
|
+
self
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
end
|
|
103
|
+
end
|
data/lib/processout/token.rb
CHANGED
|
@@ -31,6 +31,7 @@ module ProcessOut
|
|
|
31
31
|
attr_reader :verification_status
|
|
32
32
|
attr_reader :can_get_balance
|
|
33
33
|
attr_reader :webhook_url
|
|
34
|
+
attr_reader :provision_network_token
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
def id=(val)
|
|
@@ -173,6 +174,10 @@ module ProcessOut
|
|
|
173
174
|
@webhook_url = val
|
|
174
175
|
end
|
|
175
176
|
|
|
177
|
+
def provision_network_token=(val)
|
|
178
|
+
@provision_network_token = val
|
|
179
|
+
end
|
|
180
|
+
|
|
176
181
|
|
|
177
182
|
# Initializes the Token object
|
|
178
183
|
# Params:
|
|
@@ -204,6 +209,7 @@ module ProcessOut
|
|
|
204
209
|
self.verification_status = data.fetch(:verification_status, nil)
|
|
205
210
|
self.can_get_balance = data.fetch(:can_get_balance, nil)
|
|
206
211
|
self.webhook_url = data.fetch(:webhook_url, nil)
|
|
212
|
+
self.provision_network_token = data.fetch(:provision_network_token, nil)
|
|
207
213
|
|
|
208
214
|
end
|
|
209
215
|
|
|
@@ -238,6 +244,7 @@ module ProcessOut
|
|
|
238
244
|
"verification_status": self.verification_status,
|
|
239
245
|
"can_get_balance": self.can_get_balance,
|
|
240
246
|
"webhook_url": self.webhook_url,
|
|
247
|
+
"provision_network_token": self.provision_network_token,
|
|
241
248
|
}.to_json
|
|
242
249
|
end
|
|
243
250
|
|
|
@@ -317,6 +324,9 @@ module ProcessOut
|
|
|
317
324
|
if data.include? "webhook_url"
|
|
318
325
|
self.webhook_url = data["webhook_url"]
|
|
319
326
|
end
|
|
327
|
+
if data.include? "provision_network_token"
|
|
328
|
+
self.provision_network_token = data["provision_network_token"]
|
|
329
|
+
end
|
|
320
330
|
|
|
321
331
|
self
|
|
322
332
|
end
|
|
@@ -351,6 +361,7 @@ module ProcessOut
|
|
|
351
361
|
self.verification_status = data.fetch(:verification_status, self.verification_status)
|
|
352
362
|
self.can_get_balance = data.fetch(:can_get_balance, self.can_get_balance)
|
|
353
363
|
self.webhook_url = data.fetch(:webhook_url, self.webhook_url)
|
|
364
|
+
self.provision_network_token = data.fetch(:provision_network_token, self.provision_network_token)
|
|
354
365
|
|
|
355
366
|
self
|
|
356
367
|
end
|
|
@@ -404,7 +415,7 @@ module ProcessOut
|
|
|
404
415
|
return_values = Array.new
|
|
405
416
|
|
|
406
417
|
body = response.body
|
|
407
|
-
body = body["token"]
|
|
418
|
+
body = body.key?("token") ? body["token"] : nil
|
|
408
419
|
|
|
409
420
|
|
|
410
421
|
obj = Token.new(@client)
|
|
@@ -440,22 +451,25 @@ module ProcessOut
|
|
|
440
451
|
"set_default" => options.fetch(:set_default, nil),
|
|
441
452
|
"verify_statement_descriptor" => options.fetch(:verify_statement_descriptor, nil),
|
|
442
453
|
"invoice_return_url" => options.fetch(:invoice_return_url, nil),
|
|
443
|
-
"summary" => options.fetch(:summary, nil)
|
|
454
|
+
"summary" => options.fetch(:summary, nil),
|
|
455
|
+
"provision_network_token" => options.fetch(:provision_network_token, nil)
|
|
444
456
|
}
|
|
445
457
|
|
|
446
458
|
response = Response.new(request.post(path, data, options))
|
|
447
459
|
return_values = Array.new
|
|
448
460
|
|
|
449
461
|
body = response.body
|
|
450
|
-
body = body["token"]
|
|
462
|
+
body = body.key?("token") ? body["token"] : nil
|
|
451
463
|
|
|
452
464
|
|
|
453
465
|
return_values.push(self.fill_with_data(body))
|
|
454
466
|
|
|
455
467
|
body = response.body
|
|
456
|
-
body = body["customer_action"]
|
|
457
|
-
|
|
458
|
-
|
|
468
|
+
body = body.key?("customer_action") ? body["customer_action"] : nil
|
|
469
|
+
if !body.nil?
|
|
470
|
+
customer_action = CustomerAction.new(@client)
|
|
471
|
+
return_values.push(customer_action.fill_with_data(body))
|
|
472
|
+
end
|
|
459
473
|
|
|
460
474
|
|
|
461
475
|
return_values
|
|
@@ -478,7 +492,8 @@ module ProcessOut
|
|
|
478
492
|
"set_default" => options.fetch(:set_default, nil),
|
|
479
493
|
"verify_statement_descriptor" => options.fetch(:verify_statement_descriptor, nil),
|
|
480
494
|
"invoice_return_url" => options.fetch(:invoice_return_url, nil),
|
|
481
|
-
"gateway_configuration_id" => options.fetch(:gateway_configuration_id, nil)
|
|
495
|
+
"gateway_configuration_id" => options.fetch(:gateway_configuration_id, nil),
|
|
496
|
+
"provision_network_token" => options.fetch(:provision_network_token, nil)
|
|
482
497
|
}
|
|
483
498
|
|
|
484
499
|
response = Response.new(request.put(path, data, options))
|
|
@@ -15,8 +15,6 @@ module ProcessOut
|
|
|
15
15
|
attr_reader :invoice_id
|
|
16
16
|
attr_reader :customer
|
|
17
17
|
attr_reader :customer_id
|
|
18
|
-
attr_reader :subscription
|
|
19
|
-
attr_reader :subscription_id
|
|
20
18
|
attr_reader :token
|
|
21
19
|
attr_reader :token_id
|
|
22
20
|
attr_reader :card
|
|
@@ -75,6 +73,7 @@ module ProcessOut
|
|
|
75
73
|
attr_reader :eci
|
|
76
74
|
attr_reader :native_apm
|
|
77
75
|
attr_reader :external_details
|
|
76
|
+
attr_reader :origin
|
|
78
77
|
|
|
79
78
|
|
|
80
79
|
def id=(val)
|
|
@@ -141,26 +140,6 @@ module ProcessOut
|
|
|
141
140
|
@customer_id = val
|
|
142
141
|
end
|
|
143
142
|
|
|
144
|
-
def subscription=(val)
|
|
145
|
-
if val.nil?
|
|
146
|
-
@subscription = val
|
|
147
|
-
return
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
if val.instance_of? Subscription
|
|
151
|
-
@subscription = val
|
|
152
|
-
else
|
|
153
|
-
obj = Subscription.new(@client)
|
|
154
|
-
obj.fill_with_data(val)
|
|
155
|
-
@subscription = obj
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
def subscription_id=(val)
|
|
161
|
-
@subscription_id = val
|
|
162
|
-
end
|
|
163
|
-
|
|
164
143
|
def token=(val)
|
|
165
144
|
if val.nil?
|
|
166
145
|
@token = val
|
|
@@ -498,6 +477,10 @@ module ProcessOut
|
|
|
498
477
|
|
|
499
478
|
end
|
|
500
479
|
|
|
480
|
+
def origin=(val)
|
|
481
|
+
@origin = val
|
|
482
|
+
end
|
|
483
|
+
|
|
501
484
|
|
|
502
485
|
# Initializes the Transaction object
|
|
503
486
|
# Params:
|
|
@@ -513,8 +496,6 @@ module ProcessOut
|
|
|
513
496
|
self.invoice_id = data.fetch(:invoice_id, nil)
|
|
514
497
|
self.customer = data.fetch(:customer, nil)
|
|
515
498
|
self.customer_id = data.fetch(:customer_id, nil)
|
|
516
|
-
self.subscription = data.fetch(:subscription, nil)
|
|
517
|
-
self.subscription_id = data.fetch(:subscription_id, nil)
|
|
518
499
|
self.token = data.fetch(:token, nil)
|
|
519
500
|
self.token_id = data.fetch(:token_id, nil)
|
|
520
501
|
self.card = data.fetch(:card, nil)
|
|
@@ -573,6 +554,7 @@ module ProcessOut
|
|
|
573
554
|
self.eci = data.fetch(:eci, nil)
|
|
574
555
|
self.native_apm = data.fetch(:native_apm, nil)
|
|
575
556
|
self.external_details = data.fetch(:external_details, nil)
|
|
557
|
+
self.origin = data.fetch(:origin, nil)
|
|
576
558
|
|
|
577
559
|
end
|
|
578
560
|
|
|
@@ -591,8 +573,6 @@ module ProcessOut
|
|
|
591
573
|
"invoice_id": self.invoice_id,
|
|
592
574
|
"customer": self.customer,
|
|
593
575
|
"customer_id": self.customer_id,
|
|
594
|
-
"subscription": self.subscription,
|
|
595
|
-
"subscription_id": self.subscription_id,
|
|
596
576
|
"token": self.token,
|
|
597
577
|
"token_id": self.token_id,
|
|
598
578
|
"card": self.card,
|
|
@@ -651,6 +631,7 @@ module ProcessOut
|
|
|
651
631
|
"eci": self.eci,
|
|
652
632
|
"native_apm": self.native_apm,
|
|
653
633
|
"external_details": self.external_details,
|
|
634
|
+
"origin": self.origin,
|
|
654
635
|
}.to_json
|
|
655
636
|
end
|
|
656
637
|
|
|
@@ -682,12 +663,6 @@ module ProcessOut
|
|
|
682
663
|
if data.include? "customer_id"
|
|
683
664
|
self.customer_id = data["customer_id"]
|
|
684
665
|
end
|
|
685
|
-
if data.include? "subscription"
|
|
686
|
-
self.subscription = data["subscription"]
|
|
687
|
-
end
|
|
688
|
-
if data.include? "subscription_id"
|
|
689
|
-
self.subscription_id = data["subscription_id"]
|
|
690
|
-
end
|
|
691
666
|
if data.include? "token"
|
|
692
667
|
self.token = data["token"]
|
|
693
668
|
end
|
|
@@ -862,6 +837,9 @@ module ProcessOut
|
|
|
862
837
|
if data.include? "external_details"
|
|
863
838
|
self.external_details = data["external_details"]
|
|
864
839
|
end
|
|
840
|
+
if data.include? "origin"
|
|
841
|
+
self.origin = data["origin"]
|
|
842
|
+
end
|
|
865
843
|
|
|
866
844
|
self
|
|
867
845
|
end
|
|
@@ -880,8 +858,6 @@ module ProcessOut
|
|
|
880
858
|
self.invoice_id = data.fetch(:invoice_id, self.invoice_id)
|
|
881
859
|
self.customer = data.fetch(:customer, self.customer)
|
|
882
860
|
self.customer_id = data.fetch(:customer_id, self.customer_id)
|
|
883
|
-
self.subscription = data.fetch(:subscription, self.subscription)
|
|
884
|
-
self.subscription_id = data.fetch(:subscription_id, self.subscription_id)
|
|
885
861
|
self.token = data.fetch(:token, self.token)
|
|
886
862
|
self.token_id = data.fetch(:token_id, self.token_id)
|
|
887
863
|
self.card = data.fetch(:card, self.card)
|
|
@@ -940,6 +916,7 @@ module ProcessOut
|
|
|
940
916
|
self.eci = data.fetch(:eci, self.eci)
|
|
941
917
|
self.native_apm = data.fetch(:native_apm, self.native_apm)
|
|
942
918
|
self.external_details = data.fetch(:external_details, self.external_details)
|
|
919
|
+
self.origin = data.fetch(:origin, self.origin)
|
|
943
920
|
|
|
944
921
|
self
|
|
945
922
|
end
|
|
@@ -991,9 +968,11 @@ module ProcessOut
|
|
|
991
968
|
return_values = Array.new
|
|
992
969
|
|
|
993
970
|
body = response.body
|
|
994
|
-
body = body["refund"]
|
|
995
|
-
|
|
996
|
-
|
|
971
|
+
body = body.key?("refund") ? body["refund"] : nil
|
|
972
|
+
if !body.nil?
|
|
973
|
+
refund = Refund.new(@client)
|
|
974
|
+
return_values.push(refund.fill_with_data(body))
|
|
975
|
+
end
|
|
997
976
|
|
|
998
977
|
|
|
999
978
|
return_values[0]
|
|
@@ -1076,7 +1055,7 @@ module ProcessOut
|
|
|
1076
1055
|
return_values = Array.new
|
|
1077
1056
|
|
|
1078
1057
|
body = response.body
|
|
1079
|
-
body = body["transaction"]
|
|
1058
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
|
1080
1059
|
|
|
1081
1060
|
|
|
1082
1061
|
obj = Transaction.new(@client)
|
|
@@ -35,6 +35,7 @@ module ProcessOut
|
|
|
35
35
|
attr_reader :scheme_id
|
|
36
36
|
attr_reader :processed_with_network_token
|
|
37
37
|
attr_reader :payment_type
|
|
38
|
+
attr_reader :capture_type
|
|
38
39
|
attr_reader :metadata
|
|
39
40
|
attr_reader :gateway_fee
|
|
40
41
|
attr_reader :created_at
|
|
@@ -232,6 +233,10 @@ module ProcessOut
|
|
|
232
233
|
@payment_type = val
|
|
233
234
|
end
|
|
234
235
|
|
|
236
|
+
def capture_type=(val)
|
|
237
|
+
@capture_type = val
|
|
238
|
+
end
|
|
239
|
+
|
|
235
240
|
def metadata=(val)
|
|
236
241
|
@metadata = val
|
|
237
242
|
end
|
|
@@ -279,6 +284,7 @@ module ProcessOut
|
|
|
279
284
|
self.scheme_id = data.fetch(:scheme_id, nil)
|
|
280
285
|
self.processed_with_network_token = data.fetch(:processed_with_network_token, nil)
|
|
281
286
|
self.payment_type = data.fetch(:payment_type, nil)
|
|
287
|
+
self.capture_type = data.fetch(:capture_type, nil)
|
|
282
288
|
self.metadata = data.fetch(:metadata, nil)
|
|
283
289
|
self.gateway_fee = data.fetch(:gateway_fee, nil)
|
|
284
290
|
self.created_at = data.fetch(:created_at, nil)
|
|
@@ -320,6 +326,7 @@ module ProcessOut
|
|
|
320
326
|
"scheme_id": self.scheme_id,
|
|
321
327
|
"processed_with_network_token": self.processed_with_network_token,
|
|
322
328
|
"payment_type": self.payment_type,
|
|
329
|
+
"capture_type": self.capture_type,
|
|
323
330
|
"metadata": self.metadata,
|
|
324
331
|
"gateway_fee": self.gateway_fee,
|
|
325
332
|
"created_at": self.created_at,
|
|
@@ -414,6 +421,9 @@ module ProcessOut
|
|
|
414
421
|
if data.include? "payment_type"
|
|
415
422
|
self.payment_type = data["payment_type"]
|
|
416
423
|
end
|
|
424
|
+
if data.include? "capture_type"
|
|
425
|
+
self.capture_type = data["capture_type"]
|
|
426
|
+
end
|
|
417
427
|
if data.include? "metadata"
|
|
418
428
|
self.metadata = data["metadata"]
|
|
419
429
|
end
|
|
@@ -461,6 +471,7 @@ module ProcessOut
|
|
|
461
471
|
self.scheme_id = data.fetch(:scheme_id, self.scheme_id)
|
|
462
472
|
self.processed_with_network_token = data.fetch(:processed_with_network_token, self.processed_with_network_token)
|
|
463
473
|
self.payment_type = data.fetch(:payment_type, self.payment_type)
|
|
474
|
+
self.capture_type = data.fetch(:capture_type, self.capture_type)
|
|
464
475
|
self.metadata = data.fetch(:metadata, self.metadata)
|
|
465
476
|
self.gateway_fee = data.fetch(:gateway_fee, self.gateway_fee)
|
|
466
477
|
self.created_at = data.fetch(:created_at, self.created_at)
|