mangopay4-ruby-sdk 3.47.0 → 4.1.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 +4 -4
- data/CHANGELOG.md +96 -0
- data/lib/mangopay/acquiring.rb +4 -0
- data/lib/mangopay/authorization_token.rb +1 -1
- data/lib/mangopay/deposit.rb +7 -0
- data/lib/mangopay/extended_preauthorization.rb +32 -0
- data/lib/mangopay/http_calls.rb +1 -1
- data/lib/mangopay/identity_verification.rb +6 -0
- data/lib/mangopay/legal_user.rb +3 -0
- data/lib/mangopay/natural_user.rb +3 -0
- data/lib/mangopay/pay_in.rb +72 -16
- data/lib/mangopay/report_v2.rb +2 -2
- data/lib/mangopay/version.rb +1 -1
- data/lib/mangopay.rb +3 -2
- data/mangopay.gemspec +7 -7
- metadata +33 -162
- data/.github/workflows/ruby_cd.yml +0 -34
- data/.github/workflows/ruby_ci.yml +0 -30
- data/.gitignore +0 -30
- data/.rspec +0 -3
- data/Gemfile +0 -2
- data/Rakefile +0 -5
- data/bin/mangopay +0 -9
- data/spec/mangopay/acquiring_spec.rb +0 -202
- data/spec/mangopay/authorization_token_spec.rb +0 -70
- data/spec/mangopay/bank_account_spec.rb +0 -105
- data/spec/mangopay/bankingaliases_spec.rb +0 -29
- data/spec/mangopay/card_registration_spec.rb +0 -123
- data/spec/mangopay/client_spec.png +0 -0
- data/spec/mangopay/client_spec.rb +0 -213
- data/spec/mangopay/configuration_spec.rb +0 -249
- data/spec/mangopay/conversion_spec.rb +0 -103
- data/spec/mangopay/deposit_spec.rb +0 -107
- data/spec/mangopay/dispute_spec.png +0 -0
- data/spec/mangopay/dispute_spec.rb +0 -294
- data/spec/mangopay/event_spec.rb +0 -33
- data/spec/mangopay/fetch_filters_spec.rb +0 -63
- data/spec/mangopay/hook_spec.rb +0 -37
- data/spec/mangopay/idempotency_spec.rb +0 -41
- data/spec/mangopay/identity_verification_spec.rb +0 -47
- data/spec/mangopay/kyc_document_spec.png +0 -0
- data/spec/mangopay/kyc_document_spec.rb +0 -118
- data/spec/mangopay/log_requests_filter_spec.rb +0 -26
- data/spec/mangopay/mandate_spec.rb +0 -99
- data/spec/mangopay/payin_applepay_direct_spec.rb +0 -21
- data/spec/mangopay/payin_bancontact_web_spec.rb +0 -30
- data/spec/mangopay/payin_bankwire_direct_spec.rb +0 -74
- data/spec/mangopay/payin_bankwire_external_instruction_spec.rb +0 -104
- data/spec/mangopay/payin_bizum_web_spec.rb +0 -54
- data/spec/mangopay/payin_blik_web_spec.rb +0 -41
- data/spec/mangopay/payin_card_direct_spec.rb +0 -69
- data/spec/mangopay/payin_card_web_spec.rb +0 -64
- data/spec/mangopay/payin_directdebit_direct_spec.rb +0 -37
- data/spec/mangopay/payin_directdebit_web_spec.rb +0 -38
- data/spec/mangopay/payin_giropay_web_spec.rb +0 -30
- data/spec/mangopay/payin_googlepay_direct_spec.rb +0 -21
- data/spec/mangopay/payin_ideal_web_spec.rb +0 -30
- data/spec/mangopay/payin_intent_spec.rb +0 -295
- data/spec/mangopay/payin_klarna_web_spec.rb +0 -32
- data/spec/mangopay/payin_mbway_web_spec.rb +0 -32
- data/spec/mangopay/payin_multibanco_web_spec.rb +0 -31
- data/spec/mangopay/payin_paybybank_web_spec.rb +0 -56
- data/spec/mangopay/payin_payconiq_web_spec.rb +0 -32
- data/spec/mangopay/payin_paypal_web_spec.rb +0 -113
- data/spec/mangopay/payin_preauthorized_direct_spec.rb +0 -118
- data/spec/mangopay/payin_satispay_web_spec.rb +0 -32
- data/spec/mangopay/payin_swish_web_spec.rb +0 -30
- data/spec/mangopay/payin_twint_web_spec.rb +0 -30
- data/spec/mangopay/payment_method_metadata_spec.rb +0 -15
- data/spec/mangopay/payout_bankwire_spec.rb +0 -93
- data/spec/mangopay/preauthorization_spec.rb +0 -51
- data/spec/mangopay/recipient_spec.rb +0 -134
- data/spec/mangopay/recurring_payin_spec.rb +0 -222
- data/spec/mangopay/refund_spec.rb +0 -34
- data/spec/mangopay/regulatory_spec.rb +0 -26
- data/spec/mangopay/report_spec.rb +0 -40
- data/spec/mangopay/report_v2_spec.rb +0 -117
- data/spec/mangopay/report_wallets_spec.rb +0 -40
- data/spec/mangopay/settlement_sample.csv +0 -8
- data/spec/mangopay/settlement_sample_bad.csv +0 -8
- data/spec/mangopay/settlement_spec.rb +0 -65
- data/spec/mangopay/shared_resources.rb +0 -1399
- data/spec/mangopay/transaction_spec.rb +0 -59
- data/spec/mangopay/transfer_spec.rb +0 -77
- data/spec/mangopay/ubo_declaration_spec.rb +0 -44
- data/spec/mangopay/ubo_spec.rb +0 -39
- data/spec/mangopay/user_spec.rb +0 -455
- data/spec/mangopay/virtual_account_spec.rb +0 -52
- data/spec/mangopay/wallet_spec.rb +0 -100
- data/spec/spec_helper.rb +0 -31
- data/spec/tmp/.keep +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 043facedde7d0e2e39ee93b0725498ecd735f9b630d186118b9a61d07140296e
|
|
4
|
+
data.tar.gz: b587b64329a5c61b09656b305e6fb8f08eed2a8b06ed4f5130567d3a1fd0548b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4565aadf4d1a72baee4ca3b60c067e3479f01a79028bb00f38ce7d9bcb81329cff055d70c8dc82d37e676593a95956d19a4e19fec7b89127c9448128872e6659
|
|
7
|
+
data.tar.gz: 8cc922b2fc56c0097abb4ef1031ea38d1e00f6ca43d9f87e0208167f186aada60a63455d8dc1d036fe2fc6fbac611ee504c26cccb2568eb2731140b195b6d93f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,99 @@
|
|
|
1
|
+
## [4.1.0] - 2026-10-01
|
|
2
|
+
### Added – Extended Preauthorizations
|
|
3
|
+
- Added `MangoPay::ExtendedPreauthorization` with:
|
|
4
|
+
- `create` – create an extended preauthorization (card/direct)
|
|
5
|
+
- `create_paypal_preauthorization` – create an extended preauthorization via PayPal
|
|
6
|
+
- `get` – fetch an extended preauthorization by id
|
|
7
|
+
- `update` – update an extended preauthorization. To cancel one, call `update` with `{ PaymentStatus: 'CANCELED' }`
|
|
8
|
+
- `get_all_for_user` – list a user's extended preauthorizations
|
|
9
|
+
- `get_all_for_card` – list a card's extended preauthorizations
|
|
10
|
+
- `get_transactions` – list an extended preauthorization's transactions
|
|
11
|
+
- Added `MangoPay::PayIn::PreAuthorized::Direct.create_pre_authorized_extended_pay_in` for extended preauthorized pay-ins
|
|
12
|
+
|
|
13
|
+
#### Deprecated
|
|
14
|
+
- `MangoPay::Deposit` – use `MangoPay::ExtendedPreauthorization` instead
|
|
15
|
+
- `MangoPay::PayIn::PreAuthorized::Direct.create_pre_authorized_deposit_pay_in` – use `create_pre_authorized_extended_pay_in` instead
|
|
16
|
+
|
|
17
|
+
## [4.0.0] - 2026-09-02
|
|
18
|
+
### Infrastructure – CI/CD Migration
|
|
19
|
+
|
|
20
|
+
Migrated CI/CD from GitHub Actions to GitLab. This is an infrastructure-only release with no new API features.
|
|
21
|
+
|
|
22
|
+
#### Added
|
|
23
|
+
- `simplecov` development dependency for test coverage reporting
|
|
24
|
+
|
|
25
|
+
#### Removed
|
|
26
|
+
- `Rakefile`
|
|
27
|
+
- `bin/mangopay` interactive console script
|
|
28
|
+
|
|
29
|
+
#### Changed
|
|
30
|
+
- Gemspec `s.files` uses `Dir.glob` instead of `git ls-files`. The published gem now contains **only** `lib/**/*`, `README.md`, `LICENSE`, `CHANGELOG.md`, and `mangopay.gemspec`. Files that were previously packaged are no longer shipped, including `spec/`, `bin/`, `Gemfile`, `Gemfile.lock`, and `Rakefile`.
|
|
31
|
+
- `YAML.load` replaced with `YAML.safe_load` restricted to `Time` (`permitted_classes: [Time], aliases: false`) when reading the cached authorization token — avoids arbitrary object deserialization and is Ruby 3.1+ Psych 4 compatible
|
|
32
|
+
- `File.exists?` replaced with `File.exist?` (deprecated method removal)
|
|
33
|
+
- `multi_json` dependency constraint tightened from `>= 1.15.0` to `~> 1.21`
|
|
34
|
+
|
|
35
|
+
### Breaking Changes
|
|
36
|
+
|
|
37
|
+
> **Ruby version requirement raised from `>= 1.9.2` to `>= 3.3.0`.**
|
|
38
|
+
> Any environment running Ruby < 3.3 will no longer be able to install this gem.
|
|
39
|
+
|
|
40
|
+
> **`bin/mangopay` console removed.**
|
|
41
|
+
> The interactive IRB console that was shipped with the gem is no longer available.
|
|
42
|
+
|
|
43
|
+
> **`Rakefile` removed.**
|
|
44
|
+
> If your workflow depends on `rake` tasks defined in this gem's Rakefile (e.g., `bundler/gem_tasks`), those are no longer provided.
|
|
45
|
+
|
|
46
|
+
> **`multi_json` pinned to `~> 1.21`.**
|
|
47
|
+
> If you depend on a future major version of `multi_json`, it will conflict.
|
|
48
|
+
|
|
49
|
+
> **Published gem contents reduced.**
|
|
50
|
+
> The gem now ships only `lib/**/*`, `README.md`, `LICENSE`, `CHANGELOG.md`, and `mangopay.gemspec`. Previously packaged files — including `spec/`, `bin/`, `Gemfile`, `Gemfile.lock`, and `Rakefile` — are no longer bundled. Any tooling that relied on these files being present in the installed gem will break.
|
|
51
|
+
|
|
52
|
+
## [3.52.0] - 2026-09-01
|
|
53
|
+
### Added – Get PayPal Data Collection (Acquiring)
|
|
54
|
+
- Added `MangoPay::Acquiring::PayIn::PayPal::Web.get_data_collection` to fetch a PayPal data collection by id
|
|
55
|
+
|
|
56
|
+
## [3.51.0] - 2026-08-17
|
|
57
|
+
### Added – External providers list for PayIn Intents
|
|
58
|
+
#342
|
|
59
|
+
- Added `MangoPay::PayIn::PayInIntent::Intent.get_external_providers_list` to fetch the list of external providers available for pay-in intents
|
|
60
|
+
|
|
61
|
+
### Added – PSC retry for Identity Verifications
|
|
62
|
+
#343
|
|
63
|
+
- Added `MangoPay::IdentityVerification.retry_psc` to request the retry of a PSC session, optionally passing the values to update
|
|
64
|
+
|
|
65
|
+
## [3.50.0] - 2026-07-13
|
|
66
|
+
### Deprecated – Non-SCA users and deposit preauthorized complement pay-ins
|
|
67
|
+
- `MangoPay::LegalUser` create, get by id and update operations are deprecated. Use `MangoPay::LegalUserSca` instead.
|
|
68
|
+
- `MangoPay::NaturalUser` create, get by id and update operations are deprecated. Use `MangoPay::NaturalUserSca` instead.
|
|
69
|
+
- `MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_prior_to_complement` is deprecated.
|
|
70
|
+
- `MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_complement` is deprecated.
|
|
71
|
+
|
|
72
|
+
## [3.49.0] - 2026-05-21
|
|
73
|
+
### Added – PayPal Deposit Preauthorizations
|
|
74
|
+
- Added `MangoPay::Deposit.create_paypal_preauthorization` to create a PayPal deposit preauthorization
|
|
75
|
+
- Added `MangoPay::PayIn::PayPal::Web.create_pre_authorized_deposit_pay_in` to create a PayPal web deposit preauthorized pay-in (full capture)
|
|
76
|
+
|
|
77
|
+
### Added – Pagination support for Recipients
|
|
78
|
+
- `MangoPay::Recipient.get_user_recipients` now accepts `page` and `per_page` pagination parameters
|
|
79
|
+
|
|
80
|
+
### Added – Recurring PayIns for Google Pay and Apple Pay
|
|
81
|
+
- Added `MangoPay::PayIn::RecurringPayments::RecurringGooglePayPayIn` to create recurring Google Pay pay-ins
|
|
82
|
+
- Added `MangoPay::PayIn::RecurringPayments::RecurringApplePayPayIn` to create recurring Apple Pay pay-ins
|
|
83
|
+
|
|
84
|
+
### Changed – Improved naming for Recurring PayIn classes
|
|
85
|
+
New classes were introduced with clearer names, and the old ones are now deprecated (still functional, scheduled for removal in a future release):
|
|
86
|
+
- Added `MangoPay::PayIn::RecurringPayments::RecurringPayInRegistration` — **deprecates** `MangoPay::PayIn::RecurringPayments::Recurring`
|
|
87
|
+
- Added `MangoPay::PayIn::RecurringPayments::RecurringCardPayIn` — **deprecates** `MangoPay::PayIn::RecurringPayments::CIT` and `MangoPay::PayIn::RecurringPayments::MIT`
|
|
88
|
+
- Added `MangoPay::PayIn::RecurringPayments::RecurringPayPalPayIn` — **deprecates** `MangoPay::PayIn::RecurringPayments::PayPalCIT` and `MangoPay::PayIn::RecurringPayments::PayPalMIT`
|
|
89
|
+
|
|
90
|
+
### Fixed – ReportV2.get_all parameters
|
|
91
|
+
- `MangoPay::ReportV2.get_all` now accepts a `filters` hash (sent as query parameters) and defaults to `{}` instead of `nil`. This fixes a crash when calling the method with no arguments while request logging is enabled, and ensures any provided values are actually sent to the API.
|
|
92
|
+
|
|
93
|
+
## [3.48.0] - 2026-03-25
|
|
94
|
+
### Removed
|
|
95
|
+
- Payconiq PayIn (`MangoPay::PayIn::PayconiqWeb::Create`) removed following provider discontinuation on 4 Dec 2025 (#334)
|
|
96
|
+
|
|
1
97
|
## [3.47.0] - 2026-03-19
|
|
2
98
|
### Added - mTLS certificates support
|
|
3
99
|
- mTLS certificates are now configurable in the SDK via file paths or encoded strings
|
data/lib/mangopay/acquiring.rb
CHANGED
|
@@ -50,6 +50,10 @@ module MangoPay
|
|
|
50
50
|
def self.create_data_collection(params, idempotency_key = nil)
|
|
51
51
|
MangoPay.request(:post, "#{MangoPay.api_path}/acquiring/payins/payment-methods/paypal/data-collection", params, {}, idempotency_key)
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
def self.get_data_collection(data_collection_id)
|
|
55
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/acquiring/payins/payment-methods/paypal/data-collection/#{data_collection_id}")
|
|
56
|
+
end
|
|
53
57
|
end
|
|
54
58
|
end
|
|
55
59
|
end
|
data/lib/mangopay/deposit.rb
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
module MangoPay
|
|
2
2
|
|
|
3
3
|
# See http://docs.mangopay.com/api-references/payins/preauthorized-payin/
|
|
4
|
+
#
|
|
5
|
+
# <b>DEPRECATED</b>: The "deposit" terminology is being phased out.
|
|
6
|
+
# Please use MangoPay::ExtendedPreauthorization instead.
|
|
4
7
|
class Deposit < Resource
|
|
5
8
|
def self.create(params, idempotency_key = nil)
|
|
6
9
|
MangoPay.request(:post, "#{MangoPay.api_path}/deposit-preauthorizations/card/direct", params, {}, idempotency_key)
|
|
7
10
|
end
|
|
8
11
|
|
|
12
|
+
def self.create_paypal_preauthorization(params, idempotency_key = nil)
|
|
13
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/deposit-preauthorizations/payment-methods/paypal", params, {}, idempotency_key)
|
|
14
|
+
end
|
|
15
|
+
|
|
9
16
|
def self.get(deposit_id, filters = {})
|
|
10
17
|
MangoPay.request(:get, "#{MangoPay.api_path}/deposit-preauthorizations/#{deposit_id}", {}, filters)
|
|
11
18
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module MangoPay
|
|
2
|
+
|
|
3
|
+
class ExtendedPreauthorization < Resource
|
|
4
|
+
def self.create(params, idempotency_key = nil)
|
|
5
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/extended-preauthorizations/card/direct", params, {}, idempotency_key)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.create_paypal_preauthorization(params, idempotency_key = nil)
|
|
9
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/extended-preauthorizations/payment-methods/paypal", params, {}, idempotency_key)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.get(extended_preauthorization_id, filters = {})
|
|
13
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/extended-preauthorizations/#{extended_preauthorization_id}", {}, filters)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.update(extended_preauthorization_id, params)
|
|
17
|
+
MangoPay.request(:put, "#{MangoPay.api_path}/extended-preauthorizations/#{extended_preauthorization_id}", params)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.get_all_for_user(user_id, filters = {})
|
|
21
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/extended-preauthorizations", {}, filters)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.get_all_for_card(card_id, filters = {})
|
|
25
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/cards/#{card_id}/extended-preauthorizations", {}, filters)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.get_transactions(extended_preauthorization_id, filters = {})
|
|
29
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/extended-preauthorizations/#{extended_preauthorization_id}/transactions", {}, filters)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/lib/mangopay/http_calls.rb
CHANGED
|
@@ -54,7 +54,7 @@ module MangoPay
|
|
|
54
54
|
#
|
|
55
55
|
def fetch(id_or_filters = nil, idempotency_key = nil, query_params_get_by_id = nil)
|
|
56
56
|
id, filters = HTTPCalls::Fetch.parse_id_or_filters(id_or_filters)
|
|
57
|
-
if query_params_get_by_id != nil
|
|
57
|
+
if query_params_get_by_id != nil && query_params_get_by_id != {}
|
|
58
58
|
filters = query_params_get_by_id
|
|
59
59
|
end
|
|
60
60
|
response = MangoPay.request(:get, url(id), {}, filters, idempotency_key)
|
|
@@ -12,5 +12,11 @@ module MangoPay
|
|
|
12
12
|
def self.get_all(user_id, filters = {})
|
|
13
13
|
MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/identity-verifications", {}, filters)
|
|
14
14
|
end
|
|
15
|
+
|
|
16
|
+
# Request the retry of a PSC session.
|
|
17
|
+
# +params+ can be empty or contain the values to be updated.
|
|
18
|
+
def self.retry_psc(identity_verification_id, psc_id, params = {})
|
|
19
|
+
MangoPay.request(:put, "#{MangoPay.api_path}/identity-verifications/#{identity_verification_id}/pscs/#{psc_id}/retry", params)
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
data/lib/mangopay/legal_user.rb
CHANGED
|
@@ -2,6 +2,9 @@ module MangoPay
|
|
|
2
2
|
|
|
3
3
|
# See http://docs.mangopay.com/api-references/users/legal-users/
|
|
4
4
|
# See also parent class MangoPay::User
|
|
5
|
+
#
|
|
6
|
+
# <b>DEPRECATED</b>: The non-SCA legal user create, get by id and update
|
|
7
|
+
# operations are deprecated. Please use MangoPay::LegalUserSca instead.
|
|
5
8
|
class LegalUser < User
|
|
6
9
|
|
|
7
10
|
def self.url(id = nil)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
module MangoPay
|
|
2
2
|
|
|
3
3
|
# See http://docs.mangopay.com/api-references/users/natural-users/
|
|
4
|
+
#
|
|
5
|
+
# <b>DEPRECATED</b>: The non-SCA natural user create, get by id and update
|
|
6
|
+
# operations are deprecated. Please use MangoPay::NaturalUserSca instead.
|
|
4
7
|
class NaturalUser < User
|
|
5
8
|
|
|
6
9
|
def self.url(id = nil)
|
data/lib/mangopay/pay_in.rb
CHANGED
|
@@ -59,19 +59,36 @@ module MangoPay
|
|
|
59
59
|
"#{MangoPay.api_path}/payins/preauthorized/direct"
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
# <b>DEPRECATED</b>: 'create_pre_authorized_deposit_pay_in' function is now deprecated.
|
|
63
|
+
# Please use 'create_pre_authorized_extended_pay_in' instead.
|
|
62
64
|
def self.create_pre_authorized_deposit_pay_in(params, idempotency_key = nil)
|
|
65
|
+
warn "[DEPRECATION] MangoPay::PayIn::PreAuthorized::Direct.create_pre_authorized_deposit_pay_in is deprecated. Please use create_pre_authorized_extended_pay_in instead."
|
|
63
66
|
MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/full-capture", params, {}, idempotency_key)
|
|
64
67
|
end
|
|
65
68
|
|
|
69
|
+
def self.create_pre_authorized_extended_pay_in(params, idempotency_key = nil)
|
|
70
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/payins/extended-preauthorized/direct/full-capture", params, {}, idempotency_key)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# <b>DEPRECATED</b>: 'create_deposit_preauthorized_pay_in_prior_to_complement' function is now deprecated.
|
|
66
74
|
def self.create_deposit_preauthorized_pay_in_prior_to_complement(params, idempotency_key = nil)
|
|
75
|
+
warn "[DEPRECATION] MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_prior_to_complement is deprecated."
|
|
67
76
|
MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/capture-with-complement", params, {}, idempotency_key)
|
|
68
77
|
end
|
|
69
78
|
|
|
79
|
+
# <b>DEPRECATED</b>: 'create_deposit_preauthorized_pay_in_complement' function is now deprecated.
|
|
70
80
|
def self.create_deposit_preauthorized_pay_in_complement(params, idempotency_key = nil)
|
|
81
|
+
warn "[DEPRECATION] MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_complement is deprecated."
|
|
71
82
|
MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/complement", params, {}, idempotency_key)
|
|
72
83
|
end
|
|
73
84
|
end
|
|
74
85
|
|
|
86
|
+
class Web < Resource
|
|
87
|
+
def self.create_pre_authorized_deposit_pay_in(params, idempotency_key = nil)
|
|
88
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/full-capture", params, {}, idempotency_key)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
75
92
|
end
|
|
76
93
|
|
|
77
94
|
module BankWire
|
|
@@ -147,22 +164,6 @@ module MangoPay
|
|
|
147
164
|
|
|
148
165
|
end
|
|
149
166
|
|
|
150
|
-
module Payconiq
|
|
151
|
-
|
|
152
|
-
class Web < Resource
|
|
153
|
-
include HTTPCalls::Create
|
|
154
|
-
|
|
155
|
-
def self.url(*)
|
|
156
|
-
"#{MangoPay.api_path}/payins/payment-methods/payconiq"
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
def self.create_legacy(params, idempotency_key = nil)
|
|
160
|
-
MangoPay.request(:post, "#{MangoPay.api_path}/payins/payconiq/web", params, {}, idempotency_key)
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
end
|
|
165
|
-
|
|
166
167
|
module ApplePay
|
|
167
168
|
class Direct < Resource
|
|
168
169
|
include HTTPCalls::Create
|
|
@@ -310,6 +311,7 @@ module MangoPay
|
|
|
310
311
|
end
|
|
311
312
|
|
|
312
313
|
module RecurringPayments
|
|
314
|
+
# <b>DEPRECATED</b>: Please use MangoPay::PayIn::RecurringPayments::RecurringPayInRegistration instead.
|
|
313
315
|
class Recurring < Resource
|
|
314
316
|
include HTTPCalls::Create
|
|
315
317
|
include HTTPCalls::Fetch
|
|
@@ -324,6 +326,21 @@ module MangoPay
|
|
|
324
326
|
end
|
|
325
327
|
end
|
|
326
328
|
|
|
329
|
+
class RecurringPayInRegistration < Resource
|
|
330
|
+
include HTTPCalls::Create
|
|
331
|
+
include HTTPCalls::Fetch
|
|
332
|
+
include HTTPCalls::Update
|
|
333
|
+
|
|
334
|
+
def self.url(*args)
|
|
335
|
+
if args.any?
|
|
336
|
+
"#{MangoPay.api_path}/recurringpayinregistrations/#{args.first}"
|
|
337
|
+
else
|
|
338
|
+
"#{MangoPay.api_path}/recurringpayinregistrations"
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# <b>DEPRECATED</b>: Please use MangoPay::PayIn::RecurringPayments::RecurringCardPayIn instead.
|
|
327
344
|
class CIT < Resource
|
|
328
345
|
include HTTPCalls::Create
|
|
329
346
|
|
|
@@ -332,6 +349,7 @@ module MangoPay
|
|
|
332
349
|
end
|
|
333
350
|
end
|
|
334
351
|
|
|
352
|
+
# <b>DEPRECATED</b>: Please use MangoPay::PayIn::RecurringPayments::RecurringCardPayIn instead.
|
|
335
353
|
class MIT < Resource
|
|
336
354
|
include HTTPCalls::Create
|
|
337
355
|
|
|
@@ -340,6 +358,15 @@ module MangoPay
|
|
|
340
358
|
end
|
|
341
359
|
end
|
|
342
360
|
|
|
361
|
+
class RecurringCardPayIn < Resource
|
|
362
|
+
include HTTPCalls::Create
|
|
363
|
+
|
|
364
|
+
def self.url(*)
|
|
365
|
+
"#{MangoPay.api_path}/payins/recurring/card/direct"
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# <b>DEPRECATED</b>: Please use MangoPay::PayIn::RecurringPayments::RecurringPayPalPayIn instead.
|
|
343
370
|
class PayPalCIT < Resource
|
|
344
371
|
include HTTPCalls::Create
|
|
345
372
|
|
|
@@ -348,6 +375,7 @@ module MangoPay
|
|
|
348
375
|
end
|
|
349
376
|
end
|
|
350
377
|
|
|
378
|
+
# <b>DEPRECATED</b>: Please use MangoPay::PayIn::RecurringPayments::RecurringPayPalPayIn instead.
|
|
351
379
|
class PayPalMIT < Resource
|
|
352
380
|
include HTTPCalls::Create
|
|
353
381
|
|
|
@@ -355,6 +383,30 @@ module MangoPay
|
|
|
355
383
|
"#{MangoPay.api_path}/payins/payment-methods/paypal/recurring"
|
|
356
384
|
end
|
|
357
385
|
end
|
|
386
|
+
|
|
387
|
+
class RecurringPayPalPayIn < Resource
|
|
388
|
+
include HTTPCalls::Create
|
|
389
|
+
|
|
390
|
+
def self.url(*)
|
|
391
|
+
"#{MangoPay.api_path}/payins/payment-methods/paypal/recurring"
|
|
392
|
+
end
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
class RecurringApplePayPayIn < Resource
|
|
396
|
+
include HTTPCalls::Create
|
|
397
|
+
|
|
398
|
+
def self.url(*)
|
|
399
|
+
"#{MangoPay.api_path}/payins/payment-methods/applepay/recurring"
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
class RecurringGooglePayPayIn < Resource
|
|
404
|
+
include HTTPCalls::Create
|
|
405
|
+
|
|
406
|
+
def self.url(*)
|
|
407
|
+
"#{MangoPay.api_path}/payins/payment-methods/googlepay/recurring"
|
|
408
|
+
end
|
|
409
|
+
end
|
|
358
410
|
end
|
|
359
411
|
|
|
360
412
|
module PayInIntent
|
|
@@ -383,6 +435,10 @@ module MangoPay
|
|
|
383
435
|
def cancel(intent_id, params, idempotency_key = nil)
|
|
384
436
|
MangoPay.request(:post, "#{MangoPay.api_path_v3}/payins/intents/#{intent_id}/cancel", params, {}, idempotency_key)
|
|
385
437
|
end
|
|
438
|
+
|
|
439
|
+
def get_external_providers_list
|
|
440
|
+
MangoPay.request(:get, "#{MangoPay.api_path_v3}/payins/intents/external-providers")
|
|
441
|
+
end
|
|
386
442
|
end
|
|
387
443
|
end
|
|
388
444
|
|
data/lib/mangopay/report_v2.rb
CHANGED
|
@@ -12,8 +12,8 @@ module MangoPay
|
|
|
12
12
|
MangoPay.request(:get, "#{MangoPay.api_path}/reporting/reports/#{id}")
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def get_all(
|
|
16
|
-
MangoPay.request(:get, "#{MangoPay.api_path}/reporting/reports",
|
|
15
|
+
def get_all(filters = {})
|
|
16
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/reporting/reports", {}, filters)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
end
|
data/lib/mangopay/version.rb
CHANGED
data/lib/mangopay.rb
CHANGED
|
@@ -50,6 +50,7 @@ module MangoPay
|
|
|
50
50
|
autoload :Ubo, 'mangopay/ubo'
|
|
51
51
|
autoload :Regulatory, 'mangopay/regulatory'
|
|
52
52
|
autoload :Deposit, 'mangopay/deposit'
|
|
53
|
+
autoload :ExtendedPreauthorization, 'mangopay/extended_preauthorization'
|
|
53
54
|
autoload :Conversion, 'mangopay/conversion'
|
|
54
55
|
autoload :PaymentMethodMetadata, 'mangopay/payment_method_metadata'
|
|
55
56
|
autoload :VirtualAccount, 'mangopay/virtual_account'
|
|
@@ -250,8 +251,8 @@ module MangoPay
|
|
|
250
251
|
raise MangoPay::ResponseError.new(uri, res.code, details)
|
|
251
252
|
end
|
|
252
253
|
|
|
253
|
-
unless res.is_a?(Net::HTTPOK)
|
|
254
|
-
if res.is_a?(Net::HTTPUnauthorized)
|
|
254
|
+
unless res.is_a?(Net::HTTPOK) || res.is_a?(Net::HTTPCreated) || res.is_a?(Net::HTTPNoContent)
|
|
255
|
+
if res.is_a?(Net::HTTPUnauthorized) && res['www-authenticate'] != nil
|
|
255
256
|
redirect_url = res['www-authenticate'][/RedirectUrl=(.+)/, 1]
|
|
256
257
|
data['RedirectUrl'] = redirect_url
|
|
257
258
|
data['message'] = 'SCA required to perform this action.'
|
data/mangopay.gemspec
CHANGED
|
@@ -16,15 +16,15 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
s.homepage = 'http://docs.mangopay.com/'
|
|
17
17
|
s.license = 'MIT'
|
|
18
18
|
|
|
19
|
-
s.required_ruby_version = '>=
|
|
19
|
+
s.required_ruby_version = '>= 3.3.0'
|
|
20
20
|
|
|
21
|
-
s.add_dependency('multi_json', '
|
|
21
|
+
s.add_dependency('multi_json', '~> 1.21')
|
|
22
22
|
|
|
23
|
-
s.add_development_dependency('rake', '
|
|
24
|
-
s.add_development_dependency('rspec', '
|
|
23
|
+
s.add_development_dependency('rake', '~> 13.4.2')
|
|
24
|
+
s.add_development_dependency('rspec', '~> 3.13.2')
|
|
25
|
+
s.add_development_dependency('simplecov', '~> 0.22.0')
|
|
25
26
|
|
|
26
|
-
s.files =
|
|
27
|
-
|
|
28
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
27
|
+
s.files = Dir.glob('lib/**/*', File::FNM_DOTMATCH).reject { |f| File.directory?(f) } +
|
|
28
|
+
%w[README.md LICENSE CHANGELOG.md mangopay.gemspec].select { |f| File.exist?(f) }
|
|
29
29
|
s.require_paths = ['lib']
|
|
30
30
|
end
|