quake_timesheets_client 0.1.5 → 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: 788e3cdd15937336e276568400bc08afe81744abf069277988b3ff2ebd9847c1
4
- data.tar.gz: b7cf8bee5bdd238f8e939ab692962b1a0bcb903a6ab3c5c9c9ed26a4ceae6186
3
+ metadata.gz: e8c19551aeb973023b6ccddca7606fa1e3b9f5efd134e238c472f714410ea065
4
+ data.tar.gz: 74806982123e3f8c37f6f49a86c47016de030052823661a77b8cef8e71628d57
5
5
  SHA512:
6
- metadata.gz: 8bddad7a94043d2689da7dad28da2034bd31990b391e361ad21ade6ccbf31e20d8739b82b6d8a040450b7711ca6371c812b45b978b1d4cdec1932b0e49cacc9d
7
- data.tar.gz: 87f4f84d26e971abb2c49db57c169d554f7f6364163369876e14c948969573ed8b4b0ef10d34f8f8341e00eb69eb1a12663df3f85faaacfd7762ecccfb849300
6
+ metadata.gz: 3d789c6f50fc4c127de7ffcae7043dbc4e3624b56635841b91ed9c2bb5c1b1b34b25bbd34338c18b30ca0bb371140d8de108d05f4af26d5e98986803e71d7b46
7
+ data.tar.gz: 73c8483588557cb8865592f3ba6038f5be4e1bb70ffbb2613e5d95a310a8b286d65fa339dedbb534c6973ce6e9c065e0e2d74603e394475f089388a904ab755f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- quake_timesheets_client (0.1.5)
4
+ quake_timesheets_client (0.1.6)
5
5
  faraday (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
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.5
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.5.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.5.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.5'
49
+ gem 'quake_timesheets_client', '~> 0.1.6'
50
50
 
51
51
  ### Install from Git
52
52
 
@@ -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
 
data/docs/Entry.md CHANGED
@@ -12,7 +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<String>** | The Tags attached to this entry. | |
15
+ | **tags** | [**Array<EntryTags>**](EntryTags.md) | | |
16
16
  | **created_at** | **String** | Time at which the record was created | |
17
17
  | **updated_at** | **String** | Time at which the record was updated | |
18
18
 
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's ID | [optional] |
8
+ | **value** | **String** | The Tag's value | [optional] |
9
+ | **dataset_id** | **String** | The Tag's Dataset ID | [optional] |
10
+ | **created_at** | **String** | The Tag's time of creation | [optional] |
11
+ | **updated_at** | **String** | The Tag'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
+
@@ -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
 
@@ -37,7 +37,6 @@ module Quake::Timesheets
37
37
  # Unique identifier of the activity this Entry relates to
38
38
  attr_accessor :external_reference
39
39
 
40
- # The Tags attached to this entry.
41
40
  attr_accessor :tags
42
41
 
43
42
  # Time at which the record was created
@@ -101,7 +100,7 @@ module Quake::Timesheets
101
100
  :'quantity' => :'Float',
102
101
  :'unit' => :'String',
103
102
  :'external_reference' => :'String',
104
- :'tags' => :'Array<String>',
103
+ :'tags' => :'Array<EntryTags>',
105
104
  :'created_at' => :'String',
106
105
  :'updated_at' => :'String'
107
106
  }
@@ -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
@@ -20,5 +20,5 @@ OpenAPI Generator version: 5.1.0
20
20
  end
21
21
 
22
22
  module Quake::Timesheets
23
- VERSION = '0.1.5'
23
+ VERSION = '0.1.6'
24
24
  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.5
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.5
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-11 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
@@ -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,6 +99,7 @@ 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
@@ -126,6 +128,7 @@ files:
126
128
  - spec/models/create_people_input_spec.rb
127
129
  - spec/models/dataset_spec.rb
128
130
  - spec/models/entry_spec.rb
131
+ - spec/models/entry_tags_spec.rb
129
132
  - spec/models/person_spec.rb
130
133
  - spec/models/update_entries_input_spec.rb
131
134
  - spec/spec_helper.rb
@@ -161,6 +164,7 @@ test_files:
161
164
  - spec/api_client_spec.rb
162
165
  - spec/configuration_spec.rb
163
166
  - spec/models/approval_type_spec.rb
167
+ - spec/models/entry_tags_spec.rb
164
168
  - spec/models/approval_spec.rb
165
169
  - spec/models/create_datasets_input_spec.rb
166
170
  - spec/models/entry_spec.rb