0.0
No release in over 3 years
Ruby client for the SendRegning Web Service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0

Runtime

~> 3.1
~> 0.13
 Project Readme

Version Build

Sendregning

Ruby client for the SendRegning Web Service.

Getting started

Install with RubyGems:

gem install sendregning

Now start sending invoices:

# Create a new client
client = Sendregning::Client.new('my@email.com', 'myawesomepassword')

# Start a new email invoice
invoice = client.new_invoice(
  name:           'My Client',
  zip:            '0123',
  city:           'Oslo',
  shipment:       :email,
  emailaddresses: 'my@email.com'
)

# Add an item
invoice.add_line qty: 1, desc: 'Bananaphone', unitPrice: '500,00'

# Send it away!
invoice.send!

# Get the invoice number for future reference
id = invoice.invoiceNo

Let's check how we're doing!

invoice = client.find_invoice(id)
invoice.paid? # => true

Pass test: true to the constructor to use the test API

# Create a new client
client = Sendregning::Client.new('my@email.com', 'myawesomepassword', test: true)

Contributing

Bug reports and pull requests are welcome on GitHub. See CONTRIBUTING.md for how to get set up and how commits are formatted, and note that this project ships with a code of conduct.

License

Released under the MIT License.