pagseguro-oficial 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -1
  3. data/README.md +54 -2
  4. data/examples/{authorization.rb → authorization/authorization.rb} +1 -1
  5. data/examples/{authorization_by_code.rb → authorization/authorization_by_code.rb} +1 -1
  6. data/examples/{authorization_by_notification_code.rb → authorization/authorization_by_notification_code.rb} +1 -1
  7. data/examples/refund.rb +25 -0
  8. data/examples/{abandoned_transactions.rb → transaction/abandoned_transactions.rb} +1 -1
  9. data/examples/{boleto_transaction_request.rb → transaction/boleto_transaction_request.rb} +1 -1
  10. data/examples/{credit_card_transaction_request.rb → transaction/credit_card_transaction_request.rb} +1 -1
  11. data/examples/{invalid_transaction_by_notification_code.rb → transaction/invalid_transaction_by_notification_code.rb} +1 -1
  12. data/examples/{online_debit_transaction.rb → transaction/online_debit_transaction.rb} +1 -1
  13. data/examples/{transaction_by_code.rb → transaction/transaction_by_code.rb} +1 -1
  14. data/examples/{transaction_by_notification_code.rb → transaction/transaction_by_notification_code.rb} +1 -1
  15. data/examples/{transaction_by_reference.rb → transaction/transaction_by_reference.rb} +1 -1
  16. data/examples/transaction/transaction_cancellation.rb +19 -0
  17. data/examples/transaction/transaction_status_history.rb +22 -0
  18. data/examples/{transactions_by_date.rb → transaction/transactions_by_date.rb} +1 -1
  19. data/lib/pagseguro/installment.rb +14 -0
  20. data/lib/pagseguro/payment_request/serializer.rb +48 -55
  21. data/lib/pagseguro/refund/request_serializer.rb +24 -0
  22. data/lib/pagseguro/refund/response.rb +33 -0
  23. data/lib/pagseguro/refund/response_serializer.rb +17 -0
  24. data/lib/pagseguro/refund/serializer.rb +24 -0
  25. data/lib/pagseguro/refund.rb +44 -0
  26. data/lib/pagseguro/transaction/collection.rb +20 -0
  27. data/lib/pagseguro/transaction/response.rb +37 -4
  28. data/lib/pagseguro/transaction/search.rb +1 -1
  29. data/lib/pagseguro/transaction/serializer.rb +14 -3
  30. data/lib/pagseguro/transaction/status_collection.rb +20 -0
  31. data/lib/pagseguro/transaction.rb +34 -14
  32. data/lib/pagseguro/transaction_cancellation/request_serializer.rb +18 -0
  33. data/lib/pagseguro/transaction_cancellation/response.rb +32 -0
  34. data/lib/pagseguro/transaction_cancellation/response_serializer.rb +17 -0
  35. data/lib/pagseguro/transaction_cancellation/serializer.rb +18 -0
  36. data/lib/pagseguro/transaction_cancellation.rb +40 -0
  37. data/lib/pagseguro/transaction_status.rb +14 -0
  38. data/lib/pagseguro/version.rb +1 -1
  39. data/lib/pagseguro.rb +13 -0
  40. data/spec/fixtures/refund/success.xml +2 -0
  41. data/spec/fixtures/transaction_cancellation/success.xml +2 -0
  42. data/spec/fixtures/transactions/status_history.xml +12 -0
  43. data/spec/pagseguro/refund/request_serializer_spec.rb +15 -0
  44. data/spec/pagseguro/refund/response_serializer_spec.rb +12 -0
  45. data/spec/pagseguro/refund/response_spec.rb +39 -0
  46. data/spec/pagseguro/refund/serializer_spec.rb +15 -0
  47. data/spec/pagseguro/refund_spec.rb +63 -0
  48. data/spec/pagseguro/request_spec.rb +0 -4
  49. data/spec/pagseguro/transaction/collection_spec.rb +43 -0
  50. data/spec/pagseguro/transaction/response_spec.rb +96 -0
  51. data/spec/pagseguro/transaction/search/search_abandoned_spec.rb +41 -28
  52. data/spec/pagseguro/transaction/search/search_by_date_spec.rb +20 -18
  53. data/spec/pagseguro/transaction/search/search_by_reference_spec.rb +13 -18
  54. data/spec/pagseguro/transaction/search_spec.rb +1 -6
  55. data/spec/pagseguro/transaction/serializer_spec.rb +11 -0
  56. data/spec/pagseguro/transaction/status_collection_spec.rb +43 -0
  57. data/spec/pagseguro/transaction_cancellation/request_serializer_spec.rb +13 -0
  58. data/spec/pagseguro/transaction_cancellation/response_serializer_spec.rb +9 -0
  59. data/spec/pagseguro/transaction_cancellation/response_spec.rb +42 -0
  60. data/spec/pagseguro/transaction_cancellation/serializer_spec.rb +13 -0
  61. data/spec/pagseguro/transaction_cancellation_spec.rb +58 -0
  62. data/spec/pagseguro/transaction_spec.rb +159 -13
  63. data/spec/pagseguro/transaction_status_spec.rb +7 -0
  64. data/spec/spec_helper.rb +9 -0
  65. metadata +64 -14
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagseguro-oficial
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aitch
@@ -166,22 +166,25 @@ files:
166
166
  - README.md
