processout 3.1.0 → 3.2.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/lib/processout/customer.rb +13 -0
- data/lib/processout/invoice.rb +58 -0
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/transaction_operation.rb +22 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e8daa8d1cc656514933e0ec155f7122c3ebf83dc38d0822fe84b35f564d21b3
|
4
|
+
data.tar.gz: e7368e3ca75fbb6fa7433b9be63eb17b08b4ea5a4ff6efa1ac24a9d0731b1900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e480c86976daefe7ba9a42a43c3d370460b153ab9fd741060c2223cc33377cdb1b577fdaa91babc56eb5ac68ac2583196fbdc92712a267f0caaf87404c8fd76
|
7
|
+
data.tar.gz: bef5723beeea07634c8bf20b83358e2c83688961d6446b63f27c9d8aeb3af7378127f907aff70f7f93ee29265169a24ed00d1501deaff628e9c2cbbe7fa42111
|
data/lib/processout/customer.rb
CHANGED
@@ -21,6 +21,7 @@ module ProcessOut
|
|
21
21
|
attr_reader :email
|
22
22
|
attr_reader :first_name
|
23
23
|
attr_reader :last_name
|
24
|
+
attr_reader :company_name
|
24
25
|
attr_reader :address1
|
25
26
|
attr_reader :address2
|
26
27
|
attr_reader :city
|
@@ -164,6 +165,10 @@ module ProcessOut
|
|
164
165
|
@last_name = val
|
165
166
|
end
|
166
167
|
|
168
|
+
def company_name=(val)
|
169
|
+
@company_name = val
|
170
|
+
end
|
171
|
+
|
167
172
|
def address1=(val)
|
168
173
|
@address1 = val
|
169
174
|
end
|
@@ -265,6 +270,7 @@ module ProcessOut
|
|
265
270
|
self.email = data.fetch(:email, nil)
|
266
271
|
self.first_name = data.fetch(:first_name, nil)
|
267
272
|
self.last_name = data.fetch(:last_name, nil)
|
273
|
+
self.company_name = data.fetch(:company_name, nil)
|
268
274
|
self.address1 = data.fetch(:address1, nil)
|
269
275
|
self.address2 = data.fetch(:address2, nil)
|
270
276
|
self.city = data.fetch(:city, nil)
|
@@ -306,6 +312,7 @@ module ProcessOut
|
|
306
312
|
"email": self.email,
|
307
313
|
"first_name": self.first_name,
|
308
314
|
"last_name": self.last_name,
|
315
|
+
"company_name": self.company_name,
|
309
316
|
"address1": self.address1,
|
310
317
|
"address2": self.address2,
|
311
318
|
"city": self.city,
|
@@ -372,6 +379,9 @@ module ProcessOut
|
|
372
379
|
if data.include? "last_name"
|
373
380
|
self.last_name = data["last_name"]
|
374
381
|
end
|
382
|
+
if data.include? "company_name"
|
383
|
+
self.company_name = data["company_name"]
|
384
|
+
end
|
375
385
|
if data.include? "address1"
|
376
386
|
self.address1 = data["address1"]
|
377
387
|
end
|
@@ -447,6 +457,7 @@ module ProcessOut
|
|
447
457
|
self.email = data.fetch(:email, self.email)
|
448
458
|
self.first_name = data.fetch(:first_name, self.first_name)
|
449
459
|
self.last_name = data.fetch(:last_name, self.last_name)
|
460
|
+
self.company_name = data.fetch(:company_name, self.company_name)
|
450
461
|
self.address1 = data.fetch(:address1, self.address1)
|
451
462
|
self.address2 = data.fetch(:address2, self.address2)
|
452
463
|
self.city = data.fetch(:city, self.city)
|
@@ -649,6 +660,7 @@ module ProcessOut
|
|
649
660
|
"email" => @email,
|
650
661
|
"first_name" => @first_name,
|
651
662
|
"last_name" => @last_name,
|
663
|
+
"company_name" => @company_name,
|
652
664
|
"address1" => @address1,
|
653
665
|
"address2" => @address2,
|
654
666
|
"city" => @city,
|
@@ -723,6 +735,7 @@ module ProcessOut
|
|
723
735
|
"email" => @email,
|
724
736
|
"first_name" => @first_name,
|
725
737
|
"last_name" => @last_name,
|
738
|
+
"company_name" => @company_name,
|
726
739
|
"address1" => @address1,
|
727
740
|
"address2" => @address2,
|
728
741
|
"city" => @city,
|
data/lib/processout/invoice.rb
CHANGED
@@ -1229,6 +1229,64 @@ module ProcessOut
|
|
1229
1229
|
return_values.push(response.success)
|
1230
1230
|
|
1231
1231
|
|
1232
|
+
return_values[0]
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
# Refresh invoice by its ID with PSP.
|
1236
|
+
# Params:
|
1237
|
+
# +invoice_id+:: ID of the invoice
|
1238
|
+
# +options+:: +Hash+ of options
|
1239
|
+
def sync_with_psp(invoice_id, options = {})
|
1240
|
+
self.prefill(options)
|
1241
|
+
|
1242
|
+
request = Request.new(@client)
|
1243
|
+
path = "/invoices/" + CGI.escape(invoice_id) + "/sync-with-psp"
|
1244
|
+
data = {
|
1245
|
+
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
response = Response.new(request.put(path, data, options))
|
1249
|
+
return_values = Array.new
|
1250
|
+
|
1251
|
+
body = response.body
|
1252
|
+
body = body["invoice"]
|
1253
|
+
|
1254
|
+
|
1255
|
+
obj = Invoice.new(@client)
|
1256
|
+
return_values.push(obj.fill_with_data(body))
|
1257
|
+
|
1258
|
+
|
1259
|
+
|
1260
|
+
return_values[0]
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
# Update invoice by its ID.
|
1264
|
+
# Params:
|
1265
|
+
# +invoice_id+:: ID of the invoice
|
1266
|
+
# +options+:: +Hash+ of options
|
1267
|
+
def update(invoice_id, options = {})
|
1268
|
+
self.prefill(options)
|
1269
|
+
|
1270
|
+
request = Request.new(@client)
|
1271
|
+
path = "/invoices/" + CGI.escape(invoice_id) + ""
|
1272
|
+
data = {
|
1273
|
+
"amount" => @amount,
|
1274
|
+
"tax" => @tax,
|
1275
|
+
"details" => @details,
|
1276
|
+
"shipping" => @shipping
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
response = Response.new(request.put(path, data, options))
|
1280
|
+
return_values = Array.new
|
1281
|
+
|
1282
|
+
body = response.body
|
1283
|
+
body = body["invoice"]
|
1284
|
+
|
1285
|
+
|
1286
|
+
return_values.push(self.fill_with_data(body))
|
1287
|
+
|
1288
|
+
|
1289
|
+
|
1232
1290
|
return_values[0]
|
1233
1291
|
end
|
1234
1292
|
|
@@ -13,7 +13,7 @@ module ProcessOut
|
|
13
13
|
req.basic_auth @client.project_id, @client.project_secret
|
14
14
|
req.content_type = "application/json"
|
15
15
|
req["API-Version"] = "1.4.0.0"
|
16
|
-
req["User-Agent"] = "ProcessOut Ruby-Bindings/3.
|
16
|
+
req["User-Agent"] = "ProcessOut Ruby-Bindings/3.2.0"
|
17
17
|
|
18
18
|
unless options.nil?
|
19
19
|
req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
|
@@ -26,12 +26,14 @@ module ProcessOut
|
|
26
26
|
attr_reader :gateway_operation_id
|
27
27
|
attr_reader :arn
|
28
28
|
attr_reader :error_code
|
29
|
+
attr_reader :error_message
|
29
30
|
attr_reader :gateway_data
|
30
31
|
attr_reader :payment_data_three_d_s_request
|
31
32
|
attr_reader :payment_data_three_d_s_authentication
|
32
33
|
attr_reader :payment_data_network_authentication
|
33
34
|
attr_reader :initial_scheme_transaction_id
|
34
35
|
attr_reader :scheme_id
|
36
|
+
attr_reader :processed_with_network_token
|
35
37
|
attr_reader :payment_type
|
36
38
|
attr_reader :metadata
|
37
39
|
attr_reader :gateway_fee
|
@@ -158,6 +160,10 @@ module ProcessOut
|
|
158
160
|
@error_code = val
|
159
161
|
end
|
160
162
|
|
163
|
+
def error_message=(val)
|
164
|
+
@error_message = val
|
165
|
+
end
|
166
|
+
|
161
167
|
def gateway_data=(val)
|
162
168
|
@gateway_data = val
|
163
169
|
end
|
@@ -218,6 +224,10 @@ module ProcessOut
|
|
218
224
|
@scheme_id = val
|
219
225
|
end
|
220
226
|
|
227
|
+
def processed_with_network_token=(val)
|
228
|
+
@processed_with_network_token = val
|
229
|
+
end
|
230
|
+
|
221
231
|
def payment_type=(val)
|
222
232
|
@payment_type = val
|
223
233
|
end
|
@@ -260,12 +270,14 @@ module ProcessOut
|
|
260
270
|
self.gateway_operation_id = data.fetch(:gateway_operation_id, nil)
|
261
271
|
self.arn = data.fetch(:arn, nil)
|
262
272
|
self.error_code = data.fetch(:error_code, nil)
|
273
|
+
self.error_message = data.fetch(:error_message, nil)
|
263
274
|
self.gateway_data = data.fetch(:gateway_data, nil)
|
264
275
|
self.payment_data_three_d_s_request = data.fetch(:payment_data_three_d_s_request, nil)
|
265
276
|
self.payment_data_three_d_s_authentication = data.fetch(:payment_data_three_d_s_authentication, nil)
|
266
277
|
self.payment_data_network_authentication = data.fetch(:payment_data_network_authentication, nil)
|
267
278
|
self.initial_scheme_transaction_id = data.fetch(:initial_scheme_transaction_id, nil)
|
268
279
|
self.scheme_id = data.fetch(:scheme_id, nil)
|
280
|
+
self.processed_with_network_token = data.fetch(:processed_with_network_token, nil)
|
269
281
|
self.payment_type = data.fetch(:payment_type, nil)
|
270
282
|
self.metadata = data.fetch(:metadata, nil)
|
271
283
|
self.gateway_fee = data.fetch(:gateway_fee, nil)
|
@@ -299,12 +311,14 @@ module ProcessOut
|
|
299
311
|
"gateway_operation_id": self.gateway_operation_id,
|
300
312
|
"arn": self.arn,
|
301
313
|
"error_code": self.error_code,
|
314
|
+
"error_message": self.error_message,
|
302
315
|
"gateway_data": self.gateway_data,
|
303
316
|
"payment_data_three_d_s_request": self.payment_data_three_d_s_request,
|
304
317
|
"payment_data_three_d_s_authentication": self.payment_data_three_d_s_authentication,
|
305
318
|
"payment_data_network_authentication": self.payment_data_network_authentication,
|
306
319
|
"initial_scheme_transaction_id": self.initial_scheme_transaction_id,
|
307
320
|
"scheme_id": self.scheme_id,
|
321
|
+
"processed_with_network_token": self.processed_with_network_token,
|
308
322
|
"payment_type": self.payment_type,
|
309
323
|
"metadata": self.metadata,
|
310
324
|
"gateway_fee": self.gateway_fee,
|
@@ -373,6 +387,9 @@ module ProcessOut
|
|
373
387
|
if data.include? "error_code"
|
374
388
|
self.error_code = data["error_code"]
|
375
389
|
end
|
390
|
+
if data.include? "error_message"
|
391
|
+
self.error_message = data["error_message"]
|
392
|
+
end
|
376
393
|
if data.include? "gateway_data"
|
377
394
|
self.gateway_data = data["gateway_data"]
|
378
395
|
end
|
@@ -391,6 +408,9 @@ module ProcessOut
|
|
391
408
|
if data.include? "scheme_id"
|
392
409
|
self.scheme_id = data["scheme_id"]
|
393
410
|
end
|
411
|
+
if data.include? "processed_with_network_token"
|
412
|
+
self.processed_with_network_token = data["processed_with_network_token"]
|
413
|
+
end
|
394
414
|
if data.include? "payment_type"
|
395
415
|
self.payment_type = data["payment_type"]
|
396
416
|
end
|
@@ -432,12 +452,14 @@ module ProcessOut
|
|
432
452
|
self.gateway_operation_id = data.fetch(:gateway_operation_id, self.gateway_operation_id)
|
433
453
|
self.arn = data.fetch(:arn, self.arn)
|
434
454
|
self.error_code = data.fetch(:error_code, self.error_code)
|
455
|
+
self.error_message = data.fetch(:error_message, self.error_message)
|
435
456
|
self.gateway_data = data.fetch(:gateway_data, self.gateway_data)
|
436
457
|
self.payment_data_three_d_s_request = data.fetch(:payment_data_three_d_s_request, self.payment_data_three_d_s_request)
|
437
458
|
self.payment_data_three_d_s_authentication = data.fetch(:payment_data_three_d_s_authentication, self.payment_data_three_d_s_authentication)
|
438
459
|
self.payment_data_network_authentication = data.fetch(:payment_data_network_authentication, self.payment_data_network_authentication)
|
439
460
|
self.initial_scheme_transaction_id = data.fetch(:initial_scheme_transaction_id, self.initial_scheme_transaction_id)
|
440
461
|
self.scheme_id = data.fetch(:scheme_id, self.scheme_id)
|
462
|
+
self.processed_with_network_token = data.fetch(:processed_with_network_token, self.processed_with_network_token)
|
441
463
|
self.payment_type = data.fetch(:payment_type, self.payment_type)
|
442
464
|
self.metadata = data.fetch(:metadata, self.metadata)
|
443
465
|
self.gateway_fee = data.fetch(:gateway_fee, self.gateway_fee)
|
data/lib/processout/version.rb
CHANGED
data/lib/processout.rb
CHANGED
@@ -69,9 +69,9 @@ require "processout/card_update_request"
|
|
69
69
|
require "processout/error_codes"
|
70
70
|
require "processout/category_error_codes"
|
71
71
|
require "processout/external_three_ds"
|
72
|
-
require "processout/native_apm_transaction_details"
|
73
72
|
require "processout/native_apm_transaction_details_gateway"
|
74
73
|
require "processout/native_apm_transaction_details_invoice"
|
74
|
+
require "processout/native_apm_transaction_details"
|
75
75
|
|
76
76
|
module ProcessOut
|
77
77
|
class Client
|
@@ -429,11 +429,6 @@ module ProcessOut
|
|
429
429
|
obj = ExternalThreeDS.new(self, data)
|
430
430
|
end
|
431
431
|
|
432
|
-
# Create a new NativeAPMTransactionDetails instance
|
433
|
-
def native_apm_transaction_details(data = {})
|
434
|
-
obj = NativeAPMTransactionDetails.new(self, data)
|
435
|
-
end
|
436
|
-
|
437
432
|
# Create a new NativeAPMTransactionDetailsGateway instance
|
438
433
|
def native_apm_transaction_details_gateway(data = {})
|
439
434
|
obj = NativeAPMTransactionDetailsGateway.new(self, data)
|
@@ -444,6 +439,11 @@ module ProcessOut
|
|
444
439
|
obj = NativeAPMTransactionDetailsInvoice.new(self, data)
|
445
440
|
end
|
446
441
|
|
442
|
+
# Create a new NativeAPMTransactionDetails instance
|
443
|
+
def native_apm_transaction_details(data = {})
|
444
|
+
obj = NativeAPMTransactionDetails.new(self, data)
|
445
|
+
end
|
446
|
+
|
447
447
|
|
448
448
|
end
|
449
449
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: processout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel HUEZ
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.4.20
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Ruby bindings for the ProcessOut API
|