processout 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d38211f71cac0158917a5887e72683209ede7f1
4
- data.tar.gz: 35d08d6983873db282fd4bf877f88dd3898ce335
3
+ metadata.gz: 0df250817a5e841c24b075f69e8a63f502954e82
4
+ data.tar.gz: 2203137dd2a5445c87a9a59041fd69b1ca54ad2e
5
5
  SHA512:
6
- metadata.gz: a448b7652fd55659faefb9587cb28694eec76316853d1da633c39c39bc92e064cda40b6f719c9d1bc9ec7bd63e7bf929a0bfa5e3f9d9b4492b006e73bc60efea
7
- data.tar.gz: f001c7db1fd551bffea5a25f1689cc14bee796fdee5096a02bc912103e2f0299b8e6a7b6eebafdf7f91d202f2b3254b2205287561d52dd6097d84d0868a16ae1
6
+ metadata.gz: d8b977b5f9ac300b04470d985dedc9f367b68d6e33c6e0dd89215a0f57186ca4521b469c8509c504dd9db5b2df25ca08e908c886170aef21dac0ca1c638aa446
7
+ data.tar.gz: 5cfbea506d1e37dd787aec71f719350243b712bbeba9e539475790e70ba0d7b886445647367e92eb412efd2aac0cd71e4b2ae428fdd8cc0139994ee7734661b9
@@ -29,6 +29,7 @@ module ProcessOut
29
29
  attr_reader :zip
30
30
  attr_reader :country_code
31
31
  attr_reader :ip_address
32
+ attr_reader :fingerprint
32
33
  attr_reader :metadata
33
34
  attr_reader :expires_soon
34
35
  attr_reader :sandbox
@@ -147,6 +148,10 @@ module ProcessOut
147
148
  @ip_address = val
148
149
  end
149
150
 
151
+ def fingerprint=(val)
152
+ @fingerprint = val
153
+ end
154
+
150
155
  def metadata=(val)
151
156
  @metadata = val
152
157
  end
@@ -193,6 +198,7 @@ module ProcessOut
193
198
  self.zip = data.fetch(:zip, nil)
194
199
  self.country_code = data.fetch(:country_code, nil)
195
200
  self.ip_address = data.fetch(:ip_address, nil)
201
+ self.fingerprint = data.fetch(:fingerprint, nil)
196
202
  self.metadata = data.fetch(:metadata, nil)
197
203
  self.expires_soon = data.fetch(:expires_soon, nil)
198
204
  self.sandbox = data.fetch(:sandbox, nil)
@@ -278,6 +284,9 @@ module ProcessOut
278
284
  if data.include? "ip_address"
279
285
  self.ip_address = data["ip_address"]
280
286
  end
287
+ if data.include? "fingerprint"
288
+ self.fingerprint = data["fingerprint"]
289
+ end
281
290
  if data.include? "metadata"
282
291
  self.metadata = data["metadata"]
283
292
  end
@@ -323,6 +332,7 @@ module ProcessOut
323
332
  self.zip = data.fetch(:zip, self.zip)
324
333
  self.country_code = data.fetch(:country_code, self.country_code)
325
334
  self.ip_address = data.fetch(:ip_address, self.ip_address)
335
+ self.fingerprint = data.fetch(:fingerprint, self.fingerprint)
326
336
  self.metadata = data.fetch(:metadata, self.metadata)
327
337
  self.expires_soon = data.fetch(:expires_soon, self.expires_soon)
328
338
  self.sandbox = data.fetch(:sandbox, self.sandbox)
@@ -29,10 +29,6 @@ module ProcessOut
29
29
  attr_reader :ip_address
30
30
  attr_reader :phone_number
31
31
  attr_reader :legal_document
32
- attr_reader :transactions_count
33
- attr_reader :subscriptions_count
34
- attr_reader :mrr_local
35
- attr_reader :total_revenue_local
36
32
  attr_reader :metadata
37
33
  attr_reader :sandbox
38
34
  attr_reader :created_at
@@ -198,22 +194,6 @@ module ProcessOut
198
194
  @legal_document = val
199
195
  end
200
196
 
