{"id":21816983,"url":"https://github.com/maartenvanvliet/fs_api","last_synced_at":"2026-03-16T11:36:36.892Z","repository":{"id":56847800,"uuid":"46872942","full_name":"maartenvanvliet/fs_api","owner":"maartenvanvliet","description":"Api library to interface with factuursturen.nl","archived":false,"fork":false,"pushed_at":"2017-12-23T10:06:19.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T12:54:50.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maartenvanvliet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-25T16:18:48.000Z","updated_at":"2017-12-21T20:28:39.000Z","dependencies_parsed_at":"2022-09-09T09:20:57.217Z","dependency_job_id":null,"html_url":"https://github.com/maartenvanvliet/fs_api","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maartenvanvliet%2Ffs_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maartenvanvliet%2Ffs_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maartenvanvliet%2Ffs_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maartenvanvliet%2Ffs_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maartenvanvliet","download_url":"https://codeload.github.com/maartenvanvliet/fs_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248805204,"owners_count":21164246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T15:38:33.610Z","updated_at":"2026-03-16T11:36:36.853Z","avatar_url":"https://github.com/maartenvanvliet.png","language":"Ruby","readme":"[![Gem Version](https://badge.fury.io/rb/fs_api.svg)](https://badge.fury.io/rb/fs_api) [![Build Status](https://travis-ci.org/maartenvanvliet/fs_api.svg)](https://travis-ci.org/maartenvanvliet/fs_api)[![Code Climate](https://codeclimate.com/github/maartenvanvliet/fs_api/badges/gpa.svg)](https://codeclimate.com/github/maartenvanvliet/fs_api)\n\n# FsApi\n\nGem to interface with the [factuursturen.nl](https://www.factuursturen.nl/?a=1552)\ninvoicing API\n\nStill some issues, upon api calls the server sends back json with stringified\nfloats/integers/booleans (\"true\", \"1\" etc.), for the booleans a conversion is\nin place, for the others there isn't yet.\n\nUse the docs at https://www.factuursturen.nl/docs/api_v1.pdf for more information\non the api. Note that there are inconsistencies between the docs and what the api actually does. E.g. required fields that are not required.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'fs_api'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install fs_api\n\n## Usage\n\n### Initialization\n\n```ruby\napi_client = FsApi::Client.new(username, api_key)\n```\n\nor\n\n```ruby\nFsApi.configure do |config|\n  config.api_key = '...'\n  config.username = '...'\nend\n\napi_client = FsApi.new\n```\n\n### After initialization\n\n```ruby\n# Retrieve all products\napi_client.products.all\n\n# Retrieve all clients\napi_client.clients.all\n\n# Retrieve all invoices\napi_client.invoices.all\n\n# Find an invoice\napi_client.invoices.find(invoice_number)\n\n# Create an invoice\ninvoice = api_client.invoices.build({clientnr: '1'})\napi_client.invoices.save(invoice)\n\n# or shorthand\ninvoice = api_client.invoices.create({clientnr: '1'})\n\n# Returns false when it fails\napi_client.invoices.save(invoice)\n\n# Has the errors of the last api operation\ninvoice.errors\n\n# Delete an invoice\napi_client.invoices.delete(invoice)\n\n# Search in all fields of invoices\napi_client.invoices.search('john')\n\n# Search in city field of invoices\napi_client.invoices.search(city: 'john')\n```\n\n## Todo\n* Handle rate limiting\n* Refactor base service so services can choose to implement parts\n* ~~Implement saved invoices resource~~\n* ~~Implement search~~\n* ~~Implement invoice payment registration~~\n\n## Contributing\n\n1. Fork it ( https://github.com/maartenvanvliet/fs_api/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaartenvanvliet%2Ffs_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaartenvanvliet%2Ffs_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaartenvanvliet%2Ffs_api/lists"}