sepa 0.0.3 → 0.0.4
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.
- data/lib/sepa/direct_debit_order.rb +6 -3
- data/lib/sepa/payments_initiation/pain00800104/payment_type_information.rb +1 -0
- data/lib/sepa/version.rb +1 -1
- data/spec/sepa/direct_debit_order_spec.rb +2 -2
- data/spec/sepa/expected_customer_direct_debit_initiation.xml +3 -0
- data/spec/sepa/payments_initiation/pain00800104/customer_direct_debit_initiation_spec.rb +1 -0
- metadata +2 -2
@@ -104,10 +104,10 @@ class Sepa::DirectDebitOrder
|
|
104
104
|
end
|
105
105
|
|
106
106
|
class DirectDebit
|
107
|
-
attr_accessor :debtor, :debtor_account, :end_to_end_id, :amount, :currency
|
107
|
+
attr_accessor :debtor, :debtor_account, :end_to_end_id, :amount, :currency, :sequence_type
|
108
108
|
|
109
|
-
def initialize debtor, debtor_account, end_to_end_id, amount, currency
|
110
|
-
@debtor, @debtor_account, @end_to_end_id, @amount, @currency = debtor, debtor_account, end_to_end_id, amount, currency
|
109
|
+
def initialize debtor, debtor_account, end_to_end_id, amount, currency, sequence_type
|
110
|
+
@debtor, @debtor_account, @end_to_end_id, @amount, @currency, @sequence_type = debtor, debtor_account, end_to_end_id, amount, currency, sequence_type
|
111
111
|
end
|
112
112
|
|
113
113
|
def to_properties prefix
|
@@ -118,6 +118,9 @@ class Sepa::DirectDebitOrder
|
|
118
118
|
}
|
119
119
|
hsh = hsh.merge debtor.to_properties("#{prefix}.debtor")
|
120
120
|
hsh = hsh.merge debtor_account.to_properties("#{prefix}.debtor")
|
121
|
+
unless sequence_type == nil || sequence_type == ""
|
122
|
+
hsh = hsh.merge({ "#{prefix}.payment_type_information.sequence_type" => sequence_type })
|
123
|
+
end
|
121
124
|
hsh
|
122
125
|
end
|
123
126
|
end
|
data/lib/sepa/version.rb
CHANGED
@@ -8,11 +8,11 @@ describe Sepa::DirectDebitOrder do
|
|
8
8
|
it "should produce xml corresponding to the given inputs" do
|
9
9
|
bank_account0 = Sepa::DirectDebitOrder::BankAccount.new "FRZIZIPAPARAZZI345789", "FRZZPPKOOKOO"
|
10
10
|
debtor0 = Sepa::DirectDebitOrder::Party.new "DALTON/CONANMR", "64, Livva de Getamire", nil, "30005", "RENNES", "FR", "Conan DALTON", "01234567890", "conan@dalton.sepa.i.hope.this.works"
|
11
|
-
dd0 = Sepa::DirectDebitOrder::DirectDebit.new debtor0, bank_account0, "MONECOLE REG F13789 PVT 3", 1231.31, "EUR"
|
11
|
+
dd0 = Sepa::DirectDebitOrder::DirectDebit.new debtor0, bank_account0, "MONECOLE REG F13789 PVT 3", 1231.31, "EUR", nil
|
12
12
|
|
13
13
|
bank_account1 = Sepa::DirectDebitOrder::BankAccount.new "FRQUIQUIWIGWAM947551", "FRQQWIGGA"
|
14
14
|
debtor1 = Sepa::DirectDebitOrder::Party.new "ADAMS/SAMUELMR", "256, Livva de Getamire", nil, "75048", "PARIS", "FR", "Samuel ADAMS", "09876543210", "samuel@adams.sepa.i.hope.this.works"
|
15
|
-
dd1 = Sepa::DirectDebitOrder::DirectDebit.new debtor1, bank_account1, "MONECOLE REG F13790 PVT 3", 1732.32, "EUR"
|
15
|
+
dd1 = Sepa::DirectDebitOrder::DirectDebit.new debtor1, bank_account1, "MONECOLE REG F13790 PVT 3", 1732.32, "EUR", "FRST"
|
16
16
|
|
17
17
|
sepa_now = Time.strptime "1992-02-28T18:30:00", "%Y-%m-%dT%H:%M:%S"
|
18
18
|
Time.stub(:now).and_return sepa_now
|
@@ -44,6 +44,7 @@ describe Sepa::PaymentsInitiation::Pain00800104::CustomerDirectDebitInitiation d
|
|
44
44
|
"payment_information[0].direct_debit_transaction_information[0].debtor.contact_details.email_address" => "conan@dalton.sepa.i.hope.this.works",
|
45
45
|
"payment_information[0].direct_debit_transaction_information[0].debtor_account.identification.iban" => "FRZIZIPAPARAZZI345789",
|
46
46
|
"payment_information[0].direct_debit_transaction_information[1].payment_identification.end_to_end_identification" => "MONECOLE REG F13790 PVT 3",
|
47
|
+
"payment_information[0].direct_debit_transaction_information[1].payment_type_information.sequence_type" => "FRST",
|
47
48
|
"payment_information[0].direct_debit_transaction_information[1].instructed_amount" => "1732.32",
|
48
49
|
"payment_information[0].direct_debit_transaction_information[1].instructed_amount_currency" => "EUR",
|
49
50
|
"payment_information[0].direct_debit_transaction_information[1].debtor_agent.financial_institution_identification.bic_fi" => "FRQQWIGGA",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|