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/customer.rb
CHANGED
|
@@ -14,7 +14,6 @@ module ProcessOut
|
|
|
14
14
|
attr_reader :default_token
|
|
15
15
|
attr_reader :default_token_id
|
|
16
16
|
attr_reader :tokens
|
|
17
|
-
attr_reader :subscriptions
|
|
18
17
|
attr_reader :transactions
|
|
19
18
|
attr_reader :balance
|
|
20
19
|
attr_reader :currency
|
|
@@ -106,26 +105,6 @@ module ProcessOut
|
|
|
106
105
|
|
|
107
106
|
end
|
|
108
107
|
|
|
109
|
-
def subscriptions=(val)
|
|
110
|
-
if val.nil?
|
|
111
|
-
@subscriptions = []
|
|
112
|
-
return
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
if val.length > 0 and val[0].instance_of? Subscription
|
|
116
|
-
@subscriptions = val
|
|
117
|
-
else
|
|
118
|
-
l = Array.new
|
|
119
|
-
for v in val
|
|
120
|
-
obj = Subscription.new(@client)
|
|
121
|
-
obj.fill_with_data(v)
|
|
122
|
-
l.push(obj)
|
|
123
|
-
end
|
|
124
|
-
@subscriptions = l
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
end
|
|
128
|
-
|
|
129
108
|
def transactions=(val)
|
|
130
109
|
if val.nil?
|
|
131
110
|
@transactions = []
|
|
@@ -268,7 +247,6 @@ module ProcessOut
|
|
|
268
247
|
self.default_token = data.fetch(:default_token, nil)
|
|
269
248
|
self.default_token_id = data.fetch(:default_token_id, nil)
|
|
270
249
|
self.tokens = data.fetch(:tokens, nil)
|
|
271
|
-
self.subscriptions = data.fetch(:subscriptions, nil)
|
|
272
250
|
self.transactions = data.fetch(:transactions, nil)
|
|
273
251
|
self.balance = data.fetch(:balance, nil)
|
|
274
252
|
self.currency = data.fetch(:currency, nil)
|
|
@@ -311,7 +289,6 @@ module ProcessOut
|
|
|
311
289
|
"default_token": self.default_token,
|
|
312
290
|
"default_token_id": self.default_token_id,
|
|
313
291
|
"tokens": self.tokens,
|
|
314
|
-
"subscriptions": self.subscriptions,
|
|
315
292
|
"transactions": self.transactions,
|
|
316
293
|
"balance": self.balance,
|
|
317
294
|
"currency": self.currency,
|
|
@@ -365,9 +342,6 @@ module ProcessOut
|
|
|
365
342
|
if data.include? "tokens"
|
|
366
343
|
self.tokens = data["tokens"]
|
|
367
344
|
end
|
|
368
|
-
if data.include? "subscriptions"
|
|
369
|
-
self.subscriptions = data["subscriptions"]
|
|
370
|
-
end
|
|
371
345
|
if data.include? "transactions"
|
|
372
346
|
self.transactions = data["transactions"]
|
|
373
347
|
end
|
|
@@ -460,7 +434,6 @@ module ProcessOut
|
|
|
460
434
|
self.default_token = data.fetch(:default_token, self.default_token)
|
|
461
435
|
self.default_token_id = data.fetch(:default_token_id, self.default_token_id)
|
|
462
436
|
self.tokens = data.fetch(:tokens, self.tokens)
|
|
463
|
-
self.subscriptions = data.fetch(:subscriptions, self.subscriptions)
|
|
464
437
|
self.transactions = data.fetch(:transactions, self.transactions)
|
|
465
438
|
self.balance = data.fetch(:balance, self.balance)
|
|
466
439
|
self.currency = data.fetch(:currency, self.currency)
|
|
@@ -490,36 +463,6 @@ module ProcessOut
|
|
|
490
463
|
self
|
|
491
464
|
end
|
|
492
465
|
|
|
493
|
-
# Get the subscriptions belonging to the customer.
|
|
494
|
-
# Params:
|
|
495
|
-
# +options+:: +Hash+ of options
|
|
496
|
-
def fetch_subscriptions(options = {})
|
|
497
|
-
self.prefill(options)
|
|
498
|
-
|
|
499
|
-
request = Request.new(@client)
|
|
500
|
-
path = "/customers/" + CGI.escape(@id) + "/subscriptions"
|
|
501
|
-
data = {
|
|
502
|
-
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
response = Response.new(request.get(path, data, options))
|
|
506
|
-
return_values = Array.new
|
|
507
|
-
|
|
508
|
-
a = Array.new
|
|
509
|
-
body = response.body
|
|
510
|
-
for v in body['subscriptions']
|
|
511
|
-
tmp = Subscription.new(@client)
|
|
512
|
-
tmp.fill_with_data(v)
|
|
513
|
-
a.push(tmp)
|
|
514
|
-
end
|
|
515
|
-
|
|
516
|
-
return_values.push(a)
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
return_values[0]
|
|
521
|
-
end
|
|
522
|
-
|
|
523
466
|
# Get the customer's tokens.
|
|
524
467
|
# Params:
|
|
525
468
|
# +options+:: +Hash+ of options
|
|
@@ -567,9 +510,11 @@ module ProcessOut
|
|
|
567
510
|
return_values = Array.new
|
|
568
511
|
|
|
569
512
|
body = response.body
|
|
570
|
-
body = body["token"]
|
|
571
|
-
|
|
572
|
-
|
|
513
|
+
body = body.key?("token") ? body["token"] : nil
|
|
514
|
+
if !body.nil?
|
|
515
|
+
token = Token.new(@client)
|
|
516
|
+
return_values.push(token.fill_with_data(body))
|
|
517
|
+
end
|
|
573
518
|
|
|
574
519
|
|
|
575
520
|
return_values[0]
|
|
@@ -695,7 +640,7 @@ module ProcessOut
|
|
|
695
640
|
return_values = Array.new
|
|
696
641
|
|
|
697
642
|
body = response.body
|
|
698
|
-
body = body["customer"]
|
|
643
|
+
body = body.key?("customer") ? body["customer"] : nil
|
|
699
644
|
|
|
700
645
|
|
|
701
646
|
return_values.push(self.fill_with_data(body))
|
|
@@ -722,7 +667,7 @@ module ProcessOut
|
|
|
722
667
|
return_values = Array.new
|
|
723
668
|
|
|
724
669
|
body = response.body
|
|
725
|
-
body = body["customer"]
|
|
670
|
+
body = body.key?("customer") ? body["customer"] : nil
|
|
726
671
|
|
|
727
672
|
|
|
728
673
|
obj = Customer.new(@client)
|
|
@@ -769,7 +714,7 @@ module ProcessOut
|
|
|
769
714
|
return_values = Array.new
|
|
770
715
|
|
|
771
716
|
body = response.body
|
|
772
|
-
body = body["customer"]
|
|
717
|
+
body = body.key?("customer") ? body["customer"] : nil
|
|
773
718
|
|
|
774
719
|
|
|
775
720
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/device.rb
CHANGED
|
@@ -11,6 +11,8 @@ module ProcessOut
|
|
|
11
11
|
attr_reader :request_origin
|
|
12
12
|
attr_reader :id
|
|
13
13
|
attr_reader :channel
|
|
14
|
+
attr_reader :threeds_sdk
|
|
15
|
+
attr_reader :platform
|
|
14
16
|
attr_reader :ip_address
|
|
15
17
|
attr_reader :user_agent
|
|
16
18
|
attr_reader :header_accept
|
|
@@ -35,6 +37,14 @@ module ProcessOut
|
|
|
35
37
|
@channel = val
|
|
36
38
|
end
|
|
37
39
|
|
|
40
|
+
def threeds_sdk=(val)
|
|
41
|
+
@threeds_sdk = val
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def platform=(val)
|
|
45
|
+
@platform = val
|
|
46
|
+
end
|
|
47
|
+
|
|
38
48
|
def ip_address=(val)
|
|
39
49
|
@ip_address = val
|
|
40
50
|
end
|
|
@@ -86,6 +96,8 @@ module ProcessOut
|
|
|
86
96
|
self.request_origin = data.fetch(:request_origin, nil)
|
|
87
97
|
self.id = data.fetch(:id, nil)
|
|
88
98
|
self.channel = data.fetch(:channel, nil)
|
|
99
|
+
self.threeds_sdk = data.fetch(:threeds_sdk, nil)
|
|
100
|
+
self.platform = data.fetch(:platform, nil)
|
|
89
101
|
self.ip_address = data.fetch(:ip_address, nil)
|
|
90
102
|
self.user_agent = data.fetch(:user_agent, nil)
|
|
91
103
|
self.header_accept = data.fetch(:header_accept, nil)
|
|
@@ -110,6 +122,8 @@ module ProcessOut
|
|
|
110
122
|
"request_origin": self.request_origin,
|
|
111
123
|
"id": self.id,
|
|
112
124
|
"channel": self.channel,
|
|
125
|
+
"threeds_sdk": self.threeds_sdk,
|
|
126
|
+
"platform": self.platform,
|
|
113
127
|
"ip_address": self.ip_address,
|
|
114
128
|
"user_agent": self.user_agent,
|
|
115
129
|
"header_accept": self.header_accept,
|
|
@@ -139,6 +153,12 @@ module ProcessOut
|
|
|
139
153
|
if data.include? "channel"
|
|
140
154
|
self.channel = data["channel"]
|
|
141
155
|
end
|
|
156
|
+
if data.include? "threeds_sdk"
|
|
157
|
+
self.threeds_sdk = data["threeds_sdk"]
|
|
158
|
+
end
|
|
159
|
+
if data.include? "platform"
|
|
160
|
+
self.platform = data["platform"]
|
|
161
|
+
end
|
|
142
162
|
if data.include? "ip_address"
|
|
143
163
|
self.ip_address = data["ip_address"]
|
|
144
164
|
end
|
|
@@ -183,6 +203,8 @@ module ProcessOut
|
|
|
183
203
|
self.request_origin = data.fetch(:request_origin, self.request_origin)
|
|
184
204
|
self.id = data.fetch(:id, self.id)
|
|
185
205
|
self.channel = data.fetch(:channel, self.channel)
|
|
206
|
+
self.threeds_sdk = data.fetch(:threeds_sdk, self.threeds_sdk)
|
|
207
|
+
self.platform = data.fetch(:platform, self.platform)
|
|
186
208
|
self.ip_address = data.fetch(:ip_address, self.ip_address)
|
|
187
209
|
self.user_agent = data.fetch(:user_agent, self.user_agent)
|
|
188
210
|
self.header_accept = data.fetch(:header_accept, self.header_accept)
|
data/lib/processout/event.rb
CHANGED
|
@@ -213,7 +213,7 @@ module ProcessOut
|
|
|
213
213
|
return_values = Array.new
|
|
214
214
|
|
|
215
215
|
body = response.body
|
|
216
|
-
body = body["export_layout"]
|
|
216
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
obj = ExportLayout.new(@client)
|
|
@@ -241,7 +241,7 @@ module ProcessOut
|
|
|
241
241
|
return_values = Array.new
|
|
242
242
|
|
|
243
243
|
body = response.body
|
|
244
|
-
body = body["export_layout"]
|
|
244
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
|
245
245
|
|
|
246
246
|
|
|
247
247
|
obj = ExportLayout.new(@client)
|
|
@@ -271,7 +271,7 @@ module ProcessOut
|
|
|
271
271
|
return_values = Array.new
|
|
272
272
|
|
|
273
273
|
body = response.body
|
|
274
|
-
body = body["export_layout"]
|
|
274
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
|
275
275
|
|
|
276
276
|
|
|
277
277
|
return_values.push(self.fill_with_data(body))
|
|
@@ -300,7 +300,7 @@ module ProcessOut
|
|
|
300
300
|
return_values = Array.new
|
|
301
301
|
|
|
302
302
|
body = response.body
|
|
303
|
-
body = body["export_layout"]
|
|
303
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
|
304
304
|
|
|
305
305
|
|
|
306
306
|
return_values.push(self.fill_with_data(body))
|
|
@@ -128,7 +128,7 @@ module ProcessOut
|
|
|
128
128
|
return_values = Array.new
|
|
129
129
|
|
|
130
130
|
body = response.body
|
|
131
|
-
body = body["export_layout_configuration_options"]
|
|
131
|
+
body = body.key?("export_layout_configuration_options") ? body["export_layout_configuration_options"] : nil
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
obj = ExportLayoutConfigurationOptions.new(@client)
|
|
@@ -268,7 +268,7 @@ module ProcessOut
|
|
|
268
268
|
return_values = Array.new
|
|
269
269
|
|
|
270
270
|
body = response.body
|
|
271
|
-
body = body["gateway_configuration"]
|
|
271
|
+
body = body.key?("gateway_configuration") ? body["gateway_configuration"] : nil
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
obj = GatewayConfiguration.new(@client)
|
|
@@ -302,7 +302,7 @@ module ProcessOut
|
|
|
302
302
|
return_values = Array.new
|
|
303
303
|
|
|
304
304
|
body = response.body
|
|
305
|
-
body = body["gateway_configuration"]
|
|
305
|
+
body = body.key?("gateway_configuration") ? body["gateway_configuration"] : nil
|
|
306
306
|
|
|
307
307
|
|
|
308
308
|
return_values.push(self.fill_with_data(body))
|
|
@@ -357,7 +357,7 @@ module ProcessOut
|
|
|
357
357
|
return_values = Array.new
|
|
358
358
|
|
|
359
359
|
body = response.body
|
|
360
|
-
body = body["gateway_configuration"]
|
|
360
|
+
body = body.key?("gateway_configuration") ? body["gateway_configuration"] : nil
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
return_values.push(self.fill_with_data(body))
|