RubyGems Navigation menu

tripletex_ruby_client 1.0.3

## Usage - **Download the spec** [swagger.json](/v2/swagger.json) file, it is a [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification). - **Generating a client** can easily be done using tools like [swagger-codegen](https://github.com/swagger-api/swagger-codegen) or other that accepts [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) specs. - For swagger codegen it is recommended to use the flag: **--removeOperationIdPrefix**. Unique operation ids are about to be introduced to the spec, and this ensures forward compatibility - and results in less verbose generated code. ## Overview - Partial resource updating is done using the `PUT` method with optional fields instead of the `PATCH` method. - **Actions** or **commands** are represented in our RESTful path with a prefixed `:`. Example: `/v2/hours/123/:approve`. - **Summaries** or **aggregated** results are represented in our RESTful path with a prefixed `>`. Example: `/v2/hours/>thisWeeksBillables`. - **Request ID** is a key found in all responses in the header with the name `x-tlx-request-id`. For validation and error responses it is also in the response body. If additional log information is absolutely necessary, our support division can locate the key value. - **version** This is a revision number found on all persisted resources. If included, it will prevent your PUT/POST from overriding any updates to the resource since your GET. - **Date** follows the **[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)** standard, meaning the format `YYYY-MM-DD`. - **DateTime** follows the **[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)** standard, meaning the format `YYYY-MM-DDThh:mm:ss`. - **Searching** is done by entering values in the optional fields for each API call. The values fall into the following categories: range, in, exact and like. - **Missing fields** or even **no response data** can occur because result objects and fields are filtered on authorization. - **See [GitHub](https://github.com/Tripletex/tripletex-api2) for more documentation, examples, changelog and more.** - **See [FAQ](https://tripletex.no/execute/docViewer?articleId=906&language=0) for additional information.** ## Authentication - **Tokens:** The Tripletex API uses 3 different tokens - **consumerToken** is a token provided to the consumer by Tripletex after the API 2.0 registration is completed. - **employeeToken** is a token created by an administrator in your Tripletex account via the user settings and the tab "API access". Each employee token must be given a set of entitlements. [Read more here.](https://tripletex.no/execute/docViewer?articleId=1505&languageId=0) - **sessionToken** is the token from `/token/session/:create` which requires a consumerToken and an employeeToken created with the same consumer token, but not an authentication header. - **Authentication** is done via [Basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) - **username** is used to specify what company to access. - `0` or blank means the company of the employee. - Any other value means accountant clients. Use `/company/>withLoginAccess` to get a list of those. - **password** is the **sessionToken**. - If you need to create the header yourself use `Authorization: Basic ` where `encoded token` is the string `:` Base64 encoded. ## Tags - `[BETA]` This is a beta endpoint and can be subject to change. - `[DEPRECATED]` Deprecated means that we intend to remove/change this feature or capability in a future "major" API release. We therefore discourage all use of this feature/capability. ## Fields Use the `fields` parameter to specify which fields should be returned. This also supports fields from sub elements, done via `()`. `*` means all fields for that resource. Example values: - `project,activity,hours` returns `{project:..., activity:...., hours:...}`. - just `project` returns `"project" : { "id": 12345, "url": "tripletex.no/v2/projects/12345" }`. - `project(*)` returns `"project" : { "id": 12345 "name":"ProjectName" "number.....startDate": "2013-01-07" }`. - `project(name)` returns `"project" : { "name":"ProjectName" }`. - All resources and some subResources : `*,activity(name),employee(*)`. ## Sorting Use the `sorting` parameter to specify sorting. It takes a comma separated list, where a `-` prefix denotes descending. You can sort by sub object with the following format: `.`. Example values: - `date` - `project.name` - `project.name, -date` ## Changes To get the changes for a resource, `changes` have to be explicitly specified as part of the `fields` parameter, e.g. `*,changes`. There are currently two types of change available: - `CREATE` for when the resource was created - `UPDATE` for when the resource was updated **NOTE** > For objects created prior to October 24th 2018 the list may be incomplete, but will always contain the CREATE and the last change (if the object has been changed after creation). ## Rate limiting Rate limiting is performed on the API calls for an employee for each API consumer. Status regarding the rate limit is returned as headers: - `X-Rate-Limit-Limit` - The number of allowed requests in the current period. - `X-Rate-Limit-Remaining` - The number of remaining requests. - `X-Rate-Limit-Reset` - The number of seconds left in the current period. Once the rate limit is hit, all requests will return HTTP status code `429` for the remainder of the current period. ## Response envelope #### Multiple values ```json { "fullResultSize": ###, // {number} [DEPRECATED] "from": ###, // {number} Paging starting from "count": ###, // {number} Paging count "versionDigest": "###", // {string} Hash of full result, null if no result "values": [...{...object...},{...object...},{...object...}...] } ``` #### Single value ```json { "value": {...single object...} } ``` ## WebHook envelope ```json { "subscriptionId": ###, // Subscription id "event": "object.verb", // As listed from /v2/event/ "id": ###, // Id of object this event is for "value": {... single object, null if object.deleted ...} } ``` ## Error/warning envelope ```json { "status": ###, // {number} HTTP status code "code": #####, // {number} internal status code of event "message": "###", // {string} Basic feedback message in your language "link": "###", // {string} Link to doc "developerMessage": "###", // {string} More technical message "validationMessages": [ // {array} List of validation messages, can be null { "field": "###", // {string} Name of field "message": "###" // {string} Validation message for field } ], "requestId": "###" // {string} Same as x-tlx-request-id } ``` ## Status codes / Error codes - **200 OK** - **201 Created** - From POSTs that create something new. - **204 No Content** - When there is no answer, ex: "/:anAction" or DELETE. - **400 Bad request** - - **4000** Bad Request Exception - **11000** Illegal Filter Exception - **12000** Path Param Exception - **24000** Cryptography Exception - **401 Unauthorized** - When authentication is required and has failed or has not yet been provided - **3000** Authentication Exception - **403 Forbidden** - When AuthorisationManager says no. - **9000** Security Exception - **404 Not Found** - For resources that does not exist. - **6000** Not Found Exception - **409 Conflict** - Such as an edit conflict between multiple simultaneous updates - **7000** Object Exists Exception - **8000** Revision Exception - **10000** Locked Exception - **14000** Duplicate entry - **422 Bad Request** - For Required fields or things like malformed payload. - **15000** Value Validation Exception - **16000** Mapping Exception - **17000** Sorting Exception - **18000** Validation Exception - **21000** Param Exception - **22000** Invalid JSON Exception - **23000** Result Set Too Large Exception - **429 Too Many Requests** - Request rate limit hit - **500 Internal Error** - Unexpected condition was encountered and no more specific message is suitable - **1000** Exception

