https://github.com/internetee/directo
Estonian Internet Foundation-specific Ruby interface to the Directo (http://directo.ee)
https://github.com/internetee/directo
api directo ruby
Last synced: about 1 month ago
JSON representation
Estonian Internet Foundation-specific Ruby interface to the Directo (http://directo.ee)
- Host: GitHub
- URL: https://github.com/internetee/directo
- Owner: internetee
- License: mit
- Created: 2017-10-29T10:39:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-09-21T11:27:23.000Z (7 months ago)
- Last Synced: 2025-09-21T13:17:47.695Z (7 months ago)
- Topics: api, directo, ruby
- Language: Ruby
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Directo
[](https://travis-ci.org/internetee/directo)
[](https://qlty.sh/gh/internetee/projects/directo)
[](https://qlty.sh/gh/internetee/projects/directo)
# Usage
Start by initializing Directo client by
```
@client = DirectoApi::Client.new(api_url, sales_agent, payment_terms)
```
Invoice example
```
inv = @client.invoices.new
cust = DirectoApi::Customer.new
cust.code = 'CUST1'
...
line = inv.lines.new
line.code = 123
...
inv.lines.add(line)
@client.invoices.add(inv)
```
Sending to Directo
```
@client.invoices.deliver
```
## Invoice attributes
:customer # CustomerCode
:number # Number
:date # InvoiceDate
:currency # Currency
:language # Language
:vat_amount # TotalVAT
:payment_terms # Prefilled with client payment terms
:sales_agent # Prefilled with client Sales Agent value
## Line attributes
:seq_no # RN
:code # ProductID
:description # ProductName
# Date.parse('2010-07-05')..Date.parse('2010-07-06')
attr_accessor :period # StartDate / EndDate
:vat_number # VATCode
:quantity # Quantity
:unit # Unit
:price # UnitPriceWoVAT