tripletex_ruby_client 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9a7a3f094603d87532918aa23f1b605f4cd679ddab97da6b92256e6358770e6
4
- data.tar.gz: f10bde3d91816dda8faf0cfd1f52c858f71e27c06c099582060bda8944cea7ce
3
+ metadata.gz: a9445abae75f90c7ef39e1bf730db40fa55570bd8c9abacb300273ff0d7acb77
4
+ data.tar.gz: 2ef8251586c54308a491079a4fa9ff11ebdd59d9db4b7170d5aae2e71d941eec
5
5
  SHA512:
6
- metadata.gz: b8dcddb6fc5fbc35d492ee2fac9b0bc440e10d9863c891683186e8bc5c5a6c1612822167648dc00f358936082e015045fc5691ba1e6947d14bc4df2364aa10fa
7
- data.tar.gz: 63842cda91fbb9718cb7507e941770cca4d2ec099f845260412c03e1c4a8f64d3292b2fa801862132f855d99437465f15b84f1708401fa9f382b8dea0511bf70
6
+ metadata.gz: 78017d209dbdc274b553b3996bd55426a113e076ed93c6382ff529ca5d7795c443a953bb7fcdfa81749a8c32fa2714879ac5271cdcc6f8ed59f818d61bb26241
7
+ data.tar.gz: ec465b46e4b7f924589fefa09dd1cd9b8b535a50fac671d6cd64e73552df11aaf8773d293c1bd1a5ec18cde04c7be3f1060aee591e486377fe64334e44929849
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tripletex_ruby_client (1.0.1)
4
+ tripletex_ruby_client (1.0.3)
5
5
  addressable (~> 2.3, >= 2.3.0)
6
6
  json (~> 2.1, >= 2.1.0)
7
7
  typhoeus (~> 1.0, >= 1.0.1)
data/README.md CHANGED
@@ -2,51 +2,18 @@
2
2
 
3
3
  TripletexRubyClient - the Ruby gem for the Tripletex API, at the courtesy of Rubynor AS.
4
4
 