167
167
  - Rakefile
168
168
  - docs/transparent_checkout.md
169
- - examples/abandoned_transactions.rb
170
- - examples/authorization.rb
171
- - examples/authorization_by_code.rb
172
- - examples/authorization_by_notification_code.rb
173
- - examples/boleto_transaction_request.rb
169
+ - examples/authorization/authorization.rb
170
+ - examples/authorization/authorization_by_code.rb
171
+ - examples/authorization/authorization_by_notification_code.rb
174
172
  - examples/boot.rb
175
173
  - examples/create_session.rb
176
- - examples/credit_card_transaction_request.rb
177
174
  - examples/installment.rb
178
- - examples/invalid_transaction_by_notification_code.rb
179
- - examples/online_debit_transaction.rb
180
175
  - examples/payment_request.rb
181
- - examples/transaction_by_code.rb
182
- - examples/transaction_by_notification_code.rb
183
- - examples/transaction_by_reference.rb
184
- - examples/transactions_by_date.rb
176
+ - examples/refund.rb
177
+ - examples/transaction/abandoned_transactions.rb
178
+ - examples/transaction/boleto_transaction_request.rb
179
+ - examples/transaction/credit_card_transaction_request.rb
180
+ - examples/transaction/invalid_transaction_by_notification_code.rb
181
+ - examples/transaction/online_debit_transaction.rb
182
+ - examples/transaction/transaction_by_code.rb
183
+ - examples/transaction/transaction_by_notification_code.rb
184
+ - examples/transaction/transaction_by_reference.rb
185
+ - examples/transaction/transaction_cancellation.rb
186
+ - examples/transaction/transaction_status_history.rb
187
+ - examples/transaction/transactions_by_date.rb
185
188
  - lib/pagseguro-oficial.rb
186
189
  - lib/pagseguro.rb
187
190
  - lib/pagseguro/account_credentials.rb
@@ -228,6 +231,11 @@ files:
228
231
  - lib/pagseguro/payment_status.rb
229
232
  - lib/pagseguro/permission.rb
230
233
  - lib/pagseguro/phone.rb
234
+ - lib/pagseguro/refund.rb
235
+ - lib/pagseguro/refund/request_serializer.rb
236
+ - lib/pagseguro/refund/response.rb
237
+ - lib/pagseguro/refund/response_serializer.rb
238
+ - lib/pagseguro/refund/serializer.rb
231
239
  - lib/pagseguro/request.rb
232
240
  - lib/pagseguro/sender.rb
233
241
  - lib/pagseguro/session.rb
@@ -235,17 +243,25 @@ files:
235
243
  - lib/pagseguro/session/response_serializer.rb
236
244
  - lib/pagseguro/shipping.rb
237
245
  - lib/pagseguro/transaction.rb
246
+ - lib/pagseguro/transaction/collection.rb
238
247
  - lib/pagseguro/transaction/response.rb
