besepa 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/besepa/bank_account.rb +19 -0
- data/lib/besepa/business_account.rb +7 -1
- data/lib/besepa/customer.rb +1 -1
- data/lib/besepa/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cbe40133425f6bd39e6de6f8d0d3c0b362994c1
|
4
|
+
data.tar.gz: 7adf866ce9d73493f21c1d387e83219a27cf3dbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f87eb9699bfe73d3c66a8ac4e5e8b606b691b18479f02f4436233426d6e945b4d5eca1f01a9a066cb348fe78b7c767e256aebb4afc76907997616f7ddc23f88
|
7
|
+
data.tar.gz: 77b2ed4bd018357d90d13539c390054ba79657b960b039a7e73910ba2e4902ad7f6fe41d8aa8c8b6a2ac855835cc2e953fd1a1747dfdc3ad4d9c5ebab3e95d43
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
besepa (0.3)
|
4
|
+
besepa (0.3.1)
|
5
5
|
faraday (~> 0.9)
|
6
6
|
faraday_middleware (~> 0.9)
|
7
7
|
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
diff-lcs (1.2.5)
|
15
15
|
faraday (0.9.1)
|
16
16
|
multipart-post (>= 1.2, < 3)
|
17
|
-
faraday_middleware (0.
|
17
|
+
faraday_middleware (0.10.0)
|
18
18
|
faraday (>= 0.7.4, < 0.10)
|
19
19
|
multipart-post (2.0.0)
|
20
20
|
rake (10.3.2)
|
data/lib/besepa/bank_account.rb
CHANGED
@@ -25,6 +25,25 @@ module Besepa
|
|
25
25
|
self
|
26
26
|
end
|
27
27
|
|
28
|
+
def replace(iban, bic, bank_name=nil, signature_type=nil, phone_number=nil, redirect_after_signature=nil)
|
29
|
+
payload = {}
|
30
|
+
payload[self.class.klass_name] = {
|
31
|
+
iban: iban,
|
32
|
+
bic: bic,
|
33
|
+
bank_name: bank_name,
|
34
|
+
}
|
35
|
+
if !signature_type.nil?
|
36
|
+
payload[self.class.klass_name][:mandate] = {
|
37
|
+
signature_type: signature_type,
|
38
|
+
phone_number: phone_number,
|
39
|
+
redirect_after_signature: redirect_after_signature,
|
40
|
+
}
|
41
|
+
end
|
42
|
+
response = post "/#{api_path({customer_id: customer_id})}/replace", payload
|
43
|
+
process_attributes(response['response'])
|
44
|
+
self
|
45
|
+
end
|
46
|
+
|
28
47
|
def generate_signature_request
|
29
48
|
response = put "/#{api_path({customer_id: customer_id})}/generate_signature_request"
|
30
49
|
process_attributes(response['response'])
|
@@ -7,7 +7,7 @@ module Besepa
|
|
7
7
|
include Besepa::ApiCalls::Update
|
8
8
|
# include Besepa::ApiCalls::Destroy
|
9
9
|
|
10
|
-
FIELDS = [:id, :iban, :bic, :bank_name, :status, :default, :core_enabled, :core_suffix, :b2b_enabled, :b2b_suffix, :created_at]
|
10
|
+
FIELDS = [:id, :iban, :bic, :bank_name, :status, :default, :core_enabled, :core_suffix, :b2b_enabled, :b2b_suffix, :created_at, :authorization]
|
11
11
|
|
12
12
|
FIELDS.each do |f|
|
13
13
|
attr_accessor f
|
@@ -23,6 +23,12 @@ module Besepa
|
|
23
23
|
self
|
24
24
|
end
|
25
25
|
|
26
|
+
def activation_request
|
27
|
+
response = put "/#{api_path}/activation_request"
|
28
|
+
process_attributes(response['response'])
|
29
|
+
self
|
30
|
+
end
|
31
|
+
|
26
32
|
protected
|
27
33
|
|
28
34
|
def self.api_path(filters={})
|
data/lib/besepa/customer.rb
CHANGED
@@ -126,7 +126,7 @@ module Besepa
|
|
126
126
|
def add_debit(debtor_bank_account_id, reference, description, amount, collect_at, creditor_account_id=nil, metadata=nil)
|
127
127
|
params = {:reference => reference, :description => description, :debtor_bank_account_id => debtor_bank_account_id,
|
128
128
|
:amount => amount, :collect_at => collect_at}
|
129
|
-
params[:
|
129
|
+
params[:creditor_bank_account_id] = creditor_account_id if creditor_account_id
|
130
130
|
params[:metadata] = metadata if metadata
|
131
131
|
Debit.create( params, {:customer_id => id} )
|
132
132
|
end
|
data/lib/besepa/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: besepa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- besepa.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|