mp_api 2.1.2 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bb51f1c6126fedb7f71adb776f93719b41044ebfcc5bc2f6266bd9ffacbc007
4
- data.tar.gz: a0a78feb21186cb970612015a18f8d1f85128692bb96b9972311f0cffd889690
3
+ metadata.gz: 2b774b641b9743187b2a02f536b3ff2a04023db6d6ed26a780c5d84e125d73a6
4
+ data.tar.gz: 436d1f58af228742df49be9e42923c84fcef43f17f780e17b8d92bd3d9e5595d
5
5
  SHA512:
6
- metadata.gz: 7d85b4ce7b252dfbdd27ba1a2310a07852b6b72604a0dc8167e1a976d26caedc80d87205a7ac9699115937bca5013ee65f49cd4768f6a7b0f807ef555e42bb4d
7
- data.tar.gz: 338db9ef576b227e74f5df63c5e909bc3028732202ba5c5aa79a14ab0bbd27eea0aff4cd75694a94646bb0759e2b11b94290a2147d0667a776118a3a603cadba
6
+ metadata.gz: c7f8387e13536a50620c845bf2673103353d25fb93a6e2583928a47b545f170715e0e3ff18f9a5e19d7f79338771c41f0bd0777b1d29411d319f599fd5c000a3
7
+ data.tar.gz: f866e178135cb4832fce49af8ae345c8256d6758102f06580f33c4813a36cc417053a9b3a5f2f265e22704ad26f9c3865d67756d7417bf64c7b05229bd8bdb68
data/lib/mp_api/client.rb CHANGED
@@ -4,7 +4,7 @@ module MpApi
4
4
  MAX_RETRIES = 1
5
5
  SAVE_RESPONSES = true
6
6
 
7
- def create_pix_payment(date_of_expiration: nil, amount:, description: nil, statement_descriptor: nil, payment_method:, payer_email:, payer_identification_type:, payer_identification_number:)
7
+ def create_pix_payment(date_of_expiration: nil, amount:, description: nil, statement_descriptor: nil, payment_method:, payer_email:, payer_identification_type:, payer_identification_number:, external_reference: nil)
8
8
  body = {
9
9
  date_of_expiration: date_of_expiration,
10
10
  transaction_amount: amount,
@@ -17,12 +17,13 @@ module MpApi
17
17
  type: payer_identification_type,
18
18
  number: payer_identification_number
19
19
  }
20
- }
20
+ },
21
+ external_reference: external_reference
21
22
  }.compact
22
23
  post("/payments", body:)
23
24
  end
24
25
 
25
- def create_credit_card_payment(date_of_expiration: nil, amount:, description: nil, statement_descriptor: nil, payment_method:, payer_email:, payer_identification_type:, payer_identification_number:, capture: nil, token: nil, issuer_id: nil, installments: nil, three_d_secure_mode: false)
26
+ def create_credit_card_payment(date_of_expiration: nil, amount:, description: nil, statement_descriptor: nil, payment_method:, payer_email:, payer_identification_type:, payer_identification_number:, capture: nil, external_reference: nil, token: nil, issuer_id: nil, installments: nil, three_d_secure_mode: false)
26
27
  body = {
27
28
  date_of_expiration: date_of_expiration,
28
29
  transaction_amount: amount,
@@ -37,6 +38,7 @@ module MpApi
37
38
  }
38
39
  },
39
40
  capture: capture,
41
+ external_reference: external_reference,
40
42
  token: token,
41
43
  issuer_id: issuer_id,
42
44
  installments: installments,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MpApi
4
- VERSION = "2.1.2"
4
+ VERSION = "2.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mp_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todas Essas Coisas