239
248
  - lib/pagseguro/transaction/search.rb
240
249
  - lib/pagseguro/transaction/search/search_abandoned.rb
241
250
  - lib/pagseguro/transaction/search/search_by_date.rb
242
251
  - lib/pagseguro/transaction/search/search_by_reference.rb
243
252
  - lib/pagseguro/transaction/serializer.rb
253
+ - lib/pagseguro/transaction/status_collection.rb
254
+ - lib/pagseguro/transaction_cancellation.rb
255
+ - lib/pagseguro/transaction_cancellation/request_serializer.rb
256
+ - lib/pagseguro/transaction_cancellation/response.rb
257
+ - lib/pagseguro/transaction_cancellation/response_serializer.rb
258
+ - lib/pagseguro/transaction_cancellation/serializer.rb
244
259
  - lib/pagseguro/transaction_installment.rb
245
260
  - lib/pagseguro/transaction_request.rb
246
261
  - lib/pagseguro/transaction_request/request_serializer.rb
247
262
  - lib/pagseguro/transaction_request/response.rb
248
263
  - lib/pagseguro/transaction_request/response_serializer.rb
264
+ - lib/pagseguro/transaction_status.rb
249
265
  - lib/pagseguro/version.rb
250
266
  - locales/pt-BR.yml
251
267
  - pagseguro-oficial.gemspec
@@ -256,10 +272,13 @@ files:
256
272
  - spec/fixtures/invalid_code.xml
257
273
  - spec/fixtures/payment_request/failure.xml
258
274
  - spec/fixtures/payment_request/success.xml
275
+ - spec/fixtures/refund/success.xml
259
276
  - spec/fixtures/session/success.xml
277
+ - spec/fixtures/transaction_cancellation/success.xml
260
278
  - spec/fixtures/transaction_request/success.xml
261
279
  - spec/fixtures/transactions/additional.xml
262
280
  - spec/fixtures/transactions/search.xml
281
+ - spec/fixtures/transactions/status_history.xml
263
282
  - spec/fixtures/transactions/success.xml
264
283
  - spec/pagseguro/account_credentials_spec.rb
265
284
  - spec/pagseguro/address_spec.rb
@@ -302,23 +321,37 @@ files:
302
321
  - spec/pagseguro/payment_status_spec.rb
303
322
  - spec/pagseguro/permission_spec.rb
304
323
  - spec/pagseguro/phone_spec.rb
324
+ - spec/pagseguro/refund/request_serializer_spec.rb
325
+ - spec/pagseguro/refund/response_serializer_spec.rb
326
+ - spec/pagseguro/refund/response_spec.rb
327
+ - spec/pagseguro/refund/serializer_spec.rb
328
+ - spec/pagseguro/refund_spec.rb
305
329
  - spec/pagseguro/request_spec.rb
306
330
  - spec/pagseguro/sender_spec.rb
307
331
  - spec/pagseguro/session/response_serializer_spec.rb
308
332
  - spec/pagseguro/session/response_spec.rb
309
333
  - spec/pagseguro/session_spec.rb
310
334
  - spec/pagseguro/shipping_spec.rb
335
+ - spec/pagseguro/transaction/collection_spec.rb
336
+ - spec/pagseguro/transaction/response_spec.rb
311
337
  - spec/pagseguro/transaction/search/search_abandoned_spec.rb
312
338
  - spec/pagseguro/transaction/search/search_by_date_spec.rb
313
339
  - spec/pagseguro/transaction/search/search_by_reference_spec.rb
314
340
  - spec/pagseguro/transaction/search_spec.rb
315
341
  - spec/pagseguro/transaction/serializer_spec.rb
342
+ - spec/pagseguro/transaction/status_collection_spec.rb
343
+ - spec/pagseguro/transaction_cancellation/request_serializer_spec.rb
344
+ - spec/pagseguro/transaction_cancellation/response_serializer_spec.rb
345
+ - spec/pagseguro/transaction_cancellation/response_spec.rb
346
+ - spec/pagseguro/transaction_cancellation/serializer_spec.rb
347
+ - spec/pagseguro/transaction_cancellation_spec.rb
316
348
  - spec/pagseguro/transaction_installment_spec.rb
