quake_timesheets_client 0.1.1 → 0.1.6

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: 28dba9dc7e3df7c1eb507daca0c76c92ae3ee2022436ee3cca755ffacf4acf61
4
- data.tar.gz: 4e90cdd673cc3e978ba0c2846a2b8fe3e0b99c07bb34f94d716799a83b065a85
3
+ metadata.gz: e8c19551aeb973023b6ccddca7606fa1e3b9f5efd134e238c472f714410ea065
4
+ data.tar.gz: 74806982123e3f8c37f6f49a86c47016de030052823661a77b8cef8e71628d57
5
5
  SHA512:
6
- metadata.gz: 5a850b95b5b021522701c29bc8a0cb2cd70aa120ea0be2a6a05606d35e1a582c873878a5fe0300df090ec58a12cbe6f30c379167948a40a9b89b953d90e4901e
7
- data.tar.gz: f80bc788dc97f2c422336e607e092e1720cfa7bcbb0b20dbba5d341c154ee3e6e64af96c2f9070237a20d3d96db51e1337e533141f51105d77e3652031adce13
6
+ metadata.gz: 3d789c6f50fc4c127de7ffcae7043dbc4e3624b56635841b91ed9c2bb5c1b1b34b25bbd34338c18b30ca0bb371140d8de108d05f4af26d5e98986803e71d7b46
7
+ data.tar.gz: 73c8483588557cb8865592f3ba6038f5be4e1bb70ffbb2613e5d95a310a8b286d65fa339dedbb534c6973ce6e9c065e0e2d74603e394475f089388a904ab755f
data/Gemfile.lock ADDED
@@ -0,0 +1,74 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ quake_timesheets_client (0.1.6)
5
+ faraday (~> 1.0, >= 1.0.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ byebug (11.1.3)
12
+ coderay (1.1.3)
13
+ diff-lcs (1.4.4)
14
+ faraday (1.4.1)
15
+ faraday-excon (~> 1.1)
16
+ faraday-net_http (~> 1.0)
17
+ faraday-net_http_persistent (~> 1.1)
18
+ multipart-post (>= 1.2, < 3)
19
+ ruby2_keywords (>= 0.0.4)
20
+ faraday-excon (1.1.0)
21
+ faraday-net_http (1.0.1)
22
+ faraday-net_http_persistent (1.1.0)
23
+ jaro_winkler (1.5.4)
24
+ method_source (1.0.0)
25
+ multipart-post (2.1.1)
26
+ parallel (1.20.1)
27
+ parser (3.0.1.1)
28
+ ast (~> 2.4.1)
29
+ pry (0.13.1)
30
+ coderay (~> 1.1)
31
+ method_source (~> 1.0)
32
+ pry-byebug (3.9.0)
33
+ byebug (~> 11.0)
34
+ pry (~> 0.13.0)
35
+ psych (3.3.1)
36
+ rainbow (3.0.0)
37
+ rake (13.0.3)
38
+ rspec (3.10.0)
39
+ rspec-core (~> 3.10.0)
40
+ rspec-expectations (~> 3.10.0)
41
+ rspec-mocks (~> 3.10.0)
42
+ rspec-core (3.10.1)
43
+ rspec-support (~> 3.10.0)
44
+ rspec-expectations (3.10.1)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.10.0)
47
+ rspec-mocks (3.10.2)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.10.0)
50
+ rspec-support (3.10.2)
51
+ rubocop (0.66.0)
52
+ jaro_winkler (~> 1.5.1)
53
+ parallel (~> 1.10)
54
+ parser (>= 2.5, != 2.5.1.1)
55
+ psych (>= 3.1.0)
56
+ rainbow (>= 2.2.2, < 4.0)
57
+ ruby-progressbar (~> 1.7)
58
+ unicode-display_width (>= 1.4.0, < 1.6)
59
+ ruby-progressbar (1.11.0)
60
+ ruby2_keywords (0.0.4)
61
+ unicode-display_width (1.5.0)
62
+
63
+ PLATFORMS
64
+ x86_64-linux
65
+
66
+ DEPENDENCIES
67
+ pry-byebug
68
+ quake_timesheets_client!
69
+ rake (~> 13.0.1)
70
+ rspec (~> 3.6, >= 3.6.0)
71
+ rubocop (~> 0.66.0)
72
+
73
+ BUNDLED WITH
74
+ 2.2.17
data/README.md CHANGED
@@ -9,7 +9,7 @@ Quake::Timesheets - the Ruby gem for the TimesheetsApi (params in:body)
9
9
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
10
10
 
11
11
  - API version: 1.0
12
- - Package version: 0.1.1
12
+ - Package version: 0.1.6
13
13
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
14
14
 
15
15
  ## Generating
@@ -37,16 +37,16 @@ gem build quake_timesheets_client.gemspec
37
37
  Then either install the gem locally:
38
38
 
39
39
  ```shell
40
- gem install ./quake_timesheets_client-0.1.1.gem
40
+ gem install ./quake_timesheets_client-0.1.6.gem
41
41
  ```
42
42
 
43
- (for development, run `gem install --dev ./quake_timesheets_client-0.1.1.gem` to install the development dependencies)
43
+ (for development, run `gem install --dev ./quake_timesheets_client-0.1.6.gem` to install the development dependencies)
44
44
 
45
45
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
46
46
 
47
47
  Finally add this to the Gemfile:
48
48
 
49
- gem 'quake_timesheets_client', '~> 0.1.1'
49
+ gem 'quake_timesheets_client', '~> 0.1.6'
50
50
 
51
51
  ### Install from Git
52
52
 
@@ -111,7 +111,7 @@ Class | Method | HTTP request | Description
111
111
  *Quake::Timesheets::DatasetsApi* | [**show_datasets**](docs/DatasetsApi.md#show_datasets) | **GET** /api/v1/datasets/{id} | Show details about a specific dataset
112
112
  *Quake::Timesheets::EntriesApi* | [**create_entries**](docs/EntriesApi.md#create_entries) | **POST** /api/v1/entries | Create a new Entry
113
113
  *Quake::Timesheets::EntriesApi* | [**index_entries**](docs/EntriesApi.md#index_entries) | **GET** /api/v1/entries | Search for entries matching filters
114
- *Quake::Timesheets::EntriesApi* | [**update_entries**](docs/EntriesApi.md#update_entries) | **POST** /api/v1/entries/{id} | Update an existing Entry
114
+ *Quake::Timesheets::EntriesApi* | [**update_entries**](docs/EntriesApi.md#update_entries) | **PATCH** /api/v1/entries/{id} | Update an existing Entry
115
115
  *Quake::Timesheets::PeopleApi* | [**create_people**](docs/PeopleApi.md#create_people) | **POST** /api/v1/people | Create a new Person record
116
116
  *Quake::Timesheets::PeopleApi* | [**index_people**](docs/PeopleApi.md#index_people) | **GET** /api/v1/people | Search for people matching filters
117
117
 
@@ -127,6 +127,7 @@ Class | Method | HTTP request | Description
127
127
  - [Quake::Timesheets::CreatePeopleInput](docs/CreatePeopleInput.md)
128
128
  - [Quake::Timesheets::Dataset](docs/Dataset.md)
129
129
  - [Quake::Timesheets::Entry](docs/Entry.md)
130
+ - [Quake::Timesheets::EntryTags](docs/EntryTags.md)
130
131
  - [Quake::Timesheets::Person](docs/Person.md)
131
132
  - [Quake::Timesheets::UpdateEntriesInput](docs/UpdateEntriesInput.md)
132
133
 
@@ -10,6 +10,7 @@
10
10
  | **quantity** | **Float** | | [optional] |
11
11
  | **unit** | **String** | | [optional] |
12
12
  | **external_reference** | **String** | Unique identifier of the activity this Entry relates to | [optional] |
13
+ | **tags** | **Array&lt;String&gt;** | The Tags attached to this entries. Can take an Array of UUIDs of existing Tags, or any String which will find or create a Tag with that value | [optional] |
13
14
 
14
15
  ## Example
15
16
 
@@ -22,7 +23,8 @@ instance = Quake::Timesheets::CreateEntriesInput.new(
22
23
  end_at: null,
23
24
  quantity: null,
24
25
  unit: null,
25
- external_reference: null
26
+ external_reference: null,
27
+ tags: null
26
28
  )
27
29
  ```
28
30
 
data/docs/EntriesApi.md CHANGED
@@ -6,7 +6,7 @@ All URIs are relative to *https://timesheetsapi.svc.lumbry.co.uk:443*
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**create_entries**](EntriesApi.md#create_entries) | **POST** /api/v1/entries | Create a new Entry |
8
8
  | [**index_entries**](EntriesApi.md#index_entries) | **GET** /api/v1/entries | Search for entries matching filters |
9
- | [**update_entries**](EntriesApi.md#update_entries) | **POST** /api/v1/entries/{id} | Update an existing Entry |
9
+ | [**update_entries**](EntriesApi.md#update_entries) | **PATCH** /api/v1/entries/{id} | Update an existing Entry |
10
10
 
11
11
 
12
12
  ## create_entries
data/docs/Entry.md CHANGED
@@ -12,6 +12,7 @@
12
12
  | **quantity** | **Float** | | [optional] |
13
13
  | **unit** | **String** | | [optional] |
14
14
  | **external_reference** | **String** | Unique identifier of the activity this Entry relates to | [optional] |
15
+ | **tags** | [**Array&lt;EntryTags&gt;**](EntryTags.md) | | |
15
16
  | **created_at** | **String** | Time at which the record was created | |
16
17
  | **updated_at** | **String** | Time at which the record was updated | |
17
18
 
@@ -29,6 +30,7 @@ instance = Quake::Timesheets::Entry.new(
29
30
  quantity: null,
30
31
  unit: null,
31
32
  external_reference: null,
33
+ tags: null,
32
34
  created_at: null,
33
35
  updated_at: null
34
36
  )
data/docs/EntryTags.md ADDED
@@ -0,0 +1,26 @@
1
+ # Quake::Timesheets::EntryTags
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The Tag&#39;s ID | [optional] |
8
+ | **value** | **String** | The Tag&#39;s value | [optional] |
9
+ | **dataset_id** | **String** | The Tag&#39;s Dataset ID | [optional] |
10
+ | **created_at** | **String** | The Tag&#39;s time of creation | [optional] |
11
+ | **updated_at** | **String** | The Tag&#39;s time of last modification | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'quake_timesheets_client'
17
+
18
+ instance = Quake::Timesheets::EntryTags.new(
19
+ id: null,
20
+ value: null,
21
+ dataset_id: null,
22
+ created_at: null,
23
+ updated_at: null
24
+ )
25
+ ```
26
+
@@ -10,6 +10,7 @@
10
10
  | **quantity** | **Float** | | [optional] |
11
11
  | **unit** | **String** | | [optional] |
12
12
  | **external_reference** | **String** | Unique identifier of the activity this Entry relates to | [optional] |
13
+ | **tags** | **Array&lt;String&gt;** | The Tags attached to this entries. Can take an Array of UUIDs of existing Tags, or any String which will find or create a Tag with that value | [optional] |
13
14
 
14
15
  ## Example
15
16
 
@@ -22,7 +23,8 @@ instance = Quake::Timesheets::UpdateEntriesInput.new(
22
23
  end_at: null,
23
24
  quantity: null,
24
25
  unit: null,
25
- external_reference: null
26
+ external_reference: null,
27
+ tags: null
26
28
  )
27
29
  ```
28
30
 
@@ -35,6 +35,7 @@ require 'quake_timesheets_client/models/create_entries_input'
35
35
  require 'quake_timesheets_client/models/create_people_input'
36
36
  require 'quake_timesheets_client/models/dataset'
37
37
  require 'quake_timesheets_client/models/entry'
38
+ require 'quake_timesheets_client/models/entry_tags'
38
39
  require 'quake_timesheets_client/models/person'
39
40
  require 'quake_timesheets_client/models/update_entries_input'
40
41
 
@@ -53,7 +53,7 @@ module Quake::Timesheets
53
53
  form_params = opts[:form_params] || {}
54
54
 
55
55
  # http body (model)
56
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_approval_types_input'])
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_approval_types_input'] || opts[:body])
57
57
 
58
58
  # return_type
59
59
  return_type = opts[:debug_return_type] || 'ApprovalType'
@@ -53,7 +53,7 @@ module Quake::Timesheets
53
53
  form_params = opts[:form_params] || {}
54
54
 
55
55
  # http body (model)
56
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_approvals_input'])
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_approvals_input'] || opts[:body])
57
57
 
58
58
  # return_type
59
59
  return_type = opts[:debug_return_type] || 'Approval'
@@ -53,7 +53,7 @@ module Quake::Timesheets
53
53
  form_params = opts[:form_params] || {}
54
54
 
55
55
  # http body (model)
56
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_datasets_input'])
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_datasets_input'] || opts[:body])
57
57
 
58
58
  # return_type
59
59
  return_type = opts[:debug_return_type] || 'Dataset'
@@ -53,7 +53,7 @@ module Quake::Timesheets
53
53
  form_params = opts[:form_params] || {}
54
54
 
55
55
  # http body (model)
56
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_entries_input'])
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_entries_input'] || opts[:body])
57
57
 
58
58
  # return_type
59
59
  return_type = opts[:debug_return_type] || 'Entry'
@@ -185,7 +185,7 @@ module Quake::Timesheets
185
185
  form_params = opts[:form_params] || {}
186
186
 
187
187
  # http body (model)
188
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_entries_input'])
188
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_entries_input'] || opts[:body])
189
189
 
190
190
  # return_type
191
191
  return_type = opts[:debug_return_type] || 'Entry'
@@ -203,7 +203,7 @@ module Quake::Timesheets
203
203
  :return_type => return_type
204
204
  )
205
205
 
206
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
206
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
207
207
  if @api_client.config.debugging
208
208
  @api_client.config.logger.debug "API called: EntriesApi#update_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
209
  end
@@ -53,7 +53,7 @@ module Quake::Timesheets
53
53
  form_params = opts[:form_params] || {}
54
54
 
55
55
  # http body (model)
56
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_people_input'])
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_people_input'] || opts[:body])
57
57
 
58
58
  # return_type
59
59
  return_type = opts[:debug_return_type] || 'Person'
@@ -31,6 +31,9 @@ module Quake::Timesheets
31
31
  # Unique identifier of the activity this Entry relates to
32
32
  attr_accessor :external_reference
33
33
 
34
+ # The Tags attached to this entries. Can take an Array of UUIDs of existing Tags, or any String which will find or create a Tag with that value
35
+ attr_accessor :tags
36
+
34
37
  class EnumAttributeValidator
35
38
  attr_reader :datatype
36
39
  attr_reader :allowable_values
@@ -61,7 +64,8 @@ module Quake::Timesheets
61
64
  :'end_at' => :'end_at',
62
65
  :'quantity' => :'quantity',
63
66
  :'unit' => :'unit',
64
- :'external_reference' => :'external_reference'
67
+ :'external_reference' => :'external_reference',
68
+ :'tags' => :'tags'
65
69
  }
66
70
  end
67
71
 
@@ -78,7 +82,8 @@ module Quake::Timesheets
78
82
  :'end_at' => :'String',
79
83
  :'quantity' => :'Float',
80
84
  :'unit' => :'String',
81
- :'external_reference' => :'String'
85
+ :'external_reference' => :'String',
86
+ :'tags' => :'Array<String>'
82
87
  }
83
88
  end
84
89
 
@@ -126,6 +131,12 @@ module Quake::Timesheets
126
131
  if attributes.key?(:'external_reference')
127
132
  self.external_reference = attributes[:'external_reference']
128
133
  end
134
+
135
+ if attributes.key?(:'tags')
136
+ if (value = attributes[:'tags']).is_a?(Array)
137
+ self.tags = value
138
+ end
139
+ end
129
140
  end
130
141
 
131
142
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -163,7 +174,8 @@ module Quake::Timesheets
163
174
  end_at == o.end_at &&
164
175
  quantity == o.quantity &&
165
176
  unit == o.unit &&
166
- external_reference == o.external_reference
177
+ external_reference == o.external_reference &&
178
+ tags == o.tags
167
179
  end
168
180
 
169
181
  # @see the `==` method
@@ -175,7 +187,7 @@ module Quake::Timesheets
175
187
  # Calculates hash code according to all attributes.
176
188
  # @return [Integer] Hash code
177
189
  def hash
178
- [person_id, start_at, end_at, quantity, unit, external_reference].hash
190
+ [person_id, start_at, end_at, quantity, unit, external_reference, tags].hash
179
191
  end
180
192
 
181
193
  # Builds the object from hash
@@ -37,6 +37,8 @@ module Quake::Timesheets
37
37
  # Unique identifier of the activity this Entry relates to
38
38
  attr_accessor :external_reference
39
39
 
40
+ attr_accessor :tags
41
+
40
42
  # Time at which the record was created
41
43
  attr_accessor :created_at
42
44
 
@@ -76,6 +78,7 @@ module Quake::Timesheets
76
78
  :'quantity' => :'quantity',
77
79
  :'unit' => :'unit',
78
80
  :'external_reference' => :'external_reference',
81
+ :'tags' => :'tags',
79
82
  :'created_at' => :'created_at',
80
83
  :'updated_at' => :'updated_at'
81
84
  }
@@ -97,6 +100,7 @@ module Quake::Timesheets
97
100
  :'quantity' => :'Float',
98
101
  :'unit' => :'String',
99
102
  :'external_reference' => :'String',
103
+ :'tags' => :'Array<EntryTags>',
100
104
  :'created_at' => :'String',
101
105
  :'updated_at' => :'String'
102
106
  }
@@ -155,6 +159,12 @@ module Quake::Timesheets
155
159
  self.external_reference = attributes[:'external_reference']
156
160
  end
157
161
 
162
+ if attributes.key?(:'tags')
163
+ if (value = attributes[:'tags']).is_a?(Array)
164
+ self.tags = value
165
+ end
166
+ end
167
+
158
168
  if attributes.key?(:'created_at')
159
169
  self.created_at = attributes[:'created_at']
160
170
  end
@@ -176,6 +186,10 @@ module Quake::Timesheets
176
186
  invalid_properties.push('invalid value for "dataset_id", dataset_id cannot be nil.')
177
187
  end
178
188
 
189
+ if @tags.nil?
190
+ invalid_properties.push('invalid value for "tags", tags cannot be nil.')
191
+ end
192
+
179
193
  if @created_at.nil?
180
194
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
181
195
  end
@@ -194,6 +208,7 @@ module Quake::Timesheets
194
208
  return false if @dataset_id.nil?
195
209
  unit_validator = EnumAttributeValidator.new('String', ["hour", "day", "week", "month", "other"])
196
210
  return false unless unit_validator.valid?(@unit)
211
+ return false if @tags.nil?
197
212
  return false if @created_at.nil?
198
213
  return false if @updated_at.nil?
199
214
  true
@@ -222,6 +237,7 @@ module Quake::Timesheets
222
237
  quantity == o.quantity &&
223
238
  unit == o.unit &&
224
239
  external_reference == o.external_reference &&
240
+ tags == o.tags &&
225
241
  created_at == o.created_at &&
226
242
  updated_at == o.updated_at
227
243
  end
@@ -235,7 +251,7 @@ module Quake::Timesheets
235
251
  # Calculates hash code according to all attributes.
236
252
  # @return [Integer] Hash code
237
253
  def hash
238
- [id, dataset_id, person_id, start_at, end_at, quantity, unit, external_reference, created_at, updated_at].hash
254
+ [id, dataset_id, person_id, start_at, end_at, quantity, unit, external_reference, tags, created_at, updated_at].hash
239
255
  end
240
256
 
241
257
  # Builds the object from hash
@@ -0,0 +1,259 @@
1
+ =begin
2
+ #TimesheetsApi (params in:body)
3
+
4
+ # <p>Another API description</p>
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Quake::Timesheets
17
+ class EntryTags
18
+ # The Tag's ID
19
+ attr_accessor :id
20
+
21
+ # The Tag's value
22
+ attr_accessor :value
23
+
24
+ # The Tag's Dataset ID
25
+ attr_accessor :dataset_id
26
+
27
+ # The Tag's time of creation
28
+ attr_accessor :created_at
29
+
30
+ # The Tag's time of last modification
31
+ attr_accessor :updated_at
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'id' => :'id',
37
+ :'value' => :'value',
38
+ :'dataset_id' => :'dataset_id',
39
+ :'created_at' => :'created_at',
40
+ :'updated_at' => :'updated_at'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'id' => :'String',
53
+ :'value' => :'String',
54
+ :'dataset_id' => :'String',
55
+ :'created_at' => :'String',
56
+ :'updated_at' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Quake::Timesheets::EntryTags` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Quake::Timesheets::EntryTags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'id')
82
+ self.id = attributes[:'id']
83
+ end
84
+
85
+ if attributes.key?(:'value')
86
+ self.value = attributes[:'value']
87
+ end
88
+
89
+ if attributes.key?(:'dataset_id')
90
+ self.dataset_id = attributes[:'dataset_id']
91
+ end
92
+
93
+ if attributes.key?(:'created_at')
94
+ self.created_at = attributes[:'created_at']
95
+ end
96
+
97
+ if attributes.key?(:'updated_at')
98
+ self.updated_at = attributes[:'updated_at']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ id == o.id &&
121
+ value == o.value &&
122
+ dataset_id == o.dataset_id &&
123
+ created_at == o.created_at &&
124
+ updated_at == o.updated_at
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [id, value, dataset_id, created_at, updated_at].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
158
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
+ end
160
+ elsif !attributes[self.class.attribute_map[key]].nil?
161
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ end
163
+ end
164
+
165
+ self
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def _deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = Quake::Timesheets.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -31,6 +31,9 @@ module Quake::Timesheets
31
31
  # Unique identifier of the activity this Entry relates to
32
32
  attr_accessor :external_reference
33
33
 
34
+ # The Tags attached to this entries. Can take an Array of UUIDs of existing Tags, or any String which will find or create a Tag with that value
35
+ attr_accessor :tags
36
+
34
37
  class EnumAttributeValidator
35
38
  attr_reader :datatype
36
39
  attr_reader :allowable_values
@@ -61,7 +64,8 @@ module Quake::Timesheets
61
64
  :'end_at' => :'end_at',
62
65
  :'quantity' => :'quantity',
63
66
  :'unit' => :'unit',
64
- :'external_reference' => :'external_reference'
67
+ :'external_reference' => :'external_reference',
68
+ :'tags' => :'tags'
65
69
  }
66
70
  end
67
71
 
@@ -78,7 +82,8 @@ module Quake::Timesheets
78
82
  :'end_at' => :'String',
79
83
  :'quantity' => :'Float',
80
84
  :'unit' => :'String',
81
- :'external_reference' => :'String'
85
+ :'external_reference' => :'String',
86
+ :'tags' => :'Array<String>'
82
87
  }
83
88
  end
84
89
 
@@ -126,6 +131,12 @@ module Quake::Timesheets
126
131
  if attributes.key?(:'external_reference')
127
132
  self.external_reference = attributes[:'external_reference']
128
133
  end
134
+
135
+ if attributes.key?(:'tags')
136
+ if (value = attributes[:'tags']).is_a?(Array)
137
+ self.tags = value
138
+ end
139
+ end
129
140
  end
130
141
 
131
142
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -163,7 +174,8 @@ module Quake::Timesheets
163
174
  end_at == o.end_at &&
164
175
  quantity == o.quantity &&
165
176
  unit == o.unit &&
166
- external_reference == o.external_reference
177
+ external_reference == o.external_reference &&
178
+ tags == o.tags
167
179
  end
168
180
 
169
181
  # @see the `==` method
@@ -175,7 +187,7 @@ module Quake::Timesheets
175
187
  # Calculates hash code according to all attributes.
176
188
  # @return [Integer] Hash code
177
189
  def hash
178
- [person_id, start_at, end_at, quantity, unit, external_reference].hash
190
+ [person_id, start_at, end_at, quantity, unit, external_reference, tags].hash
179
191
  end
180
192
 
181
193
  # Builds the object from hash
@@ -20,5 +20,5 @@ OpenAPI Generator version: 5.1.0
20
20
  end
21
21
 
22
22
  module Quake::Timesheets
23
- VERSION = '0.1.1'
23
+ VERSION = '0.1.6'
24
24
  end
@@ -0,0 +1,206 @@
1
+ =begin
2
+ {{> api_info}}
3
+ =end
4
+
5
+ require 'cgi'
6
+
7
+ module {{moduleName}}
8
+ {{#operations}}
9
+ class {{classname}}
10
+ attr_accessor :api_client
11
+
12
+ def initialize(api_client = ApiClient.default)
13
+ @api_client = api_client
14
+ end
15
+ {{#operation}}
16
+ {{#summary}}
17
+ # {{{summary}}}
18
+ {{/summary}}
19
+ {{#notes}}
20
+ # {{{notes}}}
21
+ {{/notes}}
22
+ {{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}}
23
+ {{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
24
+ {{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
25
+ {{/required}}{{/allParams}} # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}]
26
+ def {{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
27
+ {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts)
28
+ {{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}}
29
+ end
30
+
31
+ {{#summary}}
32
+ # {{summary}}
33
+ {{/summary}}
34
+ {{#notes}}
35
+ # {{notes}}
36
+ {{/notes}}
37
+ {{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}}
38
+ {{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
39
+ {{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}
40
+ {{/required}}{{/allParams}} # @return [Array<({{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{returnType}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers
41
+ def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...'
44
+ end
45
+ {{#allParams}}
46
+ {{^isNullable}}
47
+ {{#required}}
48
+ # verify the required parameter '{{paramName}}' is set
49
+ if @api_client.config.client_side_validation && {{{paramName}}}.nil?
50
+ fail ArgumentError, "Missing the required parameter '{{paramName}}' when calling {{classname}}.{{operationId}}"
51
+ end
52
+ {{#isEnum}}
53
+ {{^isContainer}}
54
+ # verify enum value
55
+ allowable_values = [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]
56
+ if @api_client.config.client_side_validation && !allowable_values.include?({{{paramName}}})
57
+ fail ArgumentError, "invalid value for \"{{{paramName}}}\", must be one of #{allowable_values}"
58
+ end
59
+ {{/isContainer}}
60
+ {{/isEnum}}
61
+ {{/required}}
62
+ {{/isNullable}}
63
+ {{^required}}
64
+ {{#isEnum}}
65
+ {{#collectionFormat}}
66
+ allowable_values = [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]
67
+ if @api_client.config.client_side_validation && opts[:'{{{paramName}}}'] && !opts[:'{{{paramName}}}'].all? { |item| allowable_values.include?(item) }
68
+ fail ArgumentError, "invalid value for \"{{{paramName}}}\", must include one of #{allowable_values}"
69
+ end
70
+ {{/collectionFormat}}
71
+ {{^collectionFormat}}
72
+ allowable_values = [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]
73
+ if @api_client.config.client_side_validation && opts[:'{{{paramName}}}'] && !allowable_values.include?(opts[:'{{{paramName}}}'])
74
+ fail ArgumentError, "invalid value for \"{{{paramName}}}\", must be one of #{allowable_values}"
75
+ end
76
+ {{/collectionFormat}}
77
+ {{/isEnum}}
78
+ {{/required}}
79
+ {{#hasValidation}}
80
+ {{#maxLength}}
81
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}.to_s.length > {{{maxLength}}}
82
+ fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, the character length must be smaller than or equal to {{{maxLength}}}.'
83
+ end
84
+
85
+ {{/maxLength}}
86
+ {{#minLength}}
87
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}.to_s.length < {{{minLength}}}
88
+ fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, the character length must be great than or equal to {{{minLength}}}.'
89
+ end
90
+
91
+ {{/minLength}}
92
+ {{#maximum}}
93
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}}
94
+ fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}.'
95
+ end
96
+
97
+ {{/maximum}}
98
+ {{#minimum}}
99
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}}
100
+ fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}.'
101
+ end
102
+
103
+ {{/minimum}}
104
+ {{#pattern}}
105
+ pattern = Regexp.new({{{pattern}}})
106
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}} !~ pattern
107
+ fail ArgumentError, "invalid value for '{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:\"{{{paramName}}}\"]{{/required}}' when calling {{classname}}.{{operationId}}, must conform to the pattern #{pattern}."
108
+ end
109
+
110
+ {{/pattern}}
111
+ {{#maxItems}}
112
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}.length > {{{maxItems}}}
113
+ fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{{maxItems}}}.'
114
+ end
115
+
116
+ {{/maxItems}}
117
+ {{#minItems}}
118
+ if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}.length < {{{minItems}}}
119
+ fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{{minItems}}}.'
120
+ end
121
+
122
+ {{/minItems}}
123
+ {{/hasValidation}}
124
+ {{/allParams}}
125
+ # resource path
126
+ local_var_path = '{{{path}}}'{{#pathParams}}.sub('{' + '{{baseName}}' + '}', CGI.escape({{paramName}}.to_s){{^strictSpecBehavior}}.gsub('%2F', '/'){{/strictSpecBehavior}}){{/pathParams}}
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+ {{#queryParams}}
131
+ {{#required}}
132
+ query_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param({{{paramName}}}, :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}{{/collectionFormat}}
133
+ {{/required}}
134
+ {{/queryParams}}
135
+ {{#queryParams}}
136
+ {{^required}}
137
+ query_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil?
138
+ {{/required}}
139
+ {{/queryParams}}
140
+
141
+ # header parameters
142
+ header_params = opts[:header_params] || {}
143
+ {{#hasProduces}}
144
+ # HTTP header 'Accept' (if needed)
145
+ header_params['Accept'] = @api_client.select_header_accept([{{#produces}}'{{{mediaType}}}'{{^-last}}, {{/-last}}{{/produces}}])
146
+ {{/hasProduces}}
147
+ {{#hasConsumes}}
148
+ # HTTP header 'Content-Type'
149
+ header_params['Content-Type'] = @api_client.select_header_content_type([{{#consumes}}'{{{mediaType}}}'{{^-last}}, {{/-last}}{{/consumes}}])
150
+ {{/hasConsumes}}
151
+ {{#headerParams}}
152
+ {{#required}}
153
+ header_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param({{{paramName}}}, :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}{{/collectionFormat}}
154
+ {{/required}}
155
+ {{/headerParams}}
156
+ {{#headerParams}}
157
+ {{^required}}
158
+ header_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil?
159
+ {{/required}}
160
+ {{/headerParams}}
161
+
162
+ # form parameters
163
+ form_params = opts[:form_params] || {}
164
+ {{#formParams}}
165
+ {{#required}}
166
+ form_params['{{baseName}}'] = {{#collectionFormat}}@api_client.build_collection_param({{{paramName}}}, :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}{{/collectionFormat}}
167
+ {{/required}}
168
+ {{/formParams}}
169
+ {{#formParams}}
170
+ {{^required}}
171
+ form_params['{{baseName}}'] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{paramName}}'].nil?
172
+ {{/required}}
173
+ {{/formParams}}
174
+
175
+ # http body (model)
176
+ post_body = opts[:debug_body]{{#bodyParam}} || @api_client.object_to_http_body({{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}'] || opts[:body]{{/required}}){{/bodyParam}}
177
+
178
+ # return_type
179
+ return_type = opts[:debug_return_type]{{#returnType}} || '{{{returnType}}}'{{/returnType}}
180
+
181
+ # auth_names
182
+ auth_names = opts[:debug_auth_names] || [{{#authMethods}}'{{name}}'{{^-last}}, {{/-last}}{{/authMethods}}]
183
+
184
+ new_options = opts.merge(
185
+ :operation => :"{{classname}}.{{operationId}}",
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:{{httpMethod}}, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: {{classname}}#{{operationId}}\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+ {{^-last}}
201
+
202
+ {{/-last}}
203
+ {{/operation}}
204
+ end
205
+ {{/operations}}
206
+ end
data/ruby.config.yaml CHANGED
@@ -4,7 +4,7 @@ gemHomepage: https://www.quake.co.uk
4
4
  gemSummary: A client for the Quake Timesheets API
5
5
  gemDescription: Requires the Quake Timesheets system
6
6
  gemLicense: MIT
7
- gemVersion: 0.1.1
7
+ gemVersion: 0.1.6
8
8
  gemRequiredRubyVersion: ">= 2.7"
9
9
  library: faraday
10
10
  moduleName: Quake::Timesheets
@@ -0,0 +1,58 @@
1
+ =begin
2
+ #TimesheetsApi (params in:body)
3
+
4
+ # <p>Another API description</p>
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Quake::Timesheets::EntryTags
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Quake::Timesheets::EntryTags do
21
+ let(:instance) { Quake::Timesheets::EntryTags.new }
22
+
23
+ describe 'test an instance of EntryTags' do
24
+ it 'should create an instance of EntryTags' do
25
+ expect(instance).to be_instance_of(Quake::Timesheets::EntryTags)
26
+ end
27
+ end
28
+ describe 'test attribute "id"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "value"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "dataset_id"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "created_at"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "updated_at"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quake_timesheets_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -59,10 +59,10 @@ extra_rdoc_files: []
59
59
  files:
60
60
  - GENERATING_README.md
61
61
  - Gemfile
62
+ - Gemfile.lock
62
63
  - README.md
63
64
  - Rakefile
64
65
  - build.sh
65
- - commands
66
66
  - docs/Approval.md
67
67
  - docs/ApprovalType.md
68
68
  - docs/ApprovalTypesApi.md
@@ -76,6 +76,7 @@ files:
76
76
  - docs/DatasetsApi.md
77
77
  - docs/EntriesApi.md
78
78
  - docs/Entry.md
79
+ - docs/EntryTags.md
79
80
  - docs/PeopleApi.md
80
81
  - docs/Person.md
81
82
  - docs/UpdateEntriesInput.md
@@ -98,11 +99,13 @@ files:
98
99
  - lib/quake_timesheets_client/models/create_people_input.rb
99
100
  - lib/quake_timesheets_client/models/dataset.rb
100
101
  - lib/quake_timesheets_client/models/entry.rb
102
+ - lib/quake_timesheets_client/models/entry_tags.rb
101
103
  - lib/quake_timesheets_client/models/person.rb
102
104
  - lib/quake_timesheets_client/models/update_entries_input.rb
103
105
  - lib/quake_timesheets_client/version.rb
104
106
  - quake_timesheets_client.gemspec
105
107
  - ruby-templates/README.mustache
108
+ - ruby-templates/api.mustache
106
109
  - ruby-templates/api_client.mustache
107
110
  - ruby-templates/api_client_faraday_partial.mustache
108
111
  - ruby-templates/configuration.mustache
@@ -125,6 +128,7 @@ files:
125
128
  - spec/models/create_people_input_spec.rb
126
129
  - spec/models/dataset_spec.rb
127
130
  - spec/models/entry_spec.rb
131
+ - spec/models/entry_tags_spec.rb
128
132
  - spec/models/person_spec.rb
129
133
  - spec/models/update_entries_input_spec.rb
130
134
  - spec/spec_helper.rb
@@ -147,27 +151,28 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
151
  - !ruby/object:Gem::Version
148
152
  version: '0'
149
153
  requirements: []
150
- rubygems_version: 3.1.4
154
+ rubygems_version: 3.1.6
151
155
  signing_key:
152
156
  specification_version: 4
153
157
  summary: A client for the Quake Timesheets API
154
158
  test_files:
155
- - spec/api/approvals_api_spec.rb
159
+ - spec/api/people_api_spec.rb
160
+ - spec/api/approval_types_api_spec.rb
156
161
  - spec/api/entries_api_spec.rb
157
162
  - spec/api/datasets_api_spec.rb
158
- - spec/api/approval_types_api_spec.rb
159
- - spec/api/people_api_spec.rb
163
+ - spec/api/approvals_api_spec.rb
160
164
  - spec/api_client_spec.rb
161
165
  - spec/configuration_spec.rb
162
- - spec/models/create_approval_types_input_spec.rb
166
+ - spec/models/approval_type_spec.rb
167
+ - spec/models/entry_tags_spec.rb
168
+ - spec/models/approval_spec.rb
169
+ - spec/models/create_datasets_input_spec.rb
163
170
  - spec/models/entry_spec.rb
164
171
  - spec/models/dataset_spec.rb
165
- - spec/models/create_people_input_spec.rb
166
- - spec/models/person_spec.rb
167
- - spec/models/approval_type_spec.rb
168
- - spec/models/create_entries_input_spec.rb
169
172
  - spec/models/create_approvals_input_spec.rb
173
+ - spec/models/person_spec.rb
170
174
  - spec/models/update_entries_input_spec.rb
171
- - spec/models/approval_spec.rb
172
- - spec/models/create_datasets_input_spec.rb
175
+ - spec/models/create_people_input_spec.rb
176
+ - spec/models/create_approval_types_input_spec.rb
177
+ - spec/models/create_entries_input_spec.rb
173
178
  - spec/spec_helper.rb
data/commands DELETED
@@ -1,13 +0,0 @@
1
- require 'quake_timesheets_client'
2
-
3
- config = Quake::Timesheets::Configuration.new
4
- config.api_key['authToken'] = 'supersecretkey'
5
-
6
- config.server_settings = [{url: 'http://localhost:3000'}]
7
-
8
- client = Quake::Timesheets::ApiClient.new(config)
9
- api_instance = Quake::Timesheets::ApprovalTypesApi.new(client)
10
- result = api_instance.get_api_v1_approval_types(dataset_id: '05033a75-de02-4689-9c55-04b575d33b2c')
11
-
12
- result.first.name == 'my approval'
13
- result.first.weight == 2.0