
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
This gem allows to parse and build any Money S3 entity defined in theirs XML schemas. All the names and structure are preserved as in the original definitions which can be found here. This gem also includes few utilities for fast and easy XML generation.
I didn't have time to write docs yet. However parsing works exactly the same as in Pohoda gem
To build a Money S3 XML you need a hash with same structure you get from calling #to_h
on parsed xml:
hash = { seznam_fakt_vyd: [{ doklad: '123' }] }
MoneyS3.build(hash)
it returns a string like this:
<?xml version=\"1.0\"?>
<MoneyData>
<SeznamFaktVyd>
<FaktVyd>
<Doklad>123</Doklad>
</FaktVyd>
</SeznamFaktVyd>
</MoneyData>
Building works also exactly the same as in Pohoda gem
MoneyS3::Utils::BankStatements
classGenerates XML with bank movements for importing into Money S3.
Instantiate MoneyS3::Utils::BankStatements
with hash containing statements config:
config = {
my_bank_account_id: 'BAN', # Czech: zkratka bankovniho uctu
credit_transactions_rule: 'BP001', # Czech: predkontace pro prijmy
debit_transactions_rule: 'BV001', # Czech: predkontace pro vydaje
credit_transactions_vat_rule: '19Ř00U', # Czech: cleneni dph pro prijmy
debit_transactions_vat_rule: '19Ř00P', # Czech: cleneni dph pro vydaje
credit_transactions_series: 'BPrr', # Czech: ciselna rada prijmovych bankovnich dokladu
debit_transactions_series: 'BVrr' # Czech: ciselna rada vydajovych bankovnich dokladu
}
generator = MoneyS3::Utils::BankStatements.new(config)
Then call #to_xml
on the generator and pass it an array containing hashes with movement data:
transactions = [
{ :date => #<Date: 2019-12-05 ((2458823j,0s,0n),+0s,2299161j)>,
:transaction_id => "121205SI201442",
:my_bank_account_id => "ACC1", # if given it overwrites the one from configuration
:amount => 8500.0,
:statement_id => "012/00001",
:variable_symbol => "0000112019",
:specific_symbol => "",
:constant_symbol => "0000000138",
:counterparty_account => "1023706843",
:counterparty_bank_code => "0100",
:type => :debit, # or :credit for credit transactions
:description => "Some description..",
:note => "Some note.." },
...,
...
]
statements_string = generator.to_xml(transactions)
File.open("statements.xml", 'wb') { |f| f.write statements_string }
Add utility class for bank statements generation.
Updated gem with new schemas from Money S3 19.603
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that money_s3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.