besepa 0.4.0 → 0.4.1
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/Gemfile.lock +1 -1
- data/lib/besepa/customer.rb +0 -32
- data/lib/besepa/utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee8e440e2acc7191913fe8d3b0651afb516582f7
|
|
4
|
+
data.tar.gz: 403ad4563fe61da0e80cf93f094408d1803e6e7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcc84b3bd93f62fb7d6226d2c365b9a9fd8eaa51d54e5f1c646a7a86b2148fad146976e70f3f2ff88bf5cb07bec5c699cf3550810aa8907766111ce58eb38cb7
|
|
7
|
+
data.tar.gz: 71d387c0b194c125714285501fd0893e261001014fd73d66e97a8ae21f9081e3450cc3cf20436a33ee3475e126ca7ba70f4eae8dc3753c017bef83cf5d8c0f2b
|
data/Gemfile.lock
CHANGED
data/lib/besepa/customer.rb
CHANGED
|
@@ -121,38 +121,6 @@ module Besepa
|
|
|
121
121
|
BankAccount.create( params, {:customer_id => id} )
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
-
# Adds a bank account to this customer.
|
|
125
|
-
# IBAN and BIC are the only mandatory fields. If you already have the mandate signed, you can pass mandate
|
|
126
|
-
# detail's and account will be activated by default. Otherwise BankAccount will be marked as inactive (not usable
|
|
127
|
-
# for creating debits or subscriptions) until mandate is signed. BankAccount includes mandate's info, including
|
|
128
|
-
# signature URL.
|
|
129
|
-
#
|
|
130
|
-
# @param iban
|
|
131
|
-
# @param bic
|
|
132
|
-
# @param bank_name
|
|
133
|
-
# @param scheme CORE|COR1|B2B. Default: CORE
|
|
134
|
-
# @param mandate_signature_date Date in which this mandate was signed if already signed (Format: YYYY-MM-DD)
|
|
135
|
-
# @param mandate_ref Mandate's reference. If none, Besepa will create one.
|
|
136
|
-
# @param used Says if this mandate has already been used or not.
|
|
137
|
-
# @param signature_type Signature to be used: checkbox|sms|biometric
|
|
138
|
-
# @param phone_number Phone number where the signature SMS will be sent in case signature_type==sms is used.
|
|
139
|
-
#
|
|
140
|
-
# @return new created Besepa::BankAccount
|
|
141
|
-
def add_bank_account(iban, bic, bank_name=nil, scheme='CORE', mandate_signature_date=nil, mandate_ref=nil, used=false, signature_type='checkbox', phone_number=nil, redirect_after_signature=nil)
|
|
142
|
-
params = {:iban => iban, :bic => bic }
|
|
143
|
-
params[:mandate] = {scheme: scheme, used: used}
|
|
144
|
-
if mandate_signature_date
|
|
145
|
-
params[:mandate][:signed_at] = mandate_signature_date if mandate_signature_date
|
|
146
|
-
params[:mandate][:reference] = mandate_ref if mandate_ref
|
|
147
|
-
else
|
|
148
|
-
params[:mandate][:signature_type] = signature_type
|
|
149
|
-
params[:mandate][:phone_number] = phone_number if phone_number
|
|
150
|
-
end
|
|
151
|
-
params[:bank_name] = bank_name if bank_name
|
|
152
|
-
params[:mandate][:redirect_after_signature] = redirect_after_signature if redirect_after_signature
|
|
153
|
-
BankAccount.create( params, {:customer_id => id} )
|
|
154
|
-
end
|
|
155
|
-
|
|
156
124
|
# Generates a direct debit that will be charged to this customer.
|
|
157
125
|
#
|
|
158
126
|
# @param debtor_bank_account_id Customer's BankAccount code this Debit shouyd be charged to.
|
data/lib/besepa/utils/version.rb
CHANGED