mangopay 3.0.25.pre.alpha.pre.20 → 3.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +28 -28
- data/.rspec +2 -2
- data/.travis.yml +4 -13
- data/Gemfile +2 -2
- data/LICENSE +20 -20
- data/README.md +126 -126
- data/bin/mangopay +9 -9
- data/lib/generators/mangopay/install_generator.rb +60 -60
- data/lib/generators/templates/mangopay.rb.erb +5 -5
- data/lib/mangopay.rb +225 -225
- data/lib/mangopay/authorization_token.rb +88 -88
- data/lib/mangopay/bank_account.rb +38 -38
- data/lib/mangopay/card.rb +8 -8
- data/lib/mangopay/card_registration.rb +9 -9
- data/lib/mangopay/client.rb +74 -74
- data/lib/mangopay/dispute.rb +130 -130
- data/lib/mangopay/errors.rb +61 -61
- data/lib/mangopay/event.rb +18 -18
- data/lib/mangopay/filter_parameters.rb +46 -46
- data/lib/mangopay/hook.rb +9 -9
- data/lib/mangopay/http_calls.rb +85 -85
- data/lib/mangopay/json.rb +14 -14
- data/lib/mangopay/kyc_document.rb +70 -70
- data/lib/mangopay/legal_user.rb +15 -15
- data/lib/mangopay/mandate.rb +32 -32
- data/lib/mangopay/natural_user.rb +14 -14
- data/lib/mangopay/pay_in.rb +85 -85
- data/lib/mangopay/pay_out.rb +14 -14
- data/lib/mangopay/pre_authorization.rb +13 -13
- data/lib/mangopay/refund.rb +7 -7
- data/lib/mangopay/report.rb +17 -17
- data/lib/mangopay/resource.rb +21 -21
- data/lib/mangopay/temp.rb +74 -74
- data/lib/mangopay/transaction.rb +24 -24
- data/lib/mangopay/transfer.rb +9 -9
- data/lib/mangopay/user.rb +43 -43
- data/lib/mangopay/version.rb +3 -3
- data/lib/mangopay/wallet.rb +17 -17
- data/mangopay.gemspec +30 -31
- data/spec/mangopay/authorization_token_spec.rb +70 -70
- data/spec/mangopay/bank_account_spec.rb +97 -97
- data/spec/mangopay/card_registration_spec.rb +73 -73
- data/spec/mangopay/client_spec.rb +110 -110
- data/spec/mangopay/configuration_spec.rb +95 -95
- data/spec/mangopay/dispute_spec.rb +262 -262
- data/spec/mangopay/event_spec.rb +31 -31
- data/spec/mangopay/fetch_filters_spec.rb +63 -63
- data/spec/mangopay/hook_spec.rb +37 -37
- data/spec/mangopay/idempotency_spec.rb +41 -41
- data/spec/mangopay/kyc_document_spec.rb +103 -103
- data/spec/mangopay/log_requests_filter_spec.rb +25 -25
- data/spec/mangopay/mandate_spec.rb +92 -92
- data/spec/mangopay/payin_bankwire_direct_spec.rb +74 -74
- data/spec/mangopay/payin_card_direct_spec.rb +68 -68
- data/spec/mangopay/payin_card_web_spec.rb +38 -38
- data/spec/mangopay/payin_directdebit_direct_spec.rb +37 -37
- data/spec/mangopay/payin_directdebit_web_spec.rb +38 -38
- data/spec/mangopay/payin_paypal_web_spec.rb +38 -38
- data/spec/mangopay/payin_preauthorized_direct_spec.rb +68 -68
- data/spec/mangopay/payout_bankwire_spec.rb +54 -54
- data/spec/mangopay/preauthorization_spec.rb +42 -42
- data/spec/mangopay/refund_spec.rb +21 -21
- data/spec/mangopay/report_spec.rb +39 -39
- data/spec/mangopay/shared_resources.rb +381 -381
- data/spec/mangopay/temp_paymentcard_spec.rb +31 -31
- data/spec/mangopay/transaction_spec.rb +54 -54
- data/spec/mangopay/transfer_spec.rb +69 -69
- data/spec/mangopay/user_spec.rb +137 -137
- data/spec/mangopay/wallet_spec.rb +80 -80
- data/spec/spec_helper.rb +31 -31
- metadata +5 -5
@@ -1,70 +1,70 @@
|
|
1
|
-
require 'base64'
|
2
|
-
|
3
|
-
module MangoPay
|
4
|
-
|
5
|
-
# See http://docs.mangopay.com/api-references/kyc/documents/
|
6
|
-
class KycDocument < Resource
|
7
|
-
class << self
|
8
|
-
def create(user_id, params, idempotency_key = nil)
|
9
|
-
MangoPay.request(:post, url(user_id), params, {}, idempotency_key)
|
10
|
-
end
|
11
|
-
|
12
|
-
def update(user_id, document_id, params = {})
|
13
|
-
MangoPay.request(:put, url(user_id, document_id), params)
|
14
|
-
end
|
15
|
-
|
16
|
-
# Fetches the KYC document belonging to the given +user_id+, with the given +document_id+.
|
17
|
-
def fetch(user_id, document_id)
|
18
|
-
url = (user_id) ? url(user_id, document_id) : "#{MangoPay.api_path}/KYC/documents/#{CGI.escape(document_id.to_s)}"
|
19
|
-
MangoPay.request(:get, url)
|
20
|
-
end
|
21
|
-
|
22
|
-
# Fetches list of KYC documents:
|
23
|
-
# - for the particular user if +user_id+ is provided (not nil)
|
24
|
-
# - or for all users otherwise.
|
25
|
-
#
|
26
|
-
# Optional +filters+ is a hash accepting following keys:
|
27
|
-
# - +page+, +per_page+, +sort+: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
|
28
|
-
# - filters such as +Type+ (e.g. 'IDENTITY_PROOF') and +Status+ (e.g. 'VALIDATED')
|
29
|
-
# - +BeforeDate+ (timestamp): filters documents with CreationDate _before_ this date
|
30
|
-
# - +AfterDate+ (timestamp): filters documents with CreationDate _after_ this date
|
31
|
-
#
|
32
|
-
def fetch_all(user_id = nil, filters = {})
|
33
|
-
url = (user_id) ? url(user_id) : "#{MangoPay.api_path}/KYC/documents"
|
34
|
-
MangoPay.request(:get, url, {}, filters)
|
35
|
-
end
|
36
|
-
|
37
|
-
# Adds the file page (attachment) to the given document.
|
38
|
-
#
|
39
|
-
# See http://docs.mangopay.com/api-references/kyc/pages/ :
|
40
|
-
# - Document have to be in 'CREATED' Status
|
41
|
-
# - You can create as many pages as needed
|
42
|
-
# - Change Status to 'VALIDATION_ASKED' to submit KYC documents
|
43
|
-
#
|
44
|
-
# The file_content_base64 param may be:
|
45
|
-
# - Base64 encoded file content
|
46
|
-
# - or nil: in this case pass the file path in the next param
|
47
|
-
#
|
48
|
-
def create_page(user_id, document_id, file_content_base64, file_path = nil, idempotency_key = nil)
|
49
|
-
if file_content_base64.nil? && !file_path.nil?
|
50
|
-
bts = File.open(file_path, 'rb') { |f| f.read }
|
51
|
-
file_content_base64 = Base64.encode64(bts)
|
52
|
-
end
|
53
|
-
# normally it returns 204 HTTP code on success
|
54
|
-
begin
|
55
|
-
MangoPay.request(:post, url(user_id, document_id) + '/pages', {'File' => file_content_base64}, {}, idempotency_key)
|
56
|
-
rescue ResponseError => ex
|
57
|
-
raise ex unless ex.code == '204'
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
def url(user_id, document_id = nil)
|
62
|
-
if document_id
|
63
|
-
"#{MangoPay.api_path}/users/#{CGI.escape(user_id.to_s)}/KYC/documents/#{CGI.escape(document_id.to_s)}"
|
64
|
-
else
|
65
|
-
"#{MangoPay.api_path}/users/#{CGI.escape(user_id.to_s)}/KYC/documents"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
1
|
+
require 'base64'
|
2
|
+
|
3
|
+
module MangoPay
|
4
|
+
|
5
|
+
# See http://docs.mangopay.com/api-references/kyc/documents/
|
6
|
+
class KycDocument < Resource
|
7
|
+
class << self
|
8
|
+
def create(user_id, params, idempotency_key = nil)
|
9
|
+
MangoPay.request(:post, url(user_id), params, {}, idempotency_key)
|
10
|
+
end
|
11
|
+
|
12
|
+
def update(user_id, document_id, params = {})
|
13
|
+
MangoPay.request(:put, url(user_id, document_id), params)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Fetches the KYC document belonging to the given +user_id+, with the given +document_id+.
|
17
|
+
def fetch(user_id, document_id)
|
18
|
+
url = (user_id) ? url(user_id, document_id) : "#{MangoPay.api_path}/KYC/documents/#{CGI.escape(document_id.to_s)}"
|
19
|
+
MangoPay.request(:get, url)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Fetches list of KYC documents:
|
23
|
+
# - for the particular user if +user_id+ is provided (not nil)
|
24
|
+
# - or for all users otherwise.
|
25
|
+
#
|
26
|
+
# Optional +filters+ is a hash accepting following keys:
|
27
|
+
# - +page+, +per_page+, +sort+: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
|
28
|
+
# - filters such as +Type+ (e.g. 'IDENTITY_PROOF') and +Status+ (e.g. 'VALIDATED')
|
29
|
+
# - +BeforeDate+ (timestamp): filters documents with CreationDate _before_ this date
|
30
|
+
# - +AfterDate+ (timestamp): filters documents with CreationDate _after_ this date
|
31
|
+
#
|
32
|
+
def fetch_all(user_id = nil, filters = {})
|
33
|
+
url = (user_id) ? url(user_id) : "#{MangoPay.api_path}/KYC/documents"
|
34
|
+
MangoPay.request(:get, url, {}, filters)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Adds the file page (attachment) to the given document.
|
38
|
+
#
|
39
|
+
# See http://docs.mangopay.com/api-references/kyc/pages/ :
|
40
|
+
# - Document have to be in 'CREATED' Status
|
41
|
+
# - You can create as many pages as needed
|
42
|
+
# - Change Status to 'VALIDATION_ASKED' to submit KYC documents
|
43
|
+
#
|
44
|
+
# The file_content_base64 param may be:
|
45
|
+
# - Base64 encoded file content
|
46
|
+
# - or nil: in this case pass the file path in the next param
|
47
|
+
#
|
48
|
+
def create_page(user_id, document_id, file_content_base64, file_path = nil, idempotency_key = nil)
|
49
|
+
if file_content_base64.nil? && !file_path.nil?
|
50
|
+
bts = File.open(file_path, 'rb') { |f| f.read }
|
51
|
+
file_content_base64 = Base64.encode64(bts)
|
52
|
+
end
|
53
|
+
# normally it returns 204 HTTP code on success
|
54
|
+
begin
|
55
|
+
MangoPay.request(:post, url(user_id, document_id) + '/pages', {'File' => file_content_base64}, {}, idempotency_key)
|
56
|
+
rescue ResponseError => ex
|
57
|
+
raise ex unless ex.code == '204'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def url(user_id, document_id = nil)
|
62
|
+
if document_id
|
63
|
+
"#{MangoPay.api_path}/users/#{CGI.escape(user_id.to_s)}/KYC/documents/#{CGI.escape(document_id.to_s)}"
|
64
|
+
else
|
65
|
+
"#{MangoPay.api_path}/users/#{CGI.escape(user_id.to_s)}/KYC/documents"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/lib/mangopay/legal_user.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
module MangoPay
|
2
|
-
|
3
|
-
# See http://docs.mangopay.com/api-references/users/legal-users/
|
4
|
-
# See also parent class MangoPay::User
|
5
|
-
class LegalUser < User
|
6
|
-
|
7
|
-
def self.url(id = nil)
|
8
|
-
if id
|
9
|
-
"#{MangoPay.api_path}/users/legal/#{CGI.escape(id.to_s)}"
|
10
|
-
else
|
11
|
-
"#{MangoPay.api_path}/users/legal"
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
1
|
+
module MangoPay
|
2
|
+
|
3
|
+
# See http://docs.mangopay.com/api-references/users/legal-users/
|
4
|
+
# See also parent class MangoPay::User
|
5
|
+
class LegalUser < User
|
6
|
+
|
7
|
+
def self.url(id = nil)
|
8
|
+
if id
|
9
|
+
"#{MangoPay.api_path}/users/legal/#{CGI.escape(id.to_s)}"
|
10
|
+
else
|
11
|
+
"#{MangoPay.api_path}/users/legal"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/mangopay/mandate.rb
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
module MangoPay
|
2
|
-
|
3
|
-
# See https://docs.mangopay.com/api-references/mandates/
|
4
|
-
class Mandate < Resource
|
5
|
-
include HTTPCalls::Fetch
|
6
|
-
|
7
|
-
class << self
|
8
|
-
|
9
|
-
# +params+: hash; see https://docs.mangopay.com/api-references/mandates/
|
10
|
-
def create(params, idempotency_key = nil)
|
11
|
-
url = "#{MangoPay.api_path}/mandates/directdebit/web"
|
12
|
-
MangoPay.request(:post, url, params, {}, idempotency_key)
|
13
|
-
end
|
14
|
-
|
15
|
-
def cancel(id)
|
16
|
-
url = "#{MangoPay.api_path}/mandates/#{id}/cancel"
|
17
|
-
MangoPay.request(:put, url)
|
18
|
-
end
|
19
|
-
|
20
|
-
def fetch_for_user(user_id, filters = {})
|
21
|
-
url = "#{MangoPay.api_path}/users/#{user_id}/mandates"
|
22
|
-
MangoPay.request(:get, url, {}, filters)
|
23
|
-
end
|
24
|
-
|
25
|
-
def fetch_for_user_bank_account(user_id, bank_account_id, filters = {})
|
26
|
-
url = "#{MangoPay.api_path}/users/#{user_id}/bankaccounts/#{bank_account_id}/mandates"
|
27
|
-
MangoPay.request(:get, url, {}, filters)
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
1
|
+
module MangoPay
|
2
|
+
|
3
|
+
# See https://docs.mangopay.com/api-references/mandates/
|
4
|
+
class Mandate < Resource
|
5
|
+
include HTTPCalls::Fetch
|
6
|
+
|
7
|
+
class << self
|
8
|
+
|
9
|
+
# +params+: hash; see https://docs.mangopay.com/api-references/mandates/
|
10
|
+
def create(params, idempotency_key = nil)
|
11
|
+
url = "#{MangoPay.api_path}/mandates/directdebit/web"
|
12
|
+
MangoPay.request(:post, url, params, {}, idempotency_key)
|
13
|
+
end
|
14
|
+
|
15
|
+
def cancel(id)
|
16
|
+
url = "#{MangoPay.api_path}/mandates/#{id}/cancel"
|
17
|
+
MangoPay.request(:put, url)
|
18
|
+
end
|
19
|
+
|
20
|
+
def fetch_for_user(user_id, filters = {})
|
21
|
+
url = "#{MangoPay.api_path}/users/#{user_id}/mandates"
|
22
|
+
MangoPay.request(:get, url, {}, filters)
|
23
|
+
end
|
24
|
+
|
25
|
+
def fetch_for_user_bank_account(user_id, bank_account_id, filters = {})
|
26
|
+
url = "#{MangoPay.api_path}/users/#{user_id}/bankaccounts/#{bank_account_id}/mandates"
|
27
|
+
MangoPay.request(:get, url, {}, filters)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
module MangoPay
|
2
|
-
|
3
|
-
# See http://docs.mangopay.com/api-references/users/natural-users/
|
4
|
-
class NaturalUser < User
|
5
|
-
|
6
|
-
def self.url(id = nil)
|
7
|
-
if id
|
8
|
-
"#{MangoPay.api_path}/users/natural/#{CGI.escape(id.to_s)}"
|
9
|
-
else
|
10
|
-
"#{MangoPay.api_path}/users/natural"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
1
|
+
module MangoPay
|
2
|
+
|
3
|
+
# See http://docs.mangopay.com/api-references/users/natural-users/
|
4
|
+
class NaturalUser < User
|
5
|
+
|
6
|
+
def self.url(id = nil)
|
7
|
+
if id
|
8
|
+
"#{MangoPay.api_path}/users/natural/#{CGI.escape(id.to_s)}"
|
9
|
+
else
|
10
|
+
"#{MangoPay.api_path}/users/natural"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/mangopay/pay_in.rb
CHANGED
@@ -1,85 +1,85 @@
|
|
1
|
-
module MangoPay
|
2
|
-
|
3
|
-
# See http://docs.mangopay.com/api-references/payins/
|
4
|
-
class PayIn < Resource
|
5
|
-
include HTTPCalls::Fetch
|
6
|
-
include HTTPCalls::Refund
|
7
|
-
|
8
|
-
module Card
|
9
|
-
|
10
|
-
# See http://docs.mangopay.com/api-references/payins/payins-card-web/
|
11
|
-
class Web < Resource
|
12
|
-
include HTTPCalls::Create
|
13
|
-
def self.url(*)
|
14
|
-
"#{MangoPay.api_path}/payins/card/#{CGI.escape(class_name.downcase)}"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# See http://docs.mangopay.com/api-references/payins/payindirectcard/
|
19
|
-
class Direct < Resource
|
20
|
-
include HTTPCalls::Create
|
21
|
-
def self.url(*)
|
22
|
-
"#{MangoPay.api_path}/payins/card/#{CGI.escape(class_name.downcase)}"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
module PreAuthorized
|
29
|
-
|
30
|
-
# See http://docs.mangopay.com/api-references/payins/preauthorized-payin/
|
31
|
-
class Direct < Resource
|
32
|
-
include HTTPCalls::Create
|
33
|
-
def self.url(*)
|
34
|
-
"#{MangoPay.api_path}/payins/preauthorized/direct"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
module BankWire
|
41
|
-
|
42
|
-
# See http://docs.mangopay.com/api-references/payins/payinbankwire/
|
43
|
-
class Direct < Resource
|
44
|
-
include HTTPCalls::Create
|
45
|
-
def self.url(*)
|
46
|
-
"#{MangoPay.api_path}/payins/bankwire/direct"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
module DirectDebit
|
53
|
-
|
54
|
-
# See http://docs.mangopay.com/api-references/payins/direct-debit-pay-in-web/
|
55
|
-
class Web < Resource
|
56
|
-
include HTTPCalls::Create
|
57
|
-
def self.url(*)
|
58
|
-
"#{MangoPay.api_path}/payins/directdebit/#{CGI.escape(class_name.downcase)}"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# See https://docs.mangopay.com/api-references/payins/direct-debit-pay-in-direct/
|
63
|
-
class Direct < Resource
|
64
|
-
include HTTPCalls::Create
|
65
|
-
def self.url(*)
|
66
|
-
"#{MangoPay.api_path}/payins/directdebit/#{CGI.escape(class_name.downcase)}"
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
|
72
|
-
module PayPal
|
73
|
-
|
74
|
-
# See https://docs.mangopay.com/api-references/payins/paypal-payin/
|
75
|
-
class Web < Resource
|
76
|
-
include HTTPCalls::Create
|
77
|
-
def self.url(*)
|
78
|
-
"#{MangoPay.api_path}/payins/paypal/#{CGI.escape(class_name.downcase)}"
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
end
|
1
|
+
module MangoPay
|
2
|
+
|
3
|
+
# See http://docs.mangopay.com/api-references/payins/
|
4
|
+
class PayIn < Resource
|
5
|
+
include HTTPCalls::Fetch
|
6
|
+
include HTTPCalls::Refund
|
7
|
+
|
8
|
+
module Card
|
9
|
+
|
10
|
+
# See http://docs.mangopay.com/api-references/payins/payins-card-web/
|
11
|
+
class Web < Resource
|
12
|
+
include HTTPCalls::Create
|
13
|
+
def self.url(*)
|
14
|
+
"#{MangoPay.api_path}/payins/card/#{CGI.escape(class_name.downcase)}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# See http://docs.mangopay.com/api-references/payins/payindirectcard/
|
19
|
+
class Direct < Resource
|
20
|
+
include HTTPCalls::Create
|
21
|
+
def self.url(*)
|
22
|
+
"#{MangoPay.api_path}/payins/card/#{CGI.escape(class_name.downcase)}"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
module PreAuthorized
|
29
|
+
|
30
|
+
# See http://docs.mangopay.com/api-references/payins/preauthorized-payin/
|
31
|
+
class Direct < Resource
|
32
|
+
include HTTPCalls::Create
|
33
|
+
def self.url(*)
|
34
|
+
"#{MangoPay.api_path}/payins/preauthorized/direct"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
module BankWire
|
41
|
+
|
42
|
+
# See http://docs.mangopay.com/api-references/payins/payinbankwire/
|
43
|
+
class Direct < Resource
|
44
|
+
include HTTPCalls::Create
|
45
|
+
def self.url(*)
|
46
|
+
"#{MangoPay.api_path}/payins/bankwire/direct"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
module DirectDebit
|
53
|
+
|
54
|
+
# See http://docs.mangopay.com/api-references/payins/direct-debit-pay-in-web/
|
55
|
+
class Web < Resource
|
56
|
+
include HTTPCalls::Create
|
57
|
+
def self.url(*)
|
58
|
+
"#{MangoPay.api_path}/payins/directdebit/#{CGI.escape(class_name.downcase)}"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# See https://docs.mangopay.com/api-references/payins/direct-debit-pay-in-direct/
|
63
|
+
class Direct < Resource
|
64
|
+
include HTTPCalls::Create
|
65
|
+
def self.url(*)
|
66
|
+
"#{MangoPay.api_path}/payins/directdebit/#{CGI.escape(class_name.downcase)}"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
module PayPal
|
73
|
+
|
74
|
+
# See https://docs.mangopay.com/api-references/payins/paypal-payin/
|
75
|
+
class Web < Resource
|
76
|
+
include HTTPCalls::Create
|
77
|
+
def self.url(*)
|
78
|
+
"#{MangoPay.api_path}/payins/paypal/#{CGI.escape(class_name.downcase)}"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
data/lib/mangopay/pay_out.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
module MangoPay
|
2
|
-
class PayOut < Resource
|
3
|
-
include HTTPCalls::Fetch
|
4
|
-
|
5
|
-
# See http://docs.mangopay.com/api-references/pay-out-bank-wire/
|
6
|
-
class BankWire < Resource
|
7
|
-
include HTTPCalls::Create
|
8
|
-
|
9
|
-
def self.url(*)
|
10
|
-
"#{MangoPay.api_path}/payouts/bankwire"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
1
|
+
module MangoPay
|
2
|
+
class PayOut < Resource
|
3
|
+
include HTTPCalls::Fetch
|
4
|
+
|
5
|
+
# See http://docs.mangopay.com/api-references/pay-out-bank-wire/
|
6
|
+
class BankWire < Resource
|
7
|
+
include HTTPCalls::Create
|
8
|
+
|
9
|
+
def self.url(*)
|
10
|
+
"#{MangoPay.api_path}/payouts/bankwire"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|