mangopay 3.25.1 → 3.26.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: 4de0eaa7025d0d6788238c4f8a23d21b1c2d1eff469da6d24fe671f3e10e15cf
4
- data.tar.gz: fd221c8c6c05355a6c4d0f58bb04ffa0df81d5a17fd30865e25beab644e47eac
3
+ metadata.gz: 8947a3cfb998752c602955c3d1eb8585e0e8ea9337c39eb141d5c40d90488c6b
4
+ data.tar.gz: 14067f5dfa5c2c5f31d269a6a0a82a27337efd2f06c4234758c5c8cf325a5a56
5
5
  SHA512:
6
- metadata.gz: 4349f6ed08748ddc4a88b893ac22b7e4c0d32b6cf2ae2dcfcf4616cf8a14508d450793218c1769e4ba5b53638a62b88d985fce3f9cec80a3dd34beccb8e20c2e
7
- data.tar.gz: c5b2cc5ceda45a3b87002e2c279799763e8815621834537aa3aa346dac765578e43366aed356ab45ec0f18d4404bc6c6bdc398fb5181dc3822290d9ec1e1c178
6
+ metadata.gz: 0dfcd029183048dc8af4ec10953695d0c125b2d21091d3b0152917876247663e9c47ec31113b16986bce59627de25bf235882b3f71897fed1d37352c65560f9e
7
+ data.tar.gz: 445e13d574b812491959e370281f83289eae63d07849ce51bd7abb86d1521976105d31d35db0a405e4bdd48ff2795932fdcaa90302e86f672265f173c4e98e6e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [3.26.0] - 2024-08-07
2
+ ### Added
3
+
4
+ - New endpoint: [Create a Bancontact PayIn](https://mangopay.com/docs/endpoints/bancontact#create-bancontact-payin)
5
+
1
6
  ## [3.25.1] - 2024-04-30
2
7
  ### Fixed
3
8
 
@@ -233,6 +233,16 @@ module MangoPay
233
233
  end
234
234
  end
235
235
 
236
+ module Bancontact
237
+ class Web < Resource
238
+ include HTTPCalls::Create
239
+
240
+ def self.url(*)
241
+ "#{MangoPay.api_path}/payins/payment-methods/bancontact"
242
+ end
243
+ end
244
+ end
245
+
236
246
  module RecurringPayments
237
247
  class Recurring < Resource
238
248
  include HTTPCalls::Create
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.25.1'
2
+ VERSION = '3.26.0'
3
3
  end
@@ -0,0 +1,30 @@
1
+ describe MangoPay::PayIn::Bancontact::Web, type: :feature do
2
+ include_context 'wallets'
3
+ include_context 'payins'
4
+
5
+ def check_type_and_status(payin)
6
+ expect(payin['Type']).to eq('PAYIN')
7
+ expect(payin['Nature']).to eq('REGULAR')
8
+ expect(payin['PaymentType']).to eq('BCMC')
9
+ expect(payin['ExecutionType']).to eq('WEB')
10
+ expect(payin['Status']).to eq('CREATED')
11
+ end
12
+
13
+ describe 'CREATE' do
14
+ it 'creates a bancontact web payin' do
15
+ created = new_payin_bancontact_web
16
+ expect(created['Id']).not_to be_nil
17
+ check_type_and_status(created)
18
+ end
19
+ end
20
+
21
+ describe 'FETCH' do
22
+ it 'fetches a payin' do
23
+ created = new_payin_bancontact_web
24
+ fetched = MangoPay::PayIn.fetch(created['Id'])
25
+ expect(fetched['Id']).to eq(created['Id'])
26
+ check_type_and_status(created)
27
+ check_type_and_status(fetched)
28
+ end
29
+ end
30
+ end
@@ -554,6 +554,22 @@ shared_context 'payins' do
554
554
  )
555
555
  end
556
556
 
557
+ ###############################################
558
+ # Bancontact/web
559
+ ###############################################
560
+ let(:new_payin_bancontact_web) do
561
+ MangoPay::PayIn::Bancontact::Web.create(
562
+ AuthorId: new_natural_user['Id'],
563
+ CreditedWalletId: new_wallet['Id'],
564
+ DebitedFunds: { Currency: 'EUR', Amount: 400 },
565
+ Fees: { Currency: 'EUR', Amount: 10 },
566
+ ReturnURL: 'http://www.my-site.com/returnURL',
567
+ StatementDescriptor: "test",
568
+ Tag: 'Test PayIn/Bancontact/Web',
569
+ Culture: 'FR'
570
+ )
571
+ end
572
+
557
573
  ###############################################
558
574
  # PAYPAL/web V2
559
575
  ###############################################
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangopay
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.25.1
4
+ version: 3.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoffroy Lorieux
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-04-30 00:00:00.000000000 Z
12
+ date: 2024-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
@@ -131,6 +131,7 @@ files:
131
131
  - spec/mangopay/log_requests_filter_spec.rb
132
132
  - spec/mangopay/mandate_spec.rb
133
133
  - spec/mangopay/payin_applepay_direct_spec.rb
134
+ - spec/mangopay/payin_bancontact_web_spec.rb
134
135
  - spec/mangopay/payin_bankwire_direct_spec.rb
135
136
  - spec/mangopay/payin_bankwire_external_instruction_spec.rb
136
137
  - spec/mangopay/payin_blik_web_spec.rb
@@ -209,6 +210,7 @@ test_files:
209
210
  - spec/mangopay/log_requests_filter_spec.rb
210
211
  - spec/mangopay/mandate_spec.rb
211
212
  - spec/mangopay/payin_applepay_direct_spec.rb
213
+ - spec/mangopay/payin_bancontact_web_spec.rb
212
214
  - spec/mangopay/payin_bankwire_direct_spec.rb
213
215
  - spec/mangopay/payin_bankwire_external_instruction_spec.rb
214
216
  - spec/mangopay/payin_blik_web_spec.rb