wire_client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/wire_client.rb +8 -0
- data/lib/wire_client/transaction/credit_transfer_transaction.rb +1 -1
- data/lib/wire_client/transaction/direct_debit_transaction.rb +2 -2
- data/lib/wire_client/transaction/transaction.rb +6 -4
- data/lib/wire_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d0c3b07727f98c5fa219f4261a801b45df93d96cfce09034966243a87add16c
|
4
|
+
data.tar.gz: 553cb015719f0a62fe215ec1dff8e3a4ce7c5e886408eb8b08da39e6254ddd43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b28851c9b4c88299144add8d775a945f017418b9ef00b1576cdd0589212baec4f41d221a44720a42bdb148dc4548bf8a0b19f79c657f6ab343e03bcbfff585ed
|
7
|
+
data.tar.gz: 38525913045b466925ac1ebb822f5fce70251d9352e0887c455935f4caaeca8a19bf7f2928c8188f3e8f6fd634dcdeaf9078a62619b04a32b81283a365bfeb9c
|
data/Rakefile
CHANGED
data/lib/wire_client.rb
CHANGED
@@ -8,7 +8,7 @@ module WireClient
|
|
8
8
|
validates_inclusion_of :service_level, :in => SERVICE_LEVEL_TYPES
|
9
9
|
|
10
10
|
validate do |t|
|
11
|
-
t.validate_requested_date_after(
|
11
|
+
t.validate_requested_date_after(WireClient.today.next)
|
12
12
|
end
|
13
13
|
|
14
14
|
def initialize(attributes = {})
|
@@ -23,7 +23,7 @@ module WireClient
|
|
23
23
|
validates_inclusion_of :service_level, :in => SERVICE_LEVEL_TYPES
|
24
24
|
|
25
25
|
validate do |t|
|
26
|
-
t.validate_requested_date_after(
|
26
|
+
t.validate_requested_date_after(WireClient.today.next)
|
27
27
|
end
|
28
28
|
|
29
29
|
validate do |t|
|
@@ -32,7 +32,7 @@ module WireClient
|
|
32
32
|
end
|
33
33
|
|
34
34
|
if t.mandate_date_of_signature.is_a?(Date)
|
35
|
-
if t.mandate_date_of_signature >
|
35
|
+
if t.mandate_date_of_signature > WireClient.today
|
36
36
|
errors.add(:mandate_date_of_signature, 'is in the future')
|
37
37
|
end
|
38
38
|
else
|
@@ -3,8 +3,6 @@ module WireClient
|
|
3
3
|
include ActiveModel::Validations
|
4
4
|
extend Converter
|
5
5
|
|
6
|
-
DEFAULT_REQUESTED_DATE = Time.zone.now.to_date.freeze
|
7
|
-
|
8
6
|
attr_accessor :name,
|
9
7
|
:iban,
|
10
8
|
:bic,
|
@@ -53,7 +51,7 @@ module WireClient
|
|
53
51
|
@country ||= 'US'
|
54
52
|
@clear_system_code ||= 'USABA'
|
55
53
|
@agent_name ||= 'NOTPROVIDED'
|
56
|
-
@requested_date ||=
|
54
|
+
@requested_date ||= default_requested_date
|
57
55
|
@reference ||= 'NOTPROVIDED'
|
58
56
|
@batch_booking = true if @batch_booking.nil?
|
59
57
|
@service_priority ||= 'NORM'
|
@@ -72,10 +70,14 @@ module WireClient
|
|
72
70
|
|
73
71
|
protected
|
74
72
|
|
73
|
+
def default_requested_date
|
74
|
+
WireClient.today.freeze
|
75
|
+
end
|
76
|
+
|
75
77
|
def validate_requested_date_after(min_requested_date)
|
76
78
|
return unless requested_date.is_a?(Date)
|
77
79
|
|
78
|
-
if requested_date !=
|
80
|
+
if requested_date != default_requested_date &&
|
79
81
|
requested_date < min_requested_date
|
80
82
|
errors.add(
|
81
83
|
:requested_date,
|
data/lib/wire_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wire_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ewerton Carlos Assis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ach_client
|