sepa 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/sepa/base.rb +13 -1
- data/lib/sepa/payments_initiation/pain00800104/payment_information.rb +1 -1
- data/lib/sepa/payments_initiation/pain00800104/remittance_information_choice.rb +3 -3
- data/lib/sepa/version.rb +1 -1
- data/spec/sepa/expected-simple.xml +2 -2
- data/spec/sepa/payments_initiation/pain00800104/customer_direct_debit_initiation_spec.rb +2 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a183c8a185ca6b9077d42eb3269bbb757e81809dec8607ef13bd0609a5da2027
|
4
|
+
data.tar.gz: 37e39aeb120fa65b65eff4355f4948e9a1182b75cf915ceef6f19b216f5a0560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f103db3c12ca1bf92df6482019c8b096120949a70554bb0aaef52c9c289098c8ca56c27ee5382333e5a2b402c9354dfffb1b1cdc05e51769d0f6a5962c30ed1a
|
7
|
+
data.tar.gz: 3a34cd26af6a2743351b9aa9d4dc1430f0413e7f085ea4e9c2112972091f68ac8907b8189e98b73c517662ddece1929d9489a237569a9818d7d371f617d58093
|
data/lib/sepa/base.rb
CHANGED
@@ -16,9 +16,21 @@ module Sepa
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
class Max140Text < StringWithConstraint
|
20
|
+
def constrain s
|
21
|
+
s ? s.to_s.strip[0...140] : ''
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
19
25
|
class Max70Text < StringWithConstraint
|
20
26
|
def constrain s
|
21
|
-
s ? s.to_s.strip[0
|
27
|
+
s ? s.to_s.strip[0...70] : ''
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class Max35Text < StringWithConstraint
|
32
|
+
def constrain s
|
33
|
+
s ? s.to_s.strip[0...35] : ''
|
22
34
|
end
|
23
35
|
end
|
24
36
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "sepa/payments_initiation/pain00800104/direct_debit_transaction_information"
|
2
2
|
|
3
3
|
class Sepa::PaymentsInitiation::Pain00800104::PaymentInformation < Sepa::Base
|
4
|
-
attribute :payment_information_identification , "PmtInfId"
|
4
|
+
attribute :payment_information_identification , "PmtInfId" , Sepa::Max35Text
|
5
5
|
attribute :payment_method , "PmtMtd"
|
6
6
|
attribute :batch_booking , "BtchBookg"
|
7
7
|
attribute :number_of_transactions , "NbOfTxs"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class Sepa::PaymentsInitiation::Pain00800104::RemittanceInformationChoice < Sepa::Base
|
2
|
-
attribute :unstructured_remittance_information , "Ustrd"
|
2
|
+
attribute :unstructured_remittance_information , "Ustrd", Sepa::Max70Text
|
3
3
|
# don't think this is commonly used; would probably need a class
|
4
4
|
attribute :structured_remittance_information , "Strd"
|
5
5
|
|
6
6
|
def empty?
|
7
|
-
[unstructured_remittance_information, structured_remittance_information].compact ==
|
7
|
+
[unstructured_remittance_information, structured_remittance_information].compact.join.strip == ""
|
8
8
|
end
|
9
|
-
end
|
9
|
+
end
|
data/lib/sepa/version.rb
CHANGED
@@ -83,7 +83,7 @@
|
|
83
83
|
<PstCd>30005</PstCd>
|
84
84
|
<TwnNm>RENNES</TwnNm>
|
85
85
|
<Ctry>FR</Ctry>
|
86
|
-
<AdrLine>64, Livva de Getamire
|
86
|
+
<AdrLine>64, Livva de Getamire 345678 30 345678 40 345678 50 345678 60 345678 7</AdrLine>
|
87
87
|
</PstlAdr>
|
88
88
|
<CtctDtls>
|
89
89
|
<Nm>Conan DALTON</Nm>
|
@@ -116,7 +116,7 @@
|
|
116
116
|
</FinInstnId>
|
117
117
|
</DbtrAgt>
|
118
118
|
<Dbtr>
|
119
|
-
<Nm>ADAMS/
|
119
|
+
<Nm>ADAMS/SAMUELMR567892_2345678_3_2345678_4_2345678_5_2345678_6_2345678_7</Nm>
|
120
120
|
<PstlAdr>
|
121
121
|
<PstCd>75048</PstCd>
|
122
122
|
<TwnNm>PARIS</TwnNm>
|
@@ -41,7 +41,7 @@ describe Sepa::PaymentsInitiation::Pain00800104::CustomerDirectDebitInitiation d
|
|
41
41
|
"payment_information[0].direct_debit_transaction_information[0].direct_debit_transaction.mandate_related_information.mandate_identification" => "mandate-id-0",
|
42
42
|
"payment_information[0].direct_debit_transaction_information[0].debtor_agent.financial_institution_identification.bic_fi" => "FRZZPPKOOKOO",
|
43
43
|
"payment_information[0].direct_debit_transaction_information[0].debtor.name" => "DALTON/CONANMR",
|
44
|
-
"payment_information[0].direct_debit_transaction_information[0].debtor.postal_address.address_line[0]" => "64, Livva de Getamire
|
44
|
+
"payment_information[0].direct_debit_transaction_information[0].debtor.postal_address.address_line[0]" => "64, Livva de Getamire 345678 30 345678 40 345678 50 345678 60 345678 70 345678 80",
|
45
45
|
"payment_information[0].direct_debit_transaction_information[0].debtor.postal_address.post_code" => "30005",
|
46
46
|
"payment_information[0].direct_debit_transaction_information[0].debtor.postal_address.town_name" => "RENNES",
|
47
47
|
"payment_information[0].direct_debit_transaction_information[0].debtor.postal_address.country" => "FR",
|
@@ -55,7 +55,7 @@ describe Sepa::PaymentsInitiation::Pain00800104::CustomerDirectDebitInitiation d
|
|
55
55
|
"payment_information[0].direct_debit_transaction_information[1].instructed_amount_currency" => "EUR",
|
56
56
|
"payment_information[0].direct_debit_transaction_information[1].direct_debit_transaction.mandate_related_information.mandate_identification" => "mandate-id-1",
|
57
57
|
"payment_information[0].direct_debit_transaction_information[1].debtor_agent.financial_institution_identification.bic_fi" => "FRQQWIGGA",
|
58
|
-
"payment_information[0].direct_debit_transaction_information[1].debtor.name" => " ADAMS/
|
58
|
+
"payment_information[0].direct_debit_transaction_information[1].debtor.name" => " ADAMS/SAMUELMR567892_2345678_3_2345678_4_2345678_5_2345678_6_2345678_7_2345678_should-be-truncated-at-70-chars ",
|
59
59
|
"payment_information[0].direct_debit_transaction_information[1].debtor.postal_address.address_line[0]" => "256, Livva de Getamire",
|
60
60
|
"payment_information[0].direct_debit_transaction_information[1].debtor.postal_address.post_code" => "75048",
|
61
61
|
"payment_information[0].direct_debit_transaction_information[1].debtor.postal_address.town_name" => "PARIS",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sepa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Conan Dalton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -159,8 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
|
163
|
-
rubygems_version: 2.5.2.3
|
162
|
+
rubygems_version: 3.0.3.1
|
164
163
|
signing_key:
|
165
164
|
specification_version: 4
|
166
165
|
summary: 'pain.008.001.04 and pain.008.001.02 CustomerDirectDebitInitiation ISO20022
|