bullet_train_test 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +123 -0
  4. data/Rakefile +10 -0
  5. data/bullet_train_test.gemspec +38 -0
  6. data/docs/ApiV1GoalSerializer.md +18 -0
  7. data/docs/ApiV1GoalSerializerData.md +24 -0
  8. data/docs/ApiV1GoalSerializerDataAttributes.md +26 -0
  9. data/docs/ApiV1GoalSerializerDataRelationships.md +18 -0
  10. data/docs/ApiV1ProjectSerializer.md +18 -0
  11. data/docs/ApiV1ProjectSerializerData.md +24 -0
  12. data/docs/ApiV1ProjectSerializerDataAttributes.md +32 -0
  13. data/docs/ApiV1ProjectsTagSerializer.md +18 -0
  14. data/docs/ApiV1ProjectsTagSerializerData.md +24 -0
  15. data/docs/ApiV1ProjectsTagSerializerDataAttributes.md +26 -0
  16. data/docs/ApiV1ProjectsTagSerializerDataRelationships.md +18 -0
  17. data/docs/ApiV1ProjectsTagSerializerDataRelationshipsTeam.md +18 -0
  18. data/docs/ApiV1ProjectsTagSerializerDataRelationshipsTeamData.md +20 -0
  19. data/docs/ApiV1TeamSerializer.md +18 -0
  20. data/docs/ApiV1TeamSerializerData.md +24 -0
  21. data/docs/ApiV1TeamSerializerDataAttributes.md +28 -0
  22. data/docs/ApiV1TeamSerializerDataRelationships.md +18 -0
  23. data/docs/ApiV1TeamSerializerDataRelationshipsScaffoldingAbsolutelyAbstractCreativeConcepts.md +18 -0
  24. data/docs/GoalsApi.md +205 -0
  25. data/docs/MeApi.md +66 -0
  26. data/docs/ProjectsApi.md +472 -0
  27. data/docs/TeamsApi.md +628 -0
  28. data/git_push.sh +57 -0
  29. data/lib/bullet_train_test/api/goals_api.rb +210 -0
  30. data/lib/bullet_train_test/api/me_api.rb +73 -0
  31. data/lib/bullet_train_test/api/projects_api.rb +466 -0
  32. data/lib/bullet_train_test/api/teams_api.rb +611 -0
  33. data/lib/bullet_train_test/api_client.rb +389 -0
  34. data/lib/bullet_train_test/api_error.rb +57 -0
  35. data/lib/bullet_train_test/configuration.rb +271 -0
  36. data/lib/bullet_train_test/models/api_v1_goal_serializer.rb +219 -0
  37. data/lib/bullet_train_test/models/api_v1_goal_serializer_data.rb +245 -0
  38. data/lib/bullet_train_test/models/api_v1_goal_serializer_data_attributes.rb +254 -0
  39. data/lib/bullet_train_test/models/api_v1_goal_serializer_data_relationships.rb +218 -0
  40. data/lib/bullet_train_test/models/api_v1_project_serializer.rb +219 -0
  41. data/lib/bullet_train_test/models/api_v1_project_serializer_data.rb +245 -0
  42. data/lib/bullet_train_test/models/api_v1_project_serializer_data_attributes.rb +281 -0
  43. data/lib/bullet_train_test/models/api_v1_projects_tag_serializer.rb +219 -0
  44. data/lib/bullet_train_test/models/api_v1_projects_tag_serializer_data.rb +245 -0
  45. data/lib/bullet_train_test/models/api_v1_projects_tag_serializer_data_attributes.rb +254 -0
  46. data/lib/bullet_train_test/models/api_v1_projects_tag_serializer_data_relationships.rb +218 -0
  47. data/lib/bullet_train_test/models/api_v1_projects_tag_serializer_data_relationships_team.rb +218 -0
  48. data/lib/bullet_train_test/models/api_v1_projects_tag_serializer_data_relationships_team_data.rb +227 -0
  49. data/lib/bullet_train_test/models/api_v1_team_serializer.rb +219 -0
  50. data/lib/bullet_train_test/models/api_v1_team_serializer_data.rb +245 -0
  51. data/lib/bullet_train_test/models/api_v1_team_serializer_data_attributes.rb +263 -0
  52. data/lib/bullet_train_test/models/api_v1_team_serializer_data_relationships.rb +218 -0
  53. data/lib/bullet_train_test/models/api_v1_team_serializer_data_relationships_scaffolding_absolutely_abstract_creative_concepts.rb +220 -0
  54. data/lib/bullet_train_test/version.rb +15 -0
  55. data/lib/bullet_train_test.rb +61 -0
  56. data/spec/api/goals_api_spec.rb +69 -0
  57. data/spec/api/me_api_spec.rb +44 -0
  58. data/spec/api/projects_api_spec.rb +115 -0
  59. data/spec/api/teams_api_spec.rb +144 -0
  60. data/spec/api_client_spec.rb +226 -0
  61. data/spec/configuration_spec.rb +42 -0
  62. data/spec/models/api_v1_goal_serializer_data_attributes_spec.rb +58 -0
  63. data/spec/models/api_v1_goal_serializer_data_relationships_spec.rb +34 -0
  64. data/spec/models/api_v1_goal_serializer_data_spec.rb +52 -0
  65. data/spec/models/api_v1_goal_serializer_spec.rb +34 -0
  66. data/spec/models/api_v1_project_serializer_data_attributes_spec.rb +76 -0
  67. data/spec/models/api_v1_project_serializer_data_spec.rb +52 -0
  68. data/spec/models/api_v1_project_serializer_spec.rb +34 -0
  69. data/spec/models/api_v1_projects_tag_serializer_data_attributes_spec.rb +58 -0
  70. data/spec/models/api_v1_projects_tag_serializer_data_relationships_spec.rb +34 -0
  71. data/spec/models/api_v1_projects_tag_serializer_data_relationships_team_data_spec.rb +40 -0
  72. data/spec/models/api_v1_projects_tag_serializer_data_relationships_team_spec.rb +34 -0
  73. data/spec/models/api_v1_projects_tag_serializer_data_spec.rb +52 -0
  74. data/spec/models/api_v1_projects_tag_serializer_spec.rb +34 -0
  75. data/spec/models/api_v1_team_serializer_data_attributes_spec.rb +64 -0
  76. data/spec/models/api_v1_team_serializer_data_relationships_scaffolding_absolutely_abstract_creative_concepts_spec.rb +34 -0
  77. data/spec/models/api_v1_team_serializer_data_relationships_spec.rb +34 -0
  78. data/spec/models/api_v1_team_serializer_data_spec.rb +52 -0
  79. data/spec/models/api_v1_team_serializer_spec.rb +34 -0
  80. data/spec/spec_helper.rb +111 -0
  81. metadata +187 -0
