mangopay 3.9.0 → 3.10.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
  SHA256:
3
- metadata.gz: fc045823d669fd8b24b86394f37b4da942dfdcd2ffec8c766c969bef6c8109d2
4
- data.tar.gz: e699732cf7cbeb8e9e54e918298913908ac0a88b2103d09b6e5086b1b8464907
3
+ metadata.gz: 27372664cdb5c2c9155a08ab3b9a5ebddd31f261f86c154d0b64ae2d346c4e9f
4
+ data.tar.gz: ba496e8fff4adb93001b20b69081d7edfb5cb95c80722f1e9cc155bfc342af98
5
5
  SHA512:
6
- metadata.gz: c97ac50d3dd3adb9848871d84e385dc22940a431ef85a942c37380ea8403737375ab9054e88f2bce8632ff00237ce4063288ee224db96d89e3edbe4657631414
7
- data.tar.gz: 2eae8cc1edb4423c31461acaf7f0d8cd5ab9226e84209d3be12236cc2d1cd0ded88fd1c18166f8810628b684915c966de7b68d7208b93f4a55f65819bc6199e0
6
+ metadata.gz: 7663a69824b9b188227c1a78a9bec1589f368bd84893cb3915b856c53e3df4453416d0593060a49d74a2132bdcf4e624430704619f9189396ebe660ed6d845f4
7
+ data.tar.gz: 6e48f2457c2ac4ce3b32a8814b93ccd8e10bb91d689b5d2d5508398ab8c7bb3596500eb104d250a6c1f84dec2f48667c8249774a791bebf4021976ee5a56c861
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [3.10.0] - 2022-06-29
2
+ ##Added
3
+ **Recurring: €0 deadlines for CIT**
4
+
5
+ Setting free recurring payment deadlines is now possible for CIT (customer-initiated transactions) with the **FreeCycles** parameter.
6
+
7
+ The **FreeCycles** parameter allows platforms to define the number of consecutive deadlines that will be free. The following endpoints have been updated to take into account this new parameter:
8
+
9
+ <a href="https://docs.mangopay.com/endpoints/v2.01/payins#e1051_create-a-recurring-payin-registration">Create a Recurring PayIn Registration</a><br>
10
+ <a href="https://docs.mangopay.com/endpoints/v2.01/payins#e1056_view-a-recurring-payin-registration">View a Recurring PayIn Registration</a><br>
11
+
12
+ This feature provides new automation capabilities for platforms with offers such as “Get the first month free” or “free trial” subscriptions.
13
+
14
+ Please refer to the <a href="https://docs.mangopay.com/guide/recurring-payments-introduction">Recurring payments overview</a> documentation for more information.
15
+
1
16
  ## [3.9.0] - 2022.03.31
2
17
  ### Added
3
18
 
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.9.0'
2
+ VERSION = '3.10.0'
3
3
  end
@@ -126,18 +126,18 @@ describe MangoPay::Client do
126
126
  end
127
127
  end
128
128
 
129
- describe 'validate' do
130
- it 'validates card' do
131
- client = MangoPay::Client.fetch
132
- completed = new_card_registration_completed
133
- card_id = completed['CardId']
134
- client_id = client['ClientId']
135
-
136
- card = MangoPay::Client.validate(client_id, card_id)
137
- expect(client).not_to be_nil
138
- expect(card).not_to be_nil
139
- end
140
- end
129
+ # describe 'validate' do
130
+ # it 'validates card' do
131
+ # client = MangoPay::Client.fetch
132
+ # completed = new_card_registration_completed
133
+ # card_id = completed['CardId']
134
+ # client_id = client['ClientId']
135
+ #
136
+ # card = MangoPay::Client.validate(client_id, card_id)
137
+ # expect(client).not_to be_nil
138
+ # expect(card).not_to be_nil
139
+ # end
140
+ # end
141
141
 
142
142
  describe 'create_bank_account' do
143
143
  it 'creates a new bank account' do
@@ -37,15 +37,19 @@ describe MangoPay::PayIn::RecurringPayments, type: :feature do
37
37
  },
38
38
  FirstName: 'Joe',
39
39
  LastName: 'Blogs'
40
- }
40
+ },
41
+ FreeCycles: 0
41
42
  )
42
43
  expect(recurring).not_to be_nil
43
44
  expect(recurring['Status']).not_to be_nil
44
45
  expect(recurring['Id']).not_to be_nil
46
+ expect(recurring['FreeCycles']).not_to be_nil
47
+
45
48
  id = recurring['Id']
46
49
 
47
50
  get = MangoPay::PayIn::RecurringPayments::Recurring.fetch(id)
48
51
  expect(get).not_to be_nil
52
+ expect(get['FreeCycles']).not_to be_nil
49
53
 
50
54
  cit = MangoPay::PayIn::RecurringPayments::CIT.create(
51
55
  RecurringPayinRegistrationId: recurring['Id'],
@@ -33,6 +33,20 @@ describe MangoPay::User do
33
33
  })
34
34
  expect(updated_user['LegalRepresentativeFirstName']).to eq('Jack')
35
35
  end
36
+
37
+ it 'updates a natural user terms and conditions accepted' do
38
+ updated_user = MangoPay::NaturalUser.update(new_natural_user['Id'] ,{
39
+ TermsAndConditionsAccepted: true
40
+ })
41
+ expect(updated_user['TermsAndConditionsAccepted']).to eq(true)
42
+ end
43
+
44
+ it 'updates a legal user terms and conditions accepted' do
45
+ updated_user = MangoPay::LegalUser.update(new_legal_user['Id'], {
46
+ TermsAndConditionsAccepted: true
47
+ })
48
+ expect(updated_user['TermsAndConditionsAccepted']).to eq(true)
49
+ end
36
50
  end
37
51
 
38
52
  describe 'FETCH' do
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.9.0
4
+ version: 3.10.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: 2022-03-31 00:00:00.000000000 Z
12
+ date: 2022-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json