bombbomb 2.0.0 → 2.0.831

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/README.md +16 -9
  4. data/Rakefile +8 -3
  5. data/bombbomb.gemspec +8 -17
  6. data/docs/AutomationsApi.md +52 -0
  7. data/docs/ClientGroupAssetMetaData.md +11 -0
  8. data/docs/InlineResponse200.md +1 -1
  9. data/docs/JerichoConfiguration.md +1 -0
  10. data/docs/PromptMonthlyPerformance.md +11 -0
  11. data/docs/PromptOverview.md +11 -0
  12. data/docs/PromptsApi.md +53 -1
  13. data/docs/TeamsApi.md +103 -5
  14. data/docs/UsersApi.md +100 -0
  15. data/git_push.sh +1 -13
  16. data/lib/bombbomb.rb +6 -14
  17. data/lib/bombbomb/api/accounts_api.rb +41 -68
  18. data/lib/bombbomb/api/automations_api.rb +71 -30
  19. data/lib/bombbomb/api/contacts_api.rb +47 -76
  20. data/lib/bombbomb/api/curriculum_api.rb +8 -27
  21. data/lib/bombbomb/api/emails_api.rb +53 -96
  22. data/lib/bombbomb/api/files_api.rb +32 -53
  23. data/lib/bombbomb/api/forms_api.rb +8 -21
  24. data/lib/bombbomb/api/integrations_api.rb +26 -51
  25. data/lib/bombbomb/api/lists_api.rb +32 -53
  26. data/lib/bombbomb/api/orders_api.rb +8 -21
  27. data/lib/bombbomb/api/prompts_api.rb +177 -139
  28. data/lib/bombbomb/api/socials_api.rb +80 -111
  29. data/lib/bombbomb/api/teams_api.rb +294 -209
  30. data/lib/bombbomb/api/users_api.rb +119 -0
  31. data/lib/bombbomb/api/utilities_api.rb +23 -44
  32. data/lib/bombbomb/api/videos_api.rb +38 -55
  33. data/lib/bombbomb/api/webhooks_api.rb +23 -50
  34. data/lib/bombbomb/api_client.rb +55 -45
  35. data/lib/bombbomb/api_error.rb +9 -18
  36. data/lib/bombbomb/configuration.rb +8 -13
  37. data/lib/bombbomb/models/bb_web_hook.rb +6 -17
  38. data/lib/bombbomb/models/client_group_asset_meta_data.rb +215 -0
  39. data/lib/bombbomb/models/curriculum.rb +6 -17
  40. data/lib/bombbomb/models/curriculum_user_progress.rb +6 -17
  41. data/lib/bombbomb/models/curriculum_with_progress.rb +6 -17
  42. data/lib/bombbomb/models/hosted_doc.rb +6 -17
  43. data/lib/bombbomb/models/inline_response_200.rb +7 -18
  44. data/lib/bombbomb/models/jericho_configuration.rb +24 -21
  45. data/lib/bombbomb/models/jericho_performance.rb +6 -17
  46. data/lib/bombbomb/models/o_auth_client.rb +6 -17
  47. data/lib/bombbomb/models/prompt_bot.rb +6 -17
  48. data/lib/bombbomb/models/prompt_monthly_performance.rb +219 -0
  49. data/lib/bombbomb/models/prompt_overview.rb +219 -0
  50. data/lib/bombbomb/models/prompt_social_prompt.rb +6 -17
  51. data/lib/bombbomb/models/sign_upload_request.rb +6 -17
  52. data/lib/bombbomb/models/sign_upload_response.rb +6 -17
  53. data/lib/bombbomb/models/string.rb +6 -17
  54. data/lib/bombbomb/models/team_public_representation.rb +6 -17
  55. data/lib/bombbomb/models/video_email_prompt.rb +6 -17
  56. data/lib/bombbomb/models/video_encoding_status_response.rb +6 -17
  57. data/lib/bombbomb/models/video_public_representation.rb +6 -17
  58. data/lib/bombbomb/models/video_recorder_method_response.rb +6 -17
  59. data/lib/bombbomb/version.rb +3 -14
  60. data/spec/api/users_api_spec.rb +57 -0
  61. data/spec/models/{inline_response_200_items_spec.rb → client_group_asset_meta_data_spec.rb} +8 -19
  62. data/spec/models/prompt_monthly_performance_spec.rb +60 -0
  63. data/spec/models/prompt_overview_spec.rb +60 -0
  64. metadata +31 -19
  65. data/spec/models/prompt_bot_bot_spec.rb +0 -113
@@ -3,21 +3,10 @@
3
3
 
4
4
  #We make it easy to build relationships using simple videos.
5
5
 