317
349
  - spec/pagseguro/transaction_request/request_serializer_spec.rb
318
350
  - spec/pagseguro/transaction_request/response_serializer_spec.rb
319
351
  - spec/pagseguro/transaction_request/response_spec.rb
320
352
  - spec/pagseguro/transaction_request_spec.rb
321
353
  - spec/pagseguro/transaction_spec.rb
354
+ - spec/pagseguro/transaction_status_spec.rb
322
355
  - spec/spec_helper.rb
323
356
  - spec/support/ensure_type_macro.rb
324
357
  - spec/support/helpers.rb
@@ -356,10 +389,13 @@ test_files:
356
389
  - spec/fixtures/invalid_code.xml
357
390
  - spec/fixtures/payment_request/failure.xml
358
391
  - spec/fixtures/payment_request/success.xml
392
+ - spec/fixtures/refund/success.xml
359
393
  - spec/fixtures/session/success.xml
394
+ - spec/fixtures/transaction_cancellation/success.xml
360
395
  - spec/fixtures/transaction_request/success.xml
361
396
  - spec/fixtures/transactions/additional.xml
362
397
  - spec/fixtures/transactions/search.xml
398
+ - spec/fixtures/transactions/status_history.xml
363
399
  - spec/fixtures/transactions/success.xml
364
400
  - spec/pagseguro/account_credentials_spec.rb
365
401
  - spec/pagseguro/address_spec.rb
@@ -402,23 +438,37 @@ test_files:
402
438
  - spec/pagseguro/payment_status_spec.rb
403
439
  - spec/pagseguro/permission_spec.rb
404
440
  - spec/pagseguro/phone_spec.rb
441
+ - spec/pagseguro/refund/request_serializer_spec.rb
442
+ - spec/pagseguro/refund/response_serializer_spec.rb
443
+ - spec/pagseguro/refund/response_spec.rb
444
+ - spec/pagseguro/refund/serializer_spec.rb
445
+ - spec/pagseguro/refund_spec.rb
405
446
  - spec/pagseguro/request_spec.rb
406
447
  - spec/pagseguro/sender_spec.rb
407
448
  - spec/pagseguro/session/response_serializer_spec.rb
408
449
  - spec/pagseguro/session/response_spec.rb
409
450
  - spec/pagseguro/session_spec.rb
410
451
  - spec/pagseguro/shipping_spec.rb
452
+ - spec/pagseguro/transaction/collection_spec.rb
453
+ - spec/pagseguro/transaction/response_spec.rb
411
454
  - spec/pagseguro/transaction/search/search_abandoned_spec.rb
412
455
  - spec/pagseguro/transaction/search/search_by_date_spec.rb
413
456
  - spec/pagseguro/transaction/search/search_by_reference_spec.rb
414
457
  - spec/pagseguro/transaction/search_spec.rb
415
458
  - spec/pagseguro/transaction/serializer_spec.rb
459
+ - spec/pagseguro/transaction/status_collection_spec.rb
460
+ - spec/pagseguro/transaction_cancellation/request_serializer_spec.rb
461
+ - spec/pagseguro/transaction_cancellation/response_serializer_spec.rb
462
+ - spec/pagseguro/transaction_cancellation/response_spec.rb
463
+ - spec/pagseguro/transaction_cancellation/serializer_spec.rb
464
+ - spec/pagseguro/transaction_cancellation_spec.rb
416
465
  - spec/pagseguro/transaction_installment_spec.rb
417
466
  - spec/pagseguro/transaction_request/request_serializer_spec.rb
418
467
  - spec/pagseguro/transaction_request/response_serializer_spec.rb
419
468
  - spec/pagseguro/transaction_request/response_spec.rb
420
469
  - spec/pagseguro/transaction_request_spec.rb
421
470
  - spec/pagseguro/transaction_spec.rb
471
+ - spec/pagseguro/transaction_status_spec.rb
422
472
  - spec/spec_helper.rb
423
473
  - spec/support/ensure_type_macro.rb
424
474
  - spec/support/helpers.rb