201
- def transactions_count=(val)
202
- @transactions_count = val
203
- end
204
-
205
- def subscriptions_count=(val)
206
- @subscriptions_count = val
207
- end
208
-
209
- def mrr_local=(val)
210
- @mrr_local = val
211
- end
212
-
213
- def total_revenue_local=(val)
214
- @total_revenue_local = val
215
- end
216
-
217
197
  def metadata=(val)
218
198
  @metadata = val
219
199
  end
@@ -256,10 +236,6 @@ module ProcessOut
256
236
  self.ip_address = data.fetch(:ip_address, nil)
257
237
  self.phone_number = data.fetch(:phone_number, nil)
258
238
  self.legal_document = data.fetch(:legal_document, nil)
259
- self.transactions_count = data.fetch(:transactions_count, nil)
260
- self.subscriptions_count = data.fetch(:subscriptions_count, nil)
261
- self.mrr_local = data.fetch(:mrr_local, nil)
262
- self.total_revenue_local = data.fetch(:total_revenue_local, nil)
263
239
  self.metadata = data.fetch(:metadata, nil)
264
240
  self.sandbox = data.fetch(:sandbox, nil)
265
241
  self.created_at = data.fetch(:created_at, nil)
@@ -344,18 +320,6 @@ module ProcessOut
344
320
  if data.include? "legal_document"
345
321
  self.legal_document = data["legal_document"]
346
322
  end
347
- if data.include? "transactions_count"
348
- self.transactions_count = data["transactions_count"]
349
- end
350
- if data.include? "subscriptions_count"
351
- self.subscriptions_count = data["subscriptions_count"]
352
- end
353
- if data.include? "mrr_local"
354
- self.mrr_local = data["mrr_local"]
355
- end
356
- if data.include? "total_revenue_local"
357
- self.total_revenue_local = data["total_revenue_local"]
358
- end
359
323
  if data.include? "metadata"
360
324
  self.metadata = data["metadata"]
361
325
  end
@@ -398,10 +362,6 @@ module ProcessOut
398
362
  self.ip_address = data.fetch(:ip_address, self.ip_address)
399
363
  self.phone_number = data.fetch(:phone_number, self.phone_number)
400
364
  self.legal_document = data.fetch(:legal_document, self.legal_document)
401
- self.transactions_count = data.fetch(:transactions_count, self.transactions_count)
402
- self.subscriptions_count = data.fetch(:subscriptions_count, self.subscriptions_count)
403
- self.mrr_local = data.fetch(:mrr_local, self.mrr_local)
404
- self.total_revenue_local = data.fetch(:total_revenue_local, self.total_revenue_local)
405
365
  self.metadata = data.fetch(:metadata, self.metadata)
406
366
  self.sandbox = data.fetch(:sandbox, self.sandbox)
407
367
  self.created_at = data.fetch(:created_at, self.created_at)
@@ -436,6 +396,28 @@ module ProcessOut
436
396
 
437
397
 
438
398
 
399
+ return_values[0]
400
+ end
401
+
402
+ # Verify a customer token's card is valid.
403
+ # Params:
404
+ # +token_id+:: ID of the token
405
+ # +options+:: +Hash+ of options
406
+ def verify_token(token_id, options = {})
407
+ self.prefill(options)
408
+
409
+ request = Request.new(@client)
410
+ path = "/customers/" + CGI.escape(@id) + "/tokens/" + CGI.escape(token_id) + "/verify"
411
+ data = {
412
+
413
+ }
414
+
415
+ response = Response.new(request.post(path, data, options))
416
+ return_values = Array.new
417
+
418
+ return_values.push(response.success)
419
+
420
+
439
421
  return_values[0]
440
422
  end
441
423
 
@@ -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/2.8.0"
16
+ req["User-Agent"] = "ProcessOut Ruby-Bindings/2.9.0"
17
17
 
18
18
  unless options.nil?
19
19
  req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
@@ -15,8 +15,9 @@ module ProcessOut
15
15
  attr_reader :transaction
16
16
  attr_reader :transaction_id
17
17
  attr_reader :type
18
- attr_reader :gateway_id
19
- attr_reader :fee
18
+ attr_reader :gateway_resource_id
19
+ attr_reader :amount
20
+ attr_reader :fees
20
21
  attr_reader :metadata
21
22
  attr_reader :created_at
22
23
 
@@ -89,12 +90,16 @@ module ProcessOut
89
90
  @type = val
90
91
  end
91
92
 