5
- This was built using swagger-codegen first, from [https://tripletex.no/v2-docs/](https://tripletex.no/v2-docs/)
6
- and it needed change in config and auth to work for us.
5
+ Used in production.
7
6
 
8
- We can't see how the other tripletex ruby client gems work, but this is working for us.
7
+ This was built using swagger-codegen first, from [https://tripletex.no/v2-docs/](https://tripletex.no/v2-docs/), but it didn't work out of the box.
9
8
 
10
- ## Installation
11
-
12
- ### Build a gem
13
-
14
- To build the Ruby code into a gem:
15
-
16
- ```shell
17
- gem build tripletex_ruby_client.gemspec
18
- ```
19
-
20
- Then either install the gem locally:
21
-
22
- ```shell
23
- gem install ./tripletex_ruby_client-1.0.0.gem
24
- ```
25
- (for development, run `gem install --dev ./tripletex_ruby_client-1.0.0.gem` to install the development dependencies)
26
-
27
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
28
-
29
- Finally add this to the Gemfile:
30
-
31
- gem 'tripletex_ruby_client', '~> 1.0.0'
32
-
33
- ### Install from Git
34
-
35
- If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
36
-
37
- gem 'tripletex_ruby_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
38
-
39
- ### Include the Ruby code directly
9
+ ## Getting Started
40
10
 
41
- Include the Ruby code directly using `-I` as follows:
11
+ Gemfile
42
12
 
43
- ```shell
44
- ruby -Ilib script.rb
45
- ```
13
+ gem 'tripletex_ruby_client'
46
14
 
47
- ## Getting Started
15
+ Usage
48
16
 
49
- Please follow the [installation](#installation) procedure and then run the following code:
50
17
  ```ruby
51
18
  # Load the gem
52
19
  require 'tripletex_ruby_client'
@@ -81,6 +48,9 @@ begin
81
48
  p result
82
49
  rescue TripletexRubyClient::ApiError => e
83
50
  puts "Exception when calling ActivityApi->get: #{e}"
51
+
52
+ validation_errors = JSON.parse(error.response_body)["validationMessages"]
53
+ # do your stuff
84
54
  end
85
55
 
86
56
  ```
@@ -94,6 +64,24 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
94
64
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
95
65
  For more information, please visit [https://github.com/Tripletex/tripletex-api2](https://github.com/Tripletex/tripletex-api2)
96
66
 
67
+ ## Build a gem
68
+
69
+ To build the Ruby code into a gem:
70
+
71
+ ```shell
72
+ gem build tripletex_ruby_client.gemspec
73
+ ```
74
+
75
+ Then either install the gem locally:
76
+
77
+ ```shell
78
+ gem install ./tripletex_ruby_client-1.0.0.gem
79
+ ```
80
+ (for development, run `gem install --dev ./tripletex_ruby_client-1.0.0.gem` to install the development dependencies)
81
+
82
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
83
+
84
+
97
85
  ## Documentation for API Endpoints
98
86
 
99
87
  All URIs are relative to *https://tripletex.no/v2*
@@ -1,15 +1,3 @@
1
- =begin
2
- #Tripletex API
3
-
4
- ### 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 <encoded token>` where `encoded token` is the string `<target company id or 0>:<your session token>` 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 `<field>(<subResourceFields>)`. `*` 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: `<field>.<subObjectField>`. 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
5
-
6
- OpenAPI spec version: 2.69.5
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.24
10
-
11
- =end
12
-
13
1
  module TripletexRubyClient
14
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
15
3
  end
@@ -19,11 +19,11 @@ Gem::Specification.new do |s|
19
19
  s.name = "tripletex_ruby_client"
20
20
  s.version = TripletexRubyClient::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
- s.authors = ["Swagger-Codegen"]
22
+ s.authors = ["oma"]
23
23
  s.email = [""]
24
- s.homepage = "https://github.com/swagger-api/swagger-codegen"
25
- s.summary = "Tripletex API Ruby Gem"
26
- s.description = "## 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 <encoded token>` where `encoded token` is the string `<target company id or 0>:<your session token>` 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 `<field>(<subResourceFields>)`. `*` 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: `<field>.<subObjectField>`. 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 "
24
+ s.homepage = "https://github.com/rubynor/tripletex_ruby_client"
25
+ s.summary = "Tripletex API Ruby Client Gem"
26
+ s.description = "Rubynor AS, rubynor.com, generated this gem using swagger codegen and changed it so it actually worked"
27
27
  s.license = "Unlicense"
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tripletex_ruby_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
- - Swagger-Codegen
7
+ - oma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-22 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -210,100 +210,8 @@ dependencies:
210
210
  - - ">="
211
211
  - !ruby/object:Gem::Version
212
212
  version: 0.2.12
213
- description: '## Usage - **Download the spec** [swagger.json](/v2/swagger.json) file,
214
- it is a [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification). -
215
- **Generating a client** can easily be done using tools like [swagger-codegen](https://github.com/swagger-api/swagger-codegen)
216
- or other that accepts [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification)
217
- specs. - For swagger codegen it is recommended to use the flag: **--removeOperationIdPrefix**. Unique
218
- operation ids are about to be introduced to the spec, and this ensures forward compatibility
219
- - and results in less verbose generated code. ## Overview - Partial resource
220
- updating is done using the `PUT` method with optional fields instead of the `PATCH`
221
- method. - **Actions** or **commands** are represented in our RESTful path with
222
- a prefixed `:`. Example: `/v2/hours/123/:approve`. - **Summaries** or **aggregated**
223
- results are represented in our RESTful path with a prefixed `>`. Example: `/v2/hours/>thisWeeksBillables`. -
224
- **Request ID** is a key found in all responses in the header with the name `x-tlx-request-id`.
225
- For validation and error responses it is also in the response body. If additional
226
- log information is absolutely necessary, our support division can locate the key
227
- value. - **version** This is a revision number found on all persisted resources.
228
- If included, it will prevent your PUT/POST from overriding any updates to the resource
229
- since your GET. - **Date** follows the **[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)**
230
- standard, meaning the format `YYYY-MM-DD`. - **DateTime** follows the **[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)**
231
- standard, meaning the format `YYYY-MM-DDThh:mm:ss`. - **Searching** is done by
232
- entering values in the optional fields for each API call. The values fall into the
233
- following categories: range, in, exact and like. - **Missing fields** or even **no
234
- response data** can occur because result objects and fields are filtered on authorization. -
235
- **See [GitHub](https://github.com/Tripletex/tripletex-api2) for more documentation,
236
- examples, changelog and more.** - **See [FAQ](https://tripletex.no/execute/docViewer?articleId=906&language=0)
237
- for additional information.** ## Authentication - **Tokens:** The Tripletex API
238
- uses 3 different tokens - **consumerToken** is a token provided to the consumer
239
- by Tripletex after the API 2.0 registration is completed. - **employeeToken**
240
- is a token created by an administrator in your Tripletex account via the user settings
241
- and the tab "API access". Each employee token must be given a set of entitlements.
242
- [Read more here.](https://tripletex.no/execute/docViewer?articleId=1505&languageId=0) -
243
- **sessionToken** is the token from `/token/session/:create` which requires a consumerToken
244
- and an employeeToken created with the same consumer token, but not an authentication
245
- header. - **Authentication** is done via [Basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) -
246
- **username** is used to specify what company to access. - `0` or blank means
247
- the company of the employee. - Any other value means accountant clients. Use
248
- `/company/>withLoginAccess` to get a list of those. - **password** is the **sessionToken**. -
249
- If you need to create the header yourself use `Authorization: Basic <encoded token>`
250
- where `encoded token` is the string `<target company id or 0>:<your session token>`
251
- Base64 encoded. ## Tags - `[BETA]` This is a beta endpoint and can be subject
252
- to change. - `[DEPRECATED]` Deprecated means that we intend to remove/change this
253
- feature or capability in a future "major" API release. We therefore discourage all
254
- use of this feature/capability. ## Fields Use the `fields` parameter to specify
255
- which fields should be returned. This also supports fields from sub elements, done
256
- via `<field>(<subResourceFields>)`. `*` means all fields for that resource. Example
257
- values: - `project,activity,hours` returns `{project:..., activity:...., hours:...}`.
258
- - just `project` returns `"project" : { "id": 12345, "url": "tripletex.no/v2/projects/12345" }`.
259
- - `project(*)` returns `"project" : { "id": 12345 "name":"ProjectName" "number.....startDate":
260
- "2013-01-07" }`. - `project(name)` returns `"project" : { "name":"ProjectName" }`.
261
- - All resources and some subResources : `*,activity(name),employee(*)`. ## Sorting Use
262
- the `sorting` parameter to specify sorting. It takes a comma separated list, where
263
- a `-` prefix denotes descending. You can sort by sub object with the following format:
264
- `<field>.<subObjectField>`. Example values: - `date` - `project.name` - `project.name,
265
- -date` ## Changes To get the changes for a resource, `changes` have to be explicitly
266
- specified as part of the `fields` parameter, e.g. `*,changes`. There are currently
267
- two types of change available: - `CREATE` for when the resource was created - `UPDATE`
268
- for when the resource was updated **NOTE** > For objects created prior to October
269
- 24th 2018 the list may be incomplete, but will always contain the CREATE and the
270
- last change (if the object has been changed after creation). ## Rate limiting Rate
271
- limiting is performed on the API calls for an employee for each API consumer. Status
272
- regarding the rate limit is returned as headers: - `X-Rate-Limit-Limit` - The number
273
- of allowed requests in the current period. - `X-Rate-Limit-Remaining` - The number
274
- of remaining requests. - `X-Rate-Limit-Reset` - The number of seconds left in the
275
- current period. Once the rate limit is hit, all requests will return HTTP status
276
- code `429` for the remainder of the current period. ## Response envelope ####
277
- Multiple values ```json { "fullResultSize": ###, // {number} [DEPRECATED] "from":
278
- ###, // {number} Paging starting from "count": ###, // {number} Paging count "versionDigest":
279
- "###", // {string} Hash of full result, null if no result "values": [...{...object...},{...object...},{...object...}...]
280
- } ``` #### Single value ```json { "value": {...single object...} } ``` ##
281
- WebHook envelope ```json { "subscriptionId": ###, // Subscription id "event":
282
- "object.verb", // As listed from /v2/event/ "id": ###, // Id of object this event
283
- is for "value": {... single object, null if object.deleted ...} } ``` ## Error/warning
284
- envelope ```json { "status": ###, // {number} HTTP status code "code": #####,
285
- // {number} internal status code of event "message": "###", // {string} Basic
286
- feedback message in your language "link": "###", // {string} Link to doc "developerMessage":
287
- "###", // {string} More technical message "validationMessages": [ // {array} List
288
- of validation messages, can be null { "field": "###", // {string} Name
289
- of field "message": "###" // {string} Validation message for field } ], "requestId":
290
- "###" // {string} Same as x-tlx-request-id } ``` ## Status codes / Error codes -
291
- **200 OK** - **201 Created** - From POSTs that create something new. - **204 No
292
- Content** - When there is no answer, ex: "/:anAction" or DELETE. - **400 Bad request**
293
- - - **4000** Bad Request Exception - **11000** Illegal Filter Exception -
294
- **12000** Path Param Exception - **24000** Cryptography Exception - **401 Unauthorized**
295
- - When authentication is required and has failed or has not yet been provided - **3000**
296
- Authentication Exception - **403 Forbidden** - When AuthorisationManager says no. - **9000**
297
- Security Exception - **404 Not Found** - For resources that does not exist. - **6000**
298
- Not Found Exception - **409 Conflict** - Such as an edit conflict between multiple
299
- simultaneous updates - **7000** Object Exists Exception - **8000** Revision
300
- Exception - **10000** Locked Exception - **14000** Duplicate entry - **422 Bad
301
- Request** - For Required fields or things like malformed payload. - **15000**
302
- Value Validation Exception - **16000** Mapping Exception - **17000** Sorting
303
- Exception - **18000** Validation Exception - **21000** Param Exception - **22000**
304
- Invalid JSON Exception - **23000** Result Set Too Large Exception - **429 Too
305
- Many Requests** - Request rate limit hit - **500 Internal Error** - Unexpected condition
306
- was encountered and no more specific message is suitable - **1000** Exception '
213
+ description: Rubynor AS, rubynor.com, generated this gem using swagger codegen and
214
+ changed it so it actually worked
307
215
  email:
308
216
  - ''
309
217
  executables: []
@@ -2825,9 +2733,8 @@ files:
2825
2733
  - spec/models/ztl_onboarding_spec.rb
2826
2734
  - spec/spec_helper.rb
2827
2735
  - tripletex-swagger-config.json
2828
- - tripletex_ruby_client-1.0.1.gem
2829
2736
  - tripletex_ruby_client.gemspec
2830
- homepage: https://github.com/swagger-api/swagger-codegen
2737
+ homepage: https://github.com/rubynor/tripletex_ruby_client
2831
2738
  licenses:
2832
2739
  - Unlicense
2833
2740
  metadata: {}
@@ -2846,10 +2753,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2846
2753
  - !ruby/object:Gem::Version
2847
2754
  version: '0'
2848
2755
  requirements: []
2849
- rubygems_version: 3.2.15
2756
+ rubygems_version: 3.1.3
2850
2757
  signing_key:
2851
2758
  specification_version: 4
2852
- summary: Tripletex API Ruby Gem
2759
+ summary: Tripletex API Ruby Client Gem
2853
2760
  test_files:
2854
2761
  - spec/api/ledgerposting_api_spec.rb
2855
2762
  - spec/api/projectsettings_api_spec.rb
Binary file