Gemfile:
=

安装:
=

版本列表:

  1. 1.0.12 October 04, 2024 (597.0 KB)
  2. 1.0.11 August 01, 2023 (1.5 MB)
  3. 1.0.9 July 27, 2023 (811.0 KB)
  4. 1.0.8 March 03, 2023 (810.5 KB)
  5. 1.0.4 January 04, 2022 (809.0 KB)
  6. 1.0.3 December 22, 2021 (1.5 MB)
显示所有版本 (共 10 个)

Runtime 依赖 (3):

addressable ~> 2.3, >= 2.3.0
json ~> 2.1, >= 2.1.0
typhoeus ~> 1.0, >= 1.0.1

Development 依赖 (7):

autotest ~> 4.4, >= 4.4.6
autotest-fsevent ~> 0.2, >= 0.2.12
autotest-growl ~> 0.2, >= 0.2.16
autotest-rails-pure ~> 4.1, >= 4.1.2
rspec ~> 3.6, >= 3.6.0
vcr ~> 3.0, >= 3.0.1
webmock ~> 1.24, >= 1.24.3

业主:

推送:

作者:

  • Swagger-Codegen

SHA 256 校验和:

=

下载总量 6,449

这个版本 1,148

版本发布:

许可:

Unlicense

需要的 Ruby 版本: >= 1.9

链接: