girocode 1.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae1af8187bb62eb64c3b96a6d9001899e7f156bba781844f1d3f462bf954a248
4
- data.tar.gz: bd8ca3c9fd7156c50d801368f91986c8ea63bbb7e6934d6b356bb0a91a8df7db
3
+ metadata.gz: adc698ff8d7690d8cf1bf530b92d4b6050233b1770e6286c5dc22248cb222c62
4
+ data.tar.gz: d3535a8fac2374ec841e5a2ea7293cddd5080573accbfdafdce3bfcd7bf1efaa
5
5
  SHA512:
6
- metadata.gz: 2271e8db17f381aa6debff46557c81b08c3bf23bc74043a27fd61957f91f22d13fd6e6ba8791534d5a6f1df8e4eac85557befd4ec1ca4bc41ba9c3f799d1b6af
7
- data.tar.gz: 8ac181062def7582a6fd8bc5604983a8ec8f95144cc276398f9f4df3d4ca2334b0c1a0101ff28d75d0de1655d661181cc0e908c44e8064bca27dc410a3524515
6
+ metadata.gz: d74805d61d5034093b2984213c5f9ce5f6cc22f2d168bda27e2a86d0c011863497b6276d419177b8e81e67ba79e7cc1ffd0b6a07376d2ce4184e1d69b2e9a401
7
+ data.tar.gz: 82d1ab5288c21ddc20a0db118feac4d243483e6067abaf4e73f3950e57c742e4cd4960c7ca4b35928c4f2354c1b8ed045fa8d4d88a5b3d8d19a27e397fca5580
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.1.0
2
+
3
+ - Fix `reference` / `creditor_reference` confusion (@arfl)
4
+ - Fix adherence to spec, strip rightmost LF if last element empty
5
+
1
6
  ## 1.0.0
2
7
 
3
8
  - Drop bank-contact, use iban-tools (@Joerg-Seitz)
data/README.md CHANGED
@@ -33,17 +33,27 @@ puts code.to_ansi
33
33
 
34
34
  Codes can be generated with the following attributes:
35
35
 
36
- | Attribute | Description | required | exclusive | max size |
37
- |----------------------|--------------------------------|--------------------|-----------|----------|
38
- | `bic` | Bank Identifier Code | | | 11 |
39
- | `name` | Name of beneficiary | ✓ | | 70 |
40
- | `iban` | IBAN | ✓ | | 34 |
41
- | `currency` | ISO-4217 currency code | if `amount` given | | 3 |
42
- | `amount` | Money amount | | | 12 |
43
- | `purpose` | SEPA purpose code | | | 4 |
44
- | `creditor_reference` | ISO-11649 creditor reference | | ✓ | 35 |
45
- | `reference` | Unstructured reference | | ✓ | 140 |
46
- | `bto_info` | Beneficiary to originator info | | | 70 |
36
+ | Attribute | Description | required | exclusive | max size |
37
+ |----------------------|---------------------------------------|--------------------|-----------|----------|
38
+ | `bic` | Bank Identifier Code | | | 11 |
39
+ | `name` | Name of beneficiary | ✓ | | 70 |
40
+ | `iban` | IBAN | ✓ | | 34 |
41
+ | `currency` | ISO-4217 currency code | if `amount` given | | 3 |
42
+ | `amount` | Money amount | | | 12 |
43
+ | `purpose` | SEPA purpose code | | | 4 |
44
+ | `creditor_reference` | ISO-11649 creditor reference | | ✓ | 35 |
45
+ | `reference` | Unstructured reference ("remittance") | | ✓ | 140 |
46
+ | `bto_info` | Beneficiary to originator info | | | 70 |
47
+
48
+ ## QR code generation options
49
+
50
+ All `to_<format>` methods forward options to `RQRCode`. You can therefore supply all supported options to the respective generator, e.g.
51
+
52
+ ```ruby
53
+ code.to_svg(fill: :white, color: :blue, module_size: 20)
54
+ ```
55
+
56
+ Check the [RQRCode docs](https://github.com/whomwah/rqrcode) for all available options.
47
57
 
48
58
  ## Limitations
49
59
 
@@ -51,6 +61,6 @@ Codes are generated as EPC-QR Version 2 in UTF-8 format only.
51
61
 
52
62
  ## Specification
53
63
 
54
- European Payments Council: Quick Response Code
64
+ European Payments Council: Quick Response Code, v3.1
55
65
 
56
- [Guidelines to enable data capture for the initiation of a SEPA credit transfer](https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2018-05/EPC069-12%20v2.1%20Quick%20Response%20Code%20-%20Guidelines%20to%20Enable%20the%20Data%20Capture%20for%20the%20Initiation%20of%20a%20SCT.pdf)
66
+ [Guidelines to enable data capture for the initiation of a SEPA credit transfer](https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2024-03/EPC069-12%20v3.1%20Quick%20Response%20Code%20-%20Guidelines%20to%20Enable%20the%20Data%20Capture%20for%20the%20Initiation%20of%20an%20SCT.pdf)
data/lib/girocode/code.rb CHANGED
@@ -94,8 +94,8 @@ module Girocode
94
94
 
95
95
  def payload
96
96
  ['BCD', '002', '1', 'SCT',
97
- bic, name, iban,formatted_amount, purpose,
98
- creditor_reference || reference, bto_info].map(&:to_s).join("\n")
97
+ bic, name, iban, formatted_amount, purpose,
98
+ creditor_reference, reference, bto_info].map(&:to_s).join("\n").rstrip
99
99
  end
100
100
 
101
101
  def to_qrcode
@@ -1,3 +1,3 @@
1
1
  module Girocode
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: girocode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Grosser