92
- def gateway_id=(val)
93
- @gateway_id = val
93
+ def gateway_resource_id=(val)
94
+ @gateway_resource_id = val
94
95
  end
95
96
 
96
- def fee=(val)
97
- @fee = val
97
+ def amount=(val)
98
+ @amount = val
99
+ end
100
+
101
+ def fees=(val)
102
+ @fees = val
98
103
  end
99
104
 
100
105
  def metadata=(val)
@@ -121,8 +126,9 @@ module ProcessOut
121
126
  self.transaction = data.fetch(:transaction, nil)
122
127
  self.transaction_id = data.fetch(:transaction_id, nil)
123
128
  self.type = data.fetch(:type, nil)
124
- self.gateway_id = data.fetch(:gateway_id, nil)
125
- self.fee = data.fetch(:fee, nil)
129
+ self.gateway_resource_id = data.fetch(:gateway_resource_id, nil)
130
+ self.amount = data.fetch(:amount, nil)
131
+ self.fees = data.fetch(:fees, nil)
126
132
  self.metadata = data.fetch(:metadata, nil)
127
133
  self.created_at = data.fetch(:created_at, nil)
128
134
 
@@ -164,11 +170,14 @@ module ProcessOut
164
170
  if data.include? "type"
165
171
  self.type = data["type"]
166
172
  end
167
- if data.include? "gateway_id"
168
- self.gateway_id = data["gateway_id"]
173
+ if data.include? "gateway_resource_id"
174
+ self.gateway_resource_id = data["gateway_resource_id"]
175
+ end
176
+ if data.include? "amount"
177
+ self.amount = data["amount"]
169
178
  end
170
- if data.include? "fee"
171
- self.fee = data["fee"]
179
+ if data.include? "fees"
180
+ self.fees = data["fees"]
172
181
  end
173
182
  if data.include? "metadata"
174
183
  self.metadata = data["metadata"]
@@ -195,8 +204,9 @@ module ProcessOut
195
204
  self.transaction = data.fetch(:transaction, self.transaction)
196
205
  self.transaction_id = data.fetch(:transaction_id, self.transaction_id)
197
206
  self.type = data.fetch(:type, self.type)
198
- self.gateway_id = data.fetch(:gateway_id, self.gateway_id)
199
- self.fee = data.fetch(:fee, self.fee)
207
+ self.gateway_resource_id = data.fetch(:gateway_resource_id, self.gateway_resource_id)
208
+ self.amount = data.fetch(:amount, self.amount)
209
+ self.fees = data.fetch(:fees, self.fees)
200
210
  self.metadata = data.fetch(:metadata, self.metadata)
201
211
  self.created_at = data.fetch(:created_at, self.created_at)
202
212
 
@@ -203,6 +203,27 @@ module ProcessOut
203
203
  self
204
204
  end
205
205
 
206
+ # Verify a customer token's card is valid.
207
+ # Params:
208
+ # +options+:: +Hash+ of options
209
+ def verify(options = {})
210
+ self.prefill(options)
211
+
212
+ request = Request.new(@client)
213
+ path = "/customers/" + CGI.escape(@customer_id) + "/tokens/" + CGI.escape(@id) + "/verify"
214
+ data = {
215
+
216
+ }
217
+
218
+ response = Response.new(request.post(path, data, options))
219
+ return_values = Array.new
220
+
221
+ return_values.push(response.success)
222
+
223
+
224
+ return_values[0]
225
+ end
226
+
206
227
  # Get the customer's tokens.
207
228
  # Params:
208
229
  # +customer_id+:: ID of the customer
@@ -276,6 +297,8 @@ module ProcessOut
276
297
  "source" => options.fetch(:source, nil),
277
298
  "settings" => options.fetch(:settings, nil),
278
299
  "target" => options.fetch(:target, nil),
300
+ "verify" => options.fetch(:verify, nil),
301
+ "verify_metadata" => options.fetch(:verify_metadata, nil),
279
302
  "set_default" => options.fetch(:set_default, nil)
280
303
  }
281
304
 
@@ -26,10 +26,15 @@ module ProcessOut
26
26
  attr_reader :refunds
27
27
  attr_reader :name
28
28
  attr_reader :amount
29
+ attr_reader :amount_local
29
30
  attr_reader :authorized_amount
31
+ attr_reader :authorized_amount_local
30
32
  attr_reader :captured_amount
33
+ attr_reader :captured_amount_local
31
34
  attr_reader :refunded_amount
35
+ attr_reader :refunded_amount_local
32
36
  attr_reader :available_amount
37
+ attr_reader :available_amount_local
33
38
  attr_reader :currency
34
39
  attr_reader :error_code
35
40
  attr_reader :three_d_s_status
@@ -39,6 +44,8 @@ module ProcessOut
39
44
  attr_reader :processout_fee
40
45
  attr_reader :estimated_fee
41
46
  attr_reader :gateway_fee
47
+ attr_reader :gateway_fee_local
48
+ attr_reader :currency_fee
42
49
  attr_reader :metadata
43
50
  attr_reader :sandbox
44
51
  attr_reader :created_at
@@ -236,22 +243,42 @@ module ProcessOut
236
243
  @amount = val
237
244
  end
238
245
 
246
+ def amount_local=(val)
247
+ @amount_local = val
248
+ end
249
+
239
250
  def authorized_amount=(val)
240
251
  @authorized_amount = val
241
252
  end
242
253
 
254
+ def authorized_amount_local=(val)
255
+ @authorized_amount_local = val
256
+ end
257
+
243
258
  def captured_amount=(val)
244
259
  @captured_amount = val
245
260
  end
246
261
 
262
+ def captured_amount_local=(val)
263
+ @captured_amount_local = val
264
+ end
265
+
247
266
  def refunded_amount=(val)
248
267
  @refunded_amount = val
249
268
  end
250
269
 
270
+ def refunded_amount_local=(val)
271
+ @refunded_amount_local = val
272
+ end
273
+
251
274
  def available_amount=(val)
252
275
  @available_amount = val
253
276
  end
254
277
 
278
+ def available_amount_local=(val)
279
+ @available_amount_local = val
280
+ end
281
+
255
282
  def currency=(val)
256
283
  @currency = val
257
284
  end
@@ -288,6 +315,14 @@ module ProcessOut
288
315
  @gateway_fee = val
289
316
  end
290
317
 
318
+ def gateway_fee_local=(val)
319
+ @gateway_fee_local = val
320
+ end
321
+
322
+ def currency_fee=(val)
323
+ @currency_fee = val
324
+ end
325
+
291
326
  def metadata=(val)
292
327
  @metadata = val
293
328
  end
@@ -327,10 +362,15 @@ module ProcessOut
327
362
  self.refunds = data.fetch(:refunds, nil)
328
363
  self.name = data.fetch(:name, nil)
329
364
  self.amount = data.fetch(:amount, nil)
365
+ self.amount_local = data.fetch(:amount_local, nil)
330
366
  self.authorized_amount = data.fetch(:authorized_amount, nil)
367
+ self.authorized_amount_local = data.fetch(:authorized_amount_local, nil)
331
368
  self.captured_amount = data.fetch(:captured_amount, nil)
369
+ self.captured_amount_local = data.fetch(:captured_amount_local, nil)
332
370
  self.refunded_amount = data.fetch(:refunded_amount, nil)
371
+ self.refunded_amount_local = data.fetch(:refunded_amount_local, nil)
333
372
  self.available_amount = data.fetch(:available_amount, nil)
373
+ self.available_amount_local = data.fetch(:available_amount_local, nil)
334
374
  self.currency = data.fetch(:currency, nil)
335
375
  self.error_code = data.fetch(:error_code, nil)
336
376
  self.three_d_s_status = data.fetch(:three_d_s_status, nil)
@@ -340,6 +380,8 @@ module ProcessOut
340
380
  self.processout_fee = data.fetch(:processout_fee, nil)
341
381
  self.estimated_fee = data.fetch(:estimated_fee, nil)
342
382
  self.gateway_fee = data.fetch(:gateway_fee, nil)
383
+ self.gateway_fee_local = data.fetch(:gateway_fee_local, nil)
384
+ self.currency_fee = data.fetch(:currency_fee, nil)
343
385
  self.metadata = data.fetch(:metadata, nil)
344
386
  self.sandbox = data.fetch(:sandbox, nil)
345
387
  self.created_at = data.fetch(:created_at, nil)
@@ -415,18 +457,33 @@ module ProcessOut
415
457
  if data.include? "amount"
