Skip to content

Estonian Internet Foundation-specific Ruby interface to the Directo (http://directo.ee)

License

Notifications You must be signed in to change notification settings

internetee/directo

Repository files navigation

Directo

Build Status Maintainability Test Coverage

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

About

Estonian Internet Foundation-specific Ruby interface to the Directo (http://directo.ee)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published