secretariat 3.8.1 → 3.9.0
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/lib/secretariat/line_item.rb +2 -2
- data/lib/secretariat/trade_party.rb +10 -3
- data/lib/secretariat/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: 9928207c56dc9a9c063c57efec9df9ddbe584c6337bb5b24fef7c67843686a63
|
|
4
|
+
data.tar.gz: d3c080148511c7953403aa4bb0dfc57e4efc9bcfeabd7e5c801aef890b4e28b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf35ee563819fb8f7739ea83ed631aa6cb346ba1134de090731a26c7b3dfc7e47abc83e28594633c79c33bb696b9d0e17fdaf2bcc8ffdb7a7d1a12caf2830a97
|
|
7
|
+
data.tar.gz: b899f47bcf8f0c8bedb7c6e79b4f22c80a655ae89c943e2e36121ecea677410407a6124f36d3a2b96031e0237d343f265f5d64ba34022d137d3752bd6fb97249
|
|
@@ -173,7 +173,7 @@ module Secretariat
|
|
|
173
173
|
xml['udt'].Indicator 'false'
|
|
174
174
|
end
|
|
175
175
|
Helpers.currency_element(xml, 'ram', 'ActualAmount', discount_amount, currency_code, add_currency: version == 1)
|
|
176
|
-
xml['ram'].Reason discount_reason
|
|
176
|
+
xml['ram'].Reason discount_reason if discount_reason
|
|
177
177
|
end
|
|
178
178
|
end
|
|
179
179
|
if version == 1 && discount_amount
|
|
@@ -182,7 +182,7 @@ module Secretariat
|
|
|
182
182
|
xml['udt'].Indicator 'false'
|
|
183
183
|
end
|
|
184
184
|
Helpers.currency_element(xml, 'ram', 'ActualAmount', discount_amount, currency_code, add_currency: version == 1)
|
|
185
|
-
xml['ram'].Reason discount_reason
|
|
185
|
+
xml['ram'].Reason discount_reason if discount_reason
|
|
186
186
|
end
|
|
187
187
|
end
|
|
188
188
|
end
|
|
@@ -16,11 +16,11 @@ limitations under the License.
|
|
|
16
16
|
|
|
17
17
|
module Secretariat
|
|
18
18
|
using ObjectExtensions
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
TradeParty = Struct.new('TradeParty',
|
|
21
21
|
:id,
|
|
22
22
|
:name, :street1, :street2, :city, :postal_code, :country_id, :vat_id, :global_id, :global_id_scheme_id, :tax_id,
|
|
23
|
-
:person_name,
|
|
23
|
+
:person_name, :legal_organization,
|
|
24
24
|
keyword_init: true,
|
|
25
25
|
) do
|
|
26
26
|
def to_xml(xml, exclude_tax: false, version: 2)
|
|
@@ -33,6 +33,13 @@ module Secretariat
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
xml['ram'].Name name
|
|
36
|
+
if legal_organization.present?
|
|
37
|
+
xml['ram'].SpecifiedLegalOrganization do
|
|
38
|
+
xml['ram'].ID(schemeID: legal_organization[:scheme_id] || "0002") do
|
|
39
|
+
xml.text(legal_organization[:id])
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
36
43
|
if person_name
|
|
37
44
|
xml['ram'].DefinedTradeContact do
|
|
38
45
|
xml['ram'].PersonName person_name
|
|
@@ -64,4 +71,4 @@ module Secretariat
|
|
|
64
71
|
end
|
|
65
72
|
end
|
|
66
73
|
|
|
67
|
-
# assert_match(%r{<ram:DefinedTradeContact>\s*<ram:PersonName>Max Mustermann</ram:PersonName>\s*</ram:DefinedTradeContact>}, xml)
|
|
74
|
+
# assert_match(%r{<ram:DefinedTradeContact>\s*<ram:PersonName>Max Mustermann</ram:PersonName>\s*</ram:DefinedTradeContact>}, xml)
|
data/lib/secretariat/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: secretariat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Krutisch
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-04-22 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: nokogiri
|