xrechnung 0.6.3 → 0.6.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06252face0554e39218ad09f6de658da8ceefab529414974c3cbea5066c03f94
4
- data.tar.gz: 37fdbaf09d8b6506f9c49bbb9951aba92fb0d640a11a235b2c4838ca9c6f7ec8
3
+ metadata.gz: dcb000b6c51385ec97931308733407e6400186d86a632db4a30d79adab353bda
4
+ data.tar.gz: e94c31a304cda4d231b3adb69b6cd331cb50616f2655c68e369f7ebc3824dea4
5
5
  SHA512:
6
- metadata.gz: c039758300cab1eb0bfabd785a3c4efc9eba14f0c94f6f72741c0fbb922e3bc0eeab612b3a9842f66244666f230d918a226fc41741eba86005347bff8c4b1c73
7
- data.tar.gz: '038c45111d8b65bc6290b78048a30aae81ff04283784efd335c73a34eede869dd9aa5adb33a9a736763065bed4345054cb614e1e23b662510d34edeb9ee3ac24'
6
+ metadata.gz: d948ae1c1ea11cec41beb17eccd81b59183995b6015a78303dd8a4adf004ef4c713c040b918002bfd3fdafaa6bdd5d309b102b1e1ffbe1138cc1a8442ce25580
7
+ data.tar.gz: a44907195bf5a95cf8154fc743e225046c1f9b5c2ab29671c03175f69ea6b4cb37928a67602e3c68d8d9913bef5374f77f0a8e942e40547546a9bf458986bcb0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xrechnung (0.6.3)
4
+ xrechnung (0.6.5)
5
5
  activesupport
6
6
  base64
7
7
  bigdecimal
@@ -0,0 +1,18 @@
1
+ module Xrechnung
2
+ class ElectronicAddress
3
+ include MemberContainer
4
+
5
+ # @!attribute content
6
+ # @return [String]
7
+ member :content, type: String
8
+
9
+ # @!attribute scheme_id
10
+ # @return [String]
11
+ member :scheme_id, type: String
12
+
13
+ # noinspection RubyResolve
14
+ def to_xml(xml)
15
+ xml.cbc :EndpointID, content, schemeID: scheme_id
16
+ end
17
+ end
18
+ end
@@ -22,6 +22,10 @@ module Xrechnung
22
22
  # @return [Xrechnung::PartyLegalEntity]
23
23
  member :party_legal_entity, type: Xrechnung::PartyLegalEntity
24
24
 
25
+ # @!attribute electronic_address
26
+ # @return [Xrechnung::ElectronicAddress]
27
+ member :electronic_address, type: Xrechnung::ElectronicAddress
28
+
25
29
  # @!attribute contact
26
30
  # @return [Xrechnung::Contact]
27
31
  member :contact, type: Xrechnung::Contact
@@ -47,7 +51,11 @@ module Xrechnung
47
51
  private
48
52
 
49
53
  def party_body(xml)
50
- xml.cbc :EndpointID, contact&.electronic_mail, schemeID: "EM" if contact&.electronic_mail
54
+ if electronic_address
55
+ electronic_address.to_xml(xml)
56
+ elsif contact&.electronic_mail
57
+ xml.cbc :EndpointID, contact.electronic_mail, schemeID: "EM"
58
+ end
51
59
 
52
60
  party_identification&.to_xml(xml)
53
61
  unless name.nil? # if blank? -> empty name tag
@@ -20,7 +20,8 @@ module Xrechnung
20
20
  #
21
21
  # Note: S, Z, E, AE, K, G, L and M require either a seller VAT identifier (BT-31),
22
22
  # a seller tax registration identifier (BT-32), or a seller tax representative
23
- # party (BG-11). Xrechnung::Document currently only supports the VAT identifier.
23
+ # party (BG-11). Xrechnung::Document currently does not support adding the seller
24
+ # tax representative party.
24
25
  #
25
26
  # @!attribute id
26
27
  # @return [String]
@@ -1,3 +1,3 @@
1
1
  module Xrechnung
2
- VERSION = "0.6.3".freeze
2
+ VERSION = "0.6.5".freeze
3
3
  end
data/lib/xrechnung.rb CHANGED
@@ -10,6 +10,7 @@ require "xrechnung/id"
10
10
  require "xrechnung/member_container"
11
11
  require "xrechnung/additional_document_reference"
12
12
  require "xrechnung/contact"
13
+ require "xrechnung/electronic_address"
13
14
  require "xrechnung/party_identification"
14
15
  require "xrechnung/party_legal_entity"
15
16
  require "xrechnung/party_tax_scheme"
@@ -373,8 +374,10 @@ module Xrechnung
373
374
 
374
375
  payee_party&.to_xml(xml) unless self.class.members[:payee_party].optional && payee_party.nil?
375
376
 
376
- xml.cac :PaymentTerms do
377
- xml.cbc :Note, payment_terms_note
377
+ unless payment_terms_note.blank?
378
+ xml.cac :PaymentTerms do
379
+ xml.cbc :Note, payment_terms_note
380
+ end
378
381
  end
379
382
 
380
383
  allowance_charges.each { _1.to_xml(xml) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xrechnung
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Kornberger
@@ -91,6 +91,7 @@ files:
91
91
  - lib/xrechnung/attachment.rb
92
92
  - lib/xrechnung/contact.rb
93
93
  - lib/xrechnung/currency.rb
94
+ - lib/xrechnung/electronic_address.rb
94
95
  - lib/xrechnung/id.rb
95
96
  - lib/xrechnung/invoice_document_reference.rb
96
97
  - lib/xrechnung/invoice_line.rb
@@ -135,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
136
  - !ruby/object:Gem::Version
136
137
  version: '0'
137
138
  requirements: []
138
- rubygems_version: 4.0.5
139
+ rubygems_version: 4.0.13
139
140
  specification_version: 4
140
141
  summary: Library to create invoices in the XRechnung format.
141
142
  test_files: []