416
458
  self.amount = data["amount"]
417
459
  end
460
+ if data.include? "amount_local"
461
+ self.amount_local = data["amount_local"]
462
+ end
418
463
  if data.include? "authorized_amount"
419
464
  self.authorized_amount = data["authorized_amount"]
420
465
  end
466
+ if data.include? "authorized_amount_local"
467
+ self.authorized_amount_local = data["authorized_amount_local"]
468
+ end
421
469
  if data.include? "captured_amount"
422
470
  self.captured_amount = data["captured_amount"]
423
471
  end
472
+ if data.include? "captured_amount_local"
473
+ self.captured_amount_local = data["captured_amount_local"]
474
+ end
424
475
  if data.include? "refunded_amount"
425
476
  self.refunded_amount = data["refunded_amount"]
426
477
  end
478
+ if data.include? "refunded_amount_local"
479
+ self.refunded_amount_local = data["refunded_amount_local"]
480
+ end
427
481
  if data.include? "available_amount"
428
482
  self.available_amount = data["available_amount"]
429
483
  end
484
+ if data.include? "available_amount_local"
485
+ self.available_amount_local = data["available_amount_local"]
486
+ end
430
487
  if data.include? "currency"
431
488
  self.currency = data["currency"]
432
489
  end
@@ -454,6 +511,12 @@ module ProcessOut
454
511
  if data.include? "gateway_fee"
455
512
  self.gateway_fee = data["gateway_fee"]
456
513
  end
514
+ if data.include? "gateway_fee_local"
515
+ self.gateway_fee_local = data["gateway_fee_local"]
516
+ end
517
+ if data.include? "currency_fee"
518
+ self.currency_fee = data["currency_fee"]
519
+ end
457
520
  if data.include? "metadata"
458
521
  self.metadata = data["metadata"]
459
522
  end
@@ -493,10 +556,15 @@ module ProcessOut
493
556
  self.refunds = data.fetch(:refunds, self.refunds)
494
557
  self.name = data.fetch(:name, self.name)
495
558
  self.amount = data.fetch(:amount, self.amount)
559
+ self.amount_local = data.fetch(:amount_local, self.amount_local)
496
560
  self.authorized_amount = data.fetch(:authorized_amount, self.authorized_amount)
561
+ self.authorized_amount_local = data.fetch(:authorized_amount_local, self.authorized_amount_local)
497
562
  self.captured_amount = data.fetch(:captured_amount, self.captured_amount)
563
+ self.captured_amount_local = data.fetch(:captured_amount_local, self.captured_amount_local)
498
564
  self.refunded_amount = data.fetch(:refunded_amount, self.refunded_amount)
565
+ self.refunded_amount_local = data.fetch(:refunded_amount_local, self.refunded_amount_local)
499
566
  self.available_amount = data.fetch(:available_amount, self.available_amount)
567
+ self.available_amount_local = data.fetch(:available_amount_local, self.available_amount_local)
500
568
  self.currency = data.fetch(:currency, self.currency)
501
569
  self.error_code = data.fetch(:error_code, self.error_code)
502
570
  self.three_d_s_status = data.fetch(:three_d_s_status, self.three_d_s_status)
@@ -506,6 +574,8 @@ module ProcessOut
506
574
  self.processout_fee = data.fetch(:processout_fee, self.processout_fee)
507
575
  self.estimated_fee = data.fetch(:estimated_fee, self.estimated_fee)
508
576
  self.gateway_fee = data.fetch(:gateway_fee, self.gateway_fee)
577
+ self.gateway_fee_local = data.fetch(:gateway_fee_local, self.gateway_fee_local)
578
+ self.currency_fee = data.fetch(:currency_fee, self.currency_fee)
509
579
  self.metadata = data.fetch(:metadata, self.metadata)
510
580
  self.sandbox = data.fetch(:sandbox, self.sandbox)
511
581
  self.created_at = data.fetch(:created_at, self.created_at)
@@ -1,3 +1,3 @@
1
1
  module ProcessOut
2
- VERSION = "2.8.0"
2
+ VERSION = "2.9.0"
3
3
  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: 2.8.0
4
+ version: 2.9.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: 2018-11-12 00:00:00.000000000 Z
11
+ date: 2019-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler