README.md in codat-0.1.1 vs README.md in codat-0.1.2
- old
+ new
@@ -1,7 +1,14 @@
# Codat
+A simple wrapper for the [Codat](https://www.codat.io/) API. Please refer to Codat's documentation
+to complement any information you need:
+
+* [Codat API reference](https://docs.codat.io/)
+* [Codat API explorer](https://api-uat.codat.io/swagger/ui/index) (to use this you need to have
+ access to the UAT portal).
+
## Installation
Add this line to your application's Gemfile:
```ruby
@@ -21,75 +28,80 @@
### Bank bankAccounts
To get a list of bank accounts:
```ruby
-list = BankAccount.all(company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac')
+BankAccount.all(company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac')
# => []
```
-### Financial financials
+### Financial reports
-To get a financial reports - profit & loss:
+To get a financial report - profit & loss:
```ruby
-list = Financial.profit_and_loss(
- company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac',
- period_length: '2',
- periods_to_compare: '2'
+ProfitAndLoss.find(
+ company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac',
+ period_length: 12,
+ periods_to_compare: 2
)
# => []
```
-To get a financial reports - balance sheet:
+To get a financial report - balance sheet:
```ruby
-list = BankAccount.balance_sheet(
- company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac',
- period_length: period_length,
- periods_to_compare: periods_to_compare
+BalanceSheet.find(
+ company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac',
+ period_length: 12,
+ periods_to_compare: 2
)
```
-### Company companies
+### Companies
To get a list of companies (paginated):
```ruby
-list = Company.all(page: '1')
+Company.all(page: 1)
# => []
```
To create a company:
```ruby
-response = Company.create(name: 'company name')
+Company.create(name: 'company name')
# => {}
```
-### Report reports
+### Report
To get a list of reports for aged debtor:
```ruby
list = Report.all(company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac')
# => []
```
-### BankStatement bankStatements
+### BankStatement
To get a list of bank statements:
```ruby
list = BankStatement.all(company_id: 'a49b891d-a593-43aa-bb82-0d8b108eb3ac')
# => []
```
## Development
-After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
+After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
+the tests. You can also run `bin/console` for an interactive prompt that will allow you to
+experiment.
-To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+To install this gem onto your local machine, run `bundle exec rake install`. To release a new
+version, update the version number in `version.rb`, and then run `bundle exec rake release`, which
+will create a git tag for the version, push git commits and tags, and push the `.gem` file to
+[rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/finpoint/codat.