6
- OpenAPI spec version: 2.0.0
6
+ OpenAPI spec version: 2.0.831
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
-
10
- Licensed under the Apache License, Version 2.0 (the "License");
11
- you may not use this file except in compliance with the License.
12
- You may obtain a copy of the License at
13
-
14
- http://www.apache.org/licenses/LICENSE-2.0
15
-
16
- Unless required by applicable law or agreed to in writing, software
17
- distributed under the License is distributed on an "AS IS" BASIS,
18
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- See the License for the specific language governing permissions and
20
- limitations under the License.
9
+ Swagger Codegen version: 2.3.1
21
10
 
22
11
  =end
23
12
 
@@ -104,7 +93,7 @@ module BombBomb
104
93
  end
105
94
 
106
95
  # Show invalid properties with the reasons. Usually used together with valid?
107
- # @return Array for valid properies with the reasons
96
+ # @return Array for valid properties with the reasons
108
97
  def list_invalid_properties
109
98
  invalid_properties = Array.new
110
99
  return invalid_properties
@@ -147,7 +136,7 @@ module BombBomb
147
136
  def build_from_hash(attributes)
148
137
  return nil unless attributes.is_a?(Hash)
149
138
  self.class.swagger_types.each_pair do |key, type|
150
- if type =~ /^Array<(.*)>/i
139
+ if type =~ /\AArray<(.*)>/i
151
140
  # check to ensure the input is an array given that the the attribute
152
141
  # is documented as an array but the input is not
153
142
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -178,7 +167,7 @@ module BombBomb
178
167
  when :Float
179
168
  value.to_f
180
169
  when :BOOLEAN
181
- if value.to_s =~ /^(true|t|yes|y|1)$/i
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
171
  true
183
172
  else
184
173
  false
@@ -189,7 +178,7 @@ module BombBomb
189
178
  when /\AArray<(?<inner_type>.+)>\z/
190
179
  inner_type = Regexp.last_match[:inner_type]
191
180
  value.map { |v| _deserialize(inner_type, v) }
192
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
182
  k_type = Regexp.last_match[:k_type]
194
183
  v_type = Regexp.last_match[:v_type]
195
184
  {}.tap do |hash|
@@ -3,21 +3,10 @@
3
3
 
4
4
  #We make it easy to build relationships using simple videos.
5
5
 
6
- OpenAPI spec version: 2.0.0
6
+ OpenAPI spec version: 2.0.831
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
-
10
- Licensed under the Apache License, Version 2.0 (the "License");
11
- you may not use this file except in compliance with the License.
12
- You may obtain a copy of the License at
13
-
14
- http://www.apache.org/licenses/LICENSE-2.0
15
-
16
- Unless required by applicable law or agreed to in writing, software
17
- distributed under the License is distributed on an "AS IS" BASIS,
18
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- See the License for the specific language governing permissions and
20
- limitations under the License.
9
+ Swagger Codegen version: 2.3.1
21
10
 
22
11
  =end
23
12
 
@@ -185,7 +174,7 @@ module BombBomb
185
174
  end
186
175
 
187
176
  # Show invalid properties with the reasons. Usually used together with valid?
188
- # @return Array for valid properies with the reasons
177
+ # @return Array for valid properties with the reasons
189
178
  def list_invalid_properties
190
179
  invalid_properties = Array.new
191
180
  return invalid_properties
@@ -237,7 +226,7 @@ module BombBomb
237
226
  def build_from_hash(attributes)
238
227
  return nil unless attributes.is_a?(Hash)
239
228
  self.class.swagger_types.each_pair do |key, type|
240
- if type =~ /^Array<(.*)>/i
229
+ if type =~ /\AArray<(.*)>/i
241
230
  # check to ensure the input is an array given that the the attribute
242
231
  # is documented as an array but the input is not
243
232
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -268,7 +257,7 @@ module BombBomb
268
257
  when :Float
269
258
  value.to_f
270
259
  when :BOOLEAN
271
- if value.to_s =~ /^(true|t|yes|y|1)$/i
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
272
261
  true
273
262
  else
274
263
  false
@@ -279,7 +268,7 @@ module BombBomb
279
268
  when /\AArray<(?<inner_type>.+)>\z/
280
269
  inner_type = Regexp.last_match[:inner_type]
281
270
  value.map { |v| _deserialize(inner_type, v) }
282
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
283
272
  k_type = Regexp.last_match[:k_type]
284
273
  v_type = Regexp.last_match[:v_type]
285
274
  {}.tap do |hash|
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0.831
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module BombBomb
16
+ # The PromptMonthlyPerformance class
17
+ class PromptMonthlyPerformance
18
+ # The startDate property
19
+ attr_accessor :start_date
20
+
21
+ # The endDate property
22
+ attr_accessor :end_date
23
+
24
+ # The userBatchListsIdHelper property
25
+ attr_accessor :user_batch_lists_id_helper
26
+
27
+ # The promptIdHelper property
28
+ attr_accessor :prompt_id_helper
29
+
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'start_date' => :'startDate',
35
+ :'end_date' => :'endDate',
36
+ :'user_batch_lists_id_helper' => :'userBatchListsIdHelper',
37
+ :'prompt_id_helper' => :'promptIdHelper'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.swagger_types
43
+ {
44
+ :'start_date' => :'String',
45
+ :'end_date' => :'String',
46
+ :'user_batch_lists_id_helper' => :'String',
47
+ :'prompt_id_helper' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'startDate')
60
+ self.start_date = attributes[:'startDate']
61
+ end
62
+
63
+ if attributes.has_key?(:'endDate')
64
+ self.end_date = attributes[:'endDate']
65
+ end
66
+
67
+ if attributes.has_key?(:'userBatchListsIdHelper')
68
+ self.user_batch_lists_id_helper = attributes[:'userBatchListsIdHelper']
69
+ end
70
+
71
+ if attributes.has_key?(:'promptIdHelper')
72
+ self.prompt_id_helper = attributes[:'promptIdHelper']
73
+ end
74
+
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ invalid_properties = Array.new
81
+ return invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ start_date == o.start_date &&
96
+ end_date == o.end_date &&
97
+ user_batch_lists_id_helper == o.user_batch_lists_id_helper &&
98
+ prompt_id_helper == o.prompt_id_helper
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Fixnum] Hash code
109
+ def hash
110
+ [start_date, end_date, user_batch_lists_id_helper, prompt_id_helper].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def build_from_hash(attributes)
117
+ return nil unless attributes.is_a?(Hash)
118
+ self.class.swagger_types.each_pair do |key, type|
119
+ if type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
124
+ end
125
+ elsif !attributes[self.class.attribute_map[key]].nil?
126
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
129
+
130
+ self
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def _deserialize(type, value)
138
+ case type.to_sym
139
+ when :DateTime
140
+ DateTime.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :BOOLEAN
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ temp_model = BombBomb.const_get(type).new
171
+ temp_model.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ next if value.nil?
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
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0.831
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module BombBomb
16
+ # The PromptOverview class
17
+ class PromptOverview
18
+ # The startDate property
19
+ attr_accessor :start_date
20
+
21
+ # The endDate property
22
+ attr_accessor :end_date
23
+
24
+ # The userBatchListsIdHelper property
25
+ attr_accessor :user_batch_lists_id_helper
26
+
27
+ # The promptIdHelper property
28
+ attr_accessor :prompt_id_helper
29
+
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'start_date' => :'startDate',
35
+ :'end_date' => :'endDate',
36
+ :'user_batch_lists_id_helper' => :'userBatchListsIdHelper',
37
+ :'prompt_id_helper' => :'promptIdHelper'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.swagger_types
43
+ {
44
+ :'start_date' => :'String',
45
+ :'end_date' => :'String',
46
+ :'user_batch_lists_id_helper' => :'String',
47
+ :'prompt_id_helper' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'startDate')
60
+ self.start_date = attributes[:'startDate']
61
+ end
62
+
63
+ if attributes.has_key?(:'endDate')
64
+ self.end_date = attributes[:'endDate']
65
+ end
66
+
67
+ if attributes.has_key?(:'userBatchListsIdHelper')
68
+ self.user_batch_lists_id_helper = attributes[:'userBatchListsIdHelper']
69
+ end
70
+
71
+ if attributes.has_key?(:'promptIdHelper')
72
+ self.prompt_id_helper = attributes[:'promptIdHelper']
73
+ end
74
+
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ invalid_properties = Array.new
81
+ return invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ start_date == o.start_date &&
96
+ end_date == o.end_date &&
97
+ user_batch_lists_id_helper == o.user_batch_lists_id_helper &&
98
+ prompt_id_helper == o.prompt_id_helper
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Fixnum] Hash code
109
+ def hash
110
+ [start_date, end_date, user_batch_lists_id_helper, prompt_id_helper].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def build_from_hash(attributes)
117
+ return nil unless attributes.is_a?(Hash)
118
+ self.class.swagger_types.each_pair do |key, type|
119
+ if type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
124
+ end
125
+ elsif !attributes[self.class.attribute_map[key]].nil?
126
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
129
+
130
+ self
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def _deserialize(type, value)
138
+ case type.to_sym
139
+ when :DateTime
140
+ DateTime.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :BOOLEAN
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ temp_model = BombBomb.const_get(type).new
171
+ temp_model.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ next if value.nil?
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