Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Ticketbai is a gem that gives you the ability to generate Ticketbai files and upload them to the Regional Treasury (currently only Bizkaia is supported)
Add this line to your application's Gemfile:
gem 'ticketbai'
Then run:
bundle install
And then execute:
$ bundle install
Or install it yourself as:
$ gem install ticketbai
Encode your certificate to be able to add the resulting string to the secrets file:
certificate = File.read('path/my-certificate.pfx')
encoded_certificate = Base64.strict_encode64(certificate)
Add the encoded_certificate string, the key and the rest of your ticketbai license params to the secrets file:
ticketbai:
license_key: xxxxxxxxxx
app_name: xxxxxxxxxx
app_version: xxxxxxxxxx
developer_company_nif: xxxxxxxxxx
certificates:
my_certificate_name:
cert: encoded_certificate string
key: xxxxxxxxxx
The supported TicketBAI operations are: issuance, annulment and issuance unsigned.
Ticketbai::Operations::Issuance.new(
company_cert: 'my_certificate_name',
issuing_company_nif: 'B34576372',
issuing_company_name: 'FooBar SL',
invoice_serial: '2022',
invoice_number: '10001',
invoice_date: '11-01-2022',
invoice_time: '13:05:22',
invoice_description: 'La descripción de la factura',
invoice_total: 12.21,
invoice_vat_key: '01',
invoice_amount: 11.0,
invoice_vat: 21.0,
invoice_vat_total: 2.31,
simplified_invoice: true
).create
If everything is ok, the response of Ticketbai::Operations::Issuance.new(params).create
is a Hash with two keys:
Ticketbai::Operations::Annulment.new(
issuing_company_nif: 'B12345678',
issuing_company_name: 'Test SL',
invoice_serial: '2022',
invoice_number: '000002',
invoice_date: '10-11-2022',
company_cert: 'my_certificate_name'
).create
Sending the TicketBAI files to the LROE is done by executing the following request to the API:
Ticketbai::Api::Request.new(
issued_invoices: xml_doc,
nif: 'B34576372',
company_name: 'FooBar SL',
certificate_name: 'my_certificate_name',
year: '2022',
operation: :issuance
).execute
Bug reports and pull requests are welcome on GitHub at https://github.com/ecommerce-ventures/ticketbai.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ticketbai 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.