@@ -0,0 +1,281 @@
1
+ =begin
2
+ #Bullet Train Test
3
+
4
+ #You can update this description in `config/locales/en/application.en.yml`.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BulletTrainTest
17
+ class ApiV1ProjectSerializerDataAttributes
18
+ attr_accessor :id
19
+
20
+ attr_accessor :team_id
21
+
22
+ attr_accessor :name
23
+
24
+ attr_accessor :status
25
+
26
+ attr_accessor :lead_id
27
+
28
+ attr_accessor :tag_ids
29
+
30
+ attr_accessor :created_at
31
+
32
+ attr_accessor :updated_at
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'id' => :'id',
38
+ :'team_id' => :'team_id',
39
+ :'name' => :'name',
40
+ :'status' => :'status',
41
+ :'lead_id' => :'lead_id',
42
+ :'tag_ids' => :'tag_ids',
43
+ :'created_at' => :'created_at',
44
+ :'updated_at' => :'updated_at'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'id' => :'Integer',
57
+ :'team_id' => :'Integer',
58
+ :'name' => :'String',
59
+ :'status' => :'String',
60
+ :'lead_id' => :'Integer',
61
+ :'tag_ids' => :'String',
62
+ :'created_at' => :'Time',
63
+ :'updated_at' => :'Time'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BulletTrainTest::ApiV1ProjectSerializerDataAttributes` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BulletTrainTest::ApiV1ProjectSerializerDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'id')
89
+ self.id = attributes[:'id']
90
+ end
91
+
92
+ if attributes.key?(:'team_id')
93
+ self.team_id = attributes[:'team_id']
94
+ end
95
+
96
+ if attributes.key?(:'name')
97
+ self.name = attributes[:'name']
98
+ end
99
+
100
+ if attributes.key?(:'status')
101
+ self.status = attributes[:'status']
102
+ end
103
+
104
+ if attributes.key?(:'lead_id')
105
+ self.lead_id = attributes[:'lead_id']
106
+ end
107
+
108
+ if attributes.key?(:'tag_ids')
109
+ self.tag_ids = attributes[:'tag_ids']
110
+ end
111
+
112
+ if attributes.key?(:'created_at')
113
+ self.created_at = attributes[:'created_at']
114
+ end
115
+
116
+ if attributes.key?(:'updated_at')
117
+ self.updated_at = attributes[:'updated_at']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ id == o.id &&
140
+ team_id == o.team_id &&
141
+ name == o.name &&
142
+ status == o.status &&
143
+ lead_id == o.lead_id &&
144
+ tag_ids == o.tag_ids &&
145
+ created_at == o.created_at &&
146
+ updated_at == o.updated_at
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [id, team_id, name, status, lead_id, tag_ids, created_at, updated_at].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ new.build_from_hash(attributes)
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ self.class.openapi_types.each_pair do |key, type|
174
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
+ self.send("#{key}=", nil)
176
+ elsif type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
180
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
181
+ end
182
+ elsif !attributes[self.class.attribute_map[key]].nil?
183
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
+ end
185
+ end
186
+
187
+ self
188
+ end
189
+
190
+ # Deserializes the data based on type
191
+ # @param string type Data type
192
+ # @param string value Value to be deserialized
193
+ # @return [Object] Deserialized data
194
+ def _deserialize(type, value)
195
+ case type.to_sym
196
+ when :Time
197
+ Time.parse(value)
198
+ when :Date
199
+ Date.parse(value)
200
+ when :String
201
+ value.to_s
202
+ when :Integer
203
+ value.to_i
204
+ when :Float
205
+ value.to_f
206
+ when :Boolean
207
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
208
+ true
209
+ else
210
+ false
211
+ end
212
+ when :Object
213
+ # generic object (usually a Hash), return directly
214
+ value
215
+ when /\AArray<(?<inner_type>.+)>\z/
216
+ inner_type = Regexp.last_match[:inner_type]
217
+ value.map { |v| _deserialize(inner_type, v) }
218
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
219
+ k_type = Regexp.last_match[:k_type]
220
+ v_type = Regexp.last_match[:v_type]
221
+ {}.tap do |hash|
222
+ value.each do |k, v|
223
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
224
+ end
225
+ end
226
+ else # model
227
+ # models (e.g. Pet) or oneOf
228
+ klass = BulletTrainTest.const_get(type)
229
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
230
+ end
231
+ end
232
+
233
+ # Returns the string representation of the object
234
+ # @return [String] String presentation of the object
235
+ def to_s
236
+ to_hash.to_s
237
+ end
238
+
239
+ # to_body is an alias to to_hash (backward compatibility)
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_body
242
+ to_hash
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ if value.nil?
252
+ is_nullable = self.class.openapi_nullable.include?(attr)
253
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
+ end
255
+
256
+ hash[param] = _to_hash(value)
257
+ end
258
+ hash
259
+ end
260
+
261
+ # Outputs non-array value in the form of hash
262
+ # For object, use to_hash. Otherwise, just return the value
263
+ # @param [Object] value Any valid value
264
+ # @return [Hash] Returns the value in the form of hash
265
+ def _to_hash(value)
266
+ if value.is_a?(Array)
267
+ value.compact.map { |v| _to_hash(v) }
268
+ elsif value.is_a?(Hash)
269
+ {}.tap do |hash|
270
+ value.each { |k, v| hash[k] = _to_hash(v) }
271
+ end
272
+ elsif value.respond_to? :to_hash
273
+ value.to_hash
274
+ else
275
+ value
276
+ end
277
+ end
278
+
279
+ end
280
+
281
+ end
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #Bullet Train Test
3
+
4
+ #You can update this description in `config/locales/en/application.en.yml`.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BulletTrainTest
17
+ # Api_V1_Projects_TagSerializer model
18
+ class ApiV1ProjectsTagSerializer
19
+ attr_accessor :data
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'data' => :'data'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'data' => :'ApiV1ProjectsTagSerializerData'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BulletTrainTest::ApiV1ProjectsTagSerializer` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BulletTrainTest::ApiV1ProjectsTagSerializer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'data')
62
+ self.data = attributes[:'data']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ data == o.data
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [data].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = BulletTrainTest.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end