freeclimb 1.0.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +4 -5
  4. data/docs/AccountRequest.md +1 -3
  5. data/docs/ApplicationRequest.md +1 -3
  6. data/docs/BuyIncomingNumberRequest.md +1 -3
  7. data/docs/CreateConferenceRequest.md +1 -3
  8. data/docs/DefaultApi.md +6 -14
  9. data/docs/FilterLogsRequest.md +1 -3
  10. data/docs/IncomingNumberRequest.md +1 -3
  11. data/docs/MakeCallRequest.md +0 -2
  12. data/docs/MessageRequest.md +0 -2
  13. data/docs/MessageRequestAllOf.md +0 -2
  14. data/docs/QueueRequest.md +1 -3
  15. data/docs/UpdateCallRequest.md +1 -3
  16. data/docs/UpdateConferenceParticipantRequest.md +1 -3
  17. data/docs/UpdateConferenceRequest.md +1 -3
  18. data/lib/freeclimb.rb +0 -1
  19. data/lib/freeclimb/api/default_api.rb +2 -10
  20. data/lib/freeclimb/api_client.rb +1 -1
  21. data/lib/freeclimb/models/account_request.rb +4 -14
  22. data/lib/freeclimb/models/application_request.rb +4 -14
  23. data/lib/freeclimb/models/buy_incoming_number_request.rb +4 -14
  24. data/lib/freeclimb/models/create_conference_request.rb +4 -14
  25. data/lib/freeclimb/models/filter_logs_request.rb +4 -14
  26. data/lib/freeclimb/models/incoming_number_request.rb +4 -14
  27. data/lib/freeclimb/models/make_call_request.rb +1 -11
  28. data/lib/freeclimb/models/message_request.rb +1 -11
  29. data/lib/freeclimb/models/message_request_all_of.rb +1 -11
  30. data/lib/freeclimb/models/queue_request.rb +4 -14
  31. data/lib/freeclimb/models/update_call_request.rb +4 -14
  32. data/lib/freeclimb/models/update_conference_participant_request.rb +4 -14
  33. data/lib/freeclimb/models/update_conference_request.rb +4 -14
  34. data/lib/freeclimb/version.rb +1 -1
  35. data/spec/api/default_api_spec.rb +2 -10
  36. metadata +2 -6
  37. data/docs/DequeueMemberRequest.md +0 -17
  38. data/lib/freeclimb/models/dequeue_member_request.rb +0 -207
  39. data/spec/models/dequeue_member_request_spec.rb +0 -34
@@ -20,15 +20,11 @@ module Freeclimb
20
20
  # Maximum number of calls this queue can hold. Default is 100. Maximum is 1000. **Note:** Reducing the maxSize of a Queue causes the Queue to reject incoming requests until it shrinks below the new value of maxSize.
21
21
  attr_accessor :max_size
22
22
 
23
- # RequestId for this request, starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request include this requestId. If this parameter is not provided, FreeClimb generates a requestId and returns it as a header in the response (e.g., X-Pulse-Request-Id: <requestId>).
24
- attr_accessor :request_id
25
-
26
23
  # Attribute mapping from ruby-style variable name to JSON key.
27
24
  def self.attribute_map
28
25
  {
29
26
  :'_alias' => :'alias',
30
- :'max_size' => :'maxSize',
31
- :'request_id' => :'requestId'
27
+ :'max_size' => :'maxSize'
32
28
  }
33
29
  end
34
30
 
@@ -36,8 +32,7 @@ module Freeclimb
36
32
  def self.openapi_types
37
33
  {
38
34
  :'_alias' => :'String',
39
- :'max_size' => :'Integer',
40
- :'request_id' => :'String'
35
+ :'max_size' => :'Integer'
41
36
  }
42
37
  end
43
38
 
@@ -69,10 +64,6 @@ module Freeclimb
69
64
  if attributes.key?(:'max_size')
70
65
  self.max_size = attributes[:'max_size']
71
66
  end
72
-
73
- if attributes.key?(:'request_id')
74
- self.request_id = attributes[:'request_id']
75
- end
76
67
  end
77
68
 
78
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -94,8 +85,7 @@ module Freeclimb
94
85
  return true if self.equal?(o)
95
86
  self.class == o.class &&
96
87
  _alias == o._alias &&
97
- max_size == o.max_size &&
98
- request_id == o.request_id
88
+ max_size == o.max_size
99
89
  end
100
90
 
101
91
  # @see the `==` method
@@ -107,7 +97,7 @@ module Freeclimb
107
97
  # Calculates hash code according to all attributes.
108
98
  # @return [Integer] Hash code
109
99
  def hash
110
- [_alias, max_size, request_id].hash
100
+ [_alias, max_size].hash
111
101
  end
112
102
 
113
103
  # Builds the object from hash
@@ -17,9 +17,6 @@ module Freeclimb
17
17
  # Either `canceled` or `completed`. Specifying `canceled` attempts to hang up calls that are queued without affecting calls already in progress. Specifying `completed` attempts to hang up a call already in progress.
18
18
  attr_accessor :status
19
19
 
20
- # RequestId for this request starting with prefix `RQ` followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request will include this requestId. If it is not provided, FreeClimb will generate a requestId and return it as a header in the response (e.g. `X-Pulse-Request-Id: <requestId>`).
21
- attr_accessor :request_id
22
-
23
20
  class EnumAttributeValidator
24
21
  attr_reader :datatype
25
22
  attr_reader :allowable_values
@@ -45,16 +42,14 @@ module Freeclimb
45
42
  # Attribute mapping from ruby-style variable name to JSON key.
46
43
  def self.attribute_map
47
44
  {
48
- :'status' => :'status',
49
- :'request_id' => :'requestId'
45
+ :'status' => :'status'
50
46
  }
51
47
  end
52
48
 
53
49
  # Attribute type mapping.
54
50
  def self.openapi_types
55
51
  {
56
- :'status' => :'String',
57
- :'request_id' => :'String'
52
+ :'status' => :'String'
58
53
  }
59
54
  end
60
55
 
@@ -82,10 +77,6 @@ module Freeclimb
82
77
  if attributes.key?(:'status')
83
78
  self.status = attributes[:'status']
84
79
  end
85
-
86
- if attributes.key?(:'request_id')
87
- self.request_id = attributes[:'request_id']
88
- end
89
80
  end
90
81
 
91
82
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -123,8 +114,7 @@ module Freeclimb
123
114
  def ==(o)
124
115
  return true if self.equal?(o)
125
116
  self.class == o.class &&
126
- status == o.status &&
127
- request_id == o.request_id
117
+ status == o.status
128
118
  end
129
119
 
130
120
  # @see the `==` method
@@ -136,7 +126,7 @@ module Freeclimb
136
126
  # Calculates hash code according to all attributes.
137
127
  # @return [Integer] Hash code
138
128
  def hash
139
- [status, request_id].hash
129
+ [status].hash
140
130
  end
141
131
 
142
132
  # Builds the object from hash
@@ -20,15 +20,11 @@ module Freeclimb
20
20
  # (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value.
21
21
  attr_accessor :listen
22
22
 
23
- # ID of this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request include this requestId. If this value is not provided, FreeClimb generates a requestId and returns it as a header in the response (e.g., X-Pulse-Request-Id: <requestId>).
24
- attr_accessor :request_id
25
-
26
23
  # Attribute mapping from ruby-style variable name to JSON key.
27
24
  def self.attribute_map
28
25
  {
29
26
  :'talk' => :'talk',
30
- :'listen' => :'listen',
31
- :'request_id' => :'requestId'
27
+ :'listen' => :'listen'
32
28
  }
33
29
  end
34
30
 
@@ -36,8 +32,7 @@ module Freeclimb
36
32
  def self.openapi_types
37
33
  {
38
34
  :'talk' => :'Boolean',
39
- :'listen' => :'Boolean',
40
- :'request_id' => :'String'
35
+ :'listen' => :'Boolean'
41
36
  }
42
37
  end
43
38
 
@@ -69,10 +64,6 @@ module Freeclimb
69
64
  if attributes.key?(:'listen')
70
65
  self.listen = attributes[:'listen']
71
66
  end
72
-
73
- if attributes.key?(:'request_id')
74
- self.request_id = attributes[:'request_id']
75
- end
76
67
  end
77
68
 
78
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -94,8 +85,7 @@ module Freeclimb
94
85
  return true if self.equal?(o)
95
86
  self.class == o.class &&
96
87
  talk == o.talk &&
97
- listen == o.listen &&
98
- request_id == o.request_id
88
+ listen == o.listen
99
89
  end
100
90
 
101
91
  # @see the `==` method
@@ -107,7 +97,7 @@ module Freeclimb
107
97
  # Calculates hash code according to all attributes.
108
98
  # @return [Integer] Hash code
109
99
  def hash
110
- [talk, listen, request_id].hash
100
+ [talk, listen].hash
111
101
  end
112
102
 
113
103
  # Builds the object from hash
@@ -23,9 +23,6 @@ module Freeclimb
23
23
  # New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.**
24
24
  attr_accessor :status
25
25
 
26
- # ID for this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request will include this requestId. If it is not provided, FreeClimb will generate a requestId and return it as a header in the response (e.g. X-Pulse-Request-Id: <requestId>).
27
- attr_accessor :request_id
28
-
29
26
  class EnumAttributeValidator
30
27
  attr_reader :datatype
31
28
  attr_reader :allowable_values
@@ -53,8 +50,7 @@ module Freeclimb
53
50
  {
54
51
  :'_alias' => :'alias',
55
52
  :'play_beep' => :'playBeep',
56
- :'status' => :'status',
57
- :'request_id' => :'requestId'
53
+ :'status' => :'status'
58
54
  }
59
55
  end
60
56
 
@@ -63,8 +59,7 @@ module Freeclimb
63
59
  {
64
60
  :'_alias' => :'String',
65
61
  :'play_beep' => :'String',
66
- :'status' => :'String',
67
- :'request_id' => :'String'
62
+ :'status' => :'String'
68
63
  }
69
64
  end
70
65
 
@@ -102,10 +97,6 @@ module Freeclimb
102
97
  if attributes.key?(:'status')
103
98
  self.status = attributes[:'status']
104
99
  end
105
-
106
- if attributes.key?(:'request_id')
107
- self.request_id = attributes[:'request_id']
108
- end
109
100
  end
110
101
 
111
102
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -140,8 +131,7 @@ module Freeclimb
140
131
  self.class == o.class &&
141
132
  _alias == o._alias &&
142
133
  play_beep == o.play_beep &&
143
- status == o.status &&
144
- request_id == o.request_id
134
+ status == o.status
145
135
  end
146
136
 
147
137
  # @see the `==` method
@@ -153,7 +143,7 @@ module Freeclimb
153
143
  # Calculates hash code according to all attributes.
154
144
  # @return [Integer] Hash code
155
145
  def hash
156
- [_alias, play_beep, status, request_id].hash
146
+ [_alias, play_beep, status].hash
157
147
  end
158
148
 
159
149
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module Freeclimb
14
- VERSION = '1.0.3'
14
+ VERSION = '2.0.0'
15
15
  end
@@ -221,7 +221,6 @@ describe 'DefaultApi' do
221
221
  # @param queue_id String that uniquely identifies the Queue that the Member belongs to.
222
222
  # @param call_id ID if the Call that the Member belongs to
223
223
  # @param [Hash] opts the optional parameters
224
- # @option opts [DequeueMemberRequest] :dequeue_member_request Dequeue member request details
225
224
  # @return [QueueMember]
226
225
  describe 'dequeue_a_member test' do
227
226
  before do
@@ -229,11 +228,8 @@ describe 'DefaultApi' do
229
228
  @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
230
229
  queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
231
230
  call_id = 'MOCK_CALL_ID' # String | ID if the Call that the Member belongs to
232
- opts = {
233
- dequeue_member_request: Freeclimb::DequeueMemberRequest.new # DequeueMemberRequest | Dequeue member request details
234
- }
235
231
 
236
- @result = @api_instance.dequeue_a_member(queue_id, call_id, opts)
232
+ @result = @api_instance.dequeue_a_member(queue_id, call_id)
237
233
  end
238
234
 
239
235
  it 'should respond with a queue member' do
@@ -249,18 +245,14 @@ describe 'DefaultApi' do
249
245
  # Dequeue Head Member
250
246
  # @param queue_id String that uniquely identifies this queue resource.
251
247
  # @param [Hash] opts the optional parameters
252
- # @option opts [DequeueMemberRequest] :dequeue_member_request Dequeue head member request details
253
248
  # @return [QueueMember]
254
249
  describe 'dequeue_head_member test' do
255
250
  before do
256
251
  uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}/Members/Front"
257
252
  @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
258
253
  queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
259
- opts = {
260
- dequeue_member_request: Freeclimb::DequeueMemberRequest.new # DequeueMemberRequest | Dequeue member request details
261
- }
262
254
 
263
- @result = @api_instance.dequeue_head_member(queue_id, opts)
255
+ @result = @api_instance.dequeue_head_member(queue_id)
264
256
  end
265
257
 
266
258
  it 'should respond with a queue member' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freeclimb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -119,7 +119,6 @@ files:
119
119
  - docs/CreateConferenceRequest.md
120
120
  - docs/DefaultApi.md
121
121
  - docs/Dequeue.md
122
- - docs/DequeueMemberRequest.md
123
122
  - docs/Enqueue.md
124
123
  - docs/EnqueueAllOf.md
125
124
  - docs/FilterLogsRequest.md
@@ -224,7 +223,6 @@ files:
224
223
  - lib/freeclimb/models/create_conference_all_of.rb
225
224
  - lib/freeclimb/models/create_conference_request.rb
226
225
  - lib/freeclimb/models/dequeue.rb
227
- - lib/freeclimb/models/dequeue_member_request.rb
228
226
  - lib/freeclimb/models/enqueue.rb
229
227
  - lib/freeclimb/models/enqueue_all_of.rb
230
228
  - lib/freeclimb/models/filter_logs_request.rb
@@ -315,7 +313,6 @@ files:
315
313
  - spec/models/conference_result_spec.rb
316
314
  - spec/models/create_conference_request_spec.rb
317
315
  - spec/models/create_conference_spec.rb
318
- - spec/models/dequeue_member_request_spec.rb
319
316
  - spec/models/dequeue_spec.rb
320
317
  - spec/models/enqueue_spec.rb
321
318
  - spec/models/filter_logs_request_spec.rb
@@ -398,7 +395,6 @@ test_files:
398
395
  - spec/models/get_speech_spec.rb
399
396
  - spec/models/queue_result_spec.rb
400
397
  - spec/models/queue_member_list_spec.rb
401
- - spec/models/dequeue_member_request_spec.rb
402
398
  - spec/models/filter_logs_request_spec.rb
403
399
  - spec/models/account_request_spec.rb
404
400
  - spec/models/incoming_number_request_spec.rb
@@ -1,17 +0,0 @@
1
- # Freeclimb::DequeueMemberRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **request_id** | **String** | RequestId for this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request include this requestId. If it is not provided, FreeClimb generates a requestId and returns it as a header in the response (e.g., X-Pulse-Request-Id: &lt;requestId&gt;). | [optional]
8
-
9
- ## Code Sample
10
-
11
- ```ruby
12
- require 'freeclimb'
13
-
14
- instance = Freeclimb::DequeueMemberRequest.new(request_id: nil)
15
- ```
16
-
17
-
@@ -1,207 +0,0 @@
1
- =begin
2
- #FreeClimb API
3
-
4
- #FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module Freeclimb
16
- class DequeueMemberRequest
17
- # RequestId for this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request include this requestId. If it is not provided, FreeClimb generates a requestId and returns it as a header in the response (e.g., X-Pulse-Request-Id: <requestId>).
18
- attr_accessor :request_id
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'request_id' => :'requestId'
24
- }
25
- end
26
-
27
- # Attribute type mapping.
28
- def self.openapi_types
29
- {
30
- :'request_id' => :'String'
31
- }
32
- end
33
-
34
- # List of attributes with nullable: true
35
- def self.openapi_nullable
36
- Set.new([
37
- ])
38
- end
39
-
40
- # Initializes the object
41
- # @param [Hash] attributes Model attributes in the form of hash
42
- def initialize(attributes = {})
43
- if (!attributes.is_a?(Hash))
44
- fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::DequeueMemberRequest` initialize method"
45
- end
46
-
47
- # check to see if the attribute exists and convert string to symbol for hash key
48
- attributes = attributes.each_with_object({}) { |(k, v), h|
49
- if (!self.class.attribute_map.key?(k.to_sym))
50
- fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::DequeueMemberRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
51
- end
52
- h[k.to_sym] = v
53
- }
54
-
55
- if attributes.key?(:'request_id')
56
- self.request_id = attributes[:'request_id']
57
- end
58
- end
59
-
60
- # Show invalid properties with the reasons. Usually used together with valid?
61
- # @return Array for valid properties with the reasons
62
- def list_invalid_properties
63
- invalid_properties = Array.new
64
- invalid_properties
65
- end
66
-
67
- # Check to see if the all the properties in the model are valid
68
- # @return true if the model is valid
69
- def valid?
70
- true
71
- end
72
-
73
- # Checks equality by comparing each attribute.
74
- # @param [Object] Object to be compared
75
- def ==(o)
76
- return true if self.equal?(o)
77
- self.class == o.class &&
78
- request_id == o.request_id
79
- end
80
-
81
- # @see the `==` method
82
- # @param [Object] Object to be compared
83
- def eql?(o)
84
- self == o
85
- end
86
-
87
- # Calculates hash code according to all attributes.
88
- # @return [Integer] Hash code
89
- def hash
90
- [request_id].hash
91
- end
92
-
93
- # Builds the object from hash
94
- # @param [Hash] attributes Model attributes in the form of hash
95
- # @return [Object] Returns the model itself
96
- def self.build_from_hash(attributes)
97
- new.build_from_hash(attributes)
98
- end
99
-
100
- # Builds the object from hash
101
- # @param [Hash] attributes Model attributes in the form of hash
102
- # @return [Object] Returns the model itself
103
- def build_from_hash(attributes)
104
- return nil unless attributes.is_a?(Hash)
105
- self.class.openapi_types.each_pair do |key, type|
106
- if type =~ /\AArray<(.*)>/i
107
- # check to ensure the input is an array given that the attribute
108
- # is documented as an array but the input is not
109
- if attributes[self.class.attribute_map[key]].is_a?(Array)
110
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
- end
112
- elsif !attributes[self.class.attribute_map[key]].nil?
113
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
- end # or else data not found in attributes(hash), not an issue as the data can be optional
115
- end
116
-
117
- self
118
- end
119
-
120
- # Deserializes the data based on type
121
- # @param string type Data type
122
- # @param string value Value to be deserialized
123
- # @return [Object] Deserialized data
124
- def _deserialize(type, value)
125
- case type.to_sym
126
- when :DateTime
127
- DateTime.parse(value)
128
- when :Date
129
- Date.parse(value)
130
- when :String
131
- value.to_s
132
- when :Integer
133
- value.to_i
134
- when :Float
135
- value.to_f
136
- when :Boolean
137
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
- true
139
- else
140
- false
141
- end
142
- when :Object
143
- # generic object (usually a Hash), return directly
144
- value
145
- when /\AArray<(?<inner_type>.+)>\z/
146
- inner_type = Regexp.last_match[:inner_type]
147
- value.map { |v| _deserialize(inner_type, v) }
148
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
- k_type = Regexp.last_match[:k_type]
150
- v_type = Regexp.last_match[:v_type]
151
- {}.tap do |hash|
152
- value.each do |k, v|
153
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
- end
155
- end
156
- else # model
157
- Freeclimb.const_get(type).build_from_hash(value)
158
- end
159
- end
160
-
161
- # Returns the string representation of the object
162
- # @return [String] String presentation of the object
163
- def to_s
164
- to_hash.to_s
165
- end
166
-
167
- # to_body is an alias to to_hash (backward compatibility)
168
- # @return [Hash] Returns the object in the form of hash
169
- def to_body
170
- to_hash
171
- end
172
-
173
- # Returns the object in the form of hash
174
- # @return [Hash] Returns the object in the form of hash
175
- def to_hash
176
- hash = {}
177
- self.class.attribute_map.each_pair do |attr, param|
178
- value = self.send(attr)
179
- if value.nil?
180
- is_nullable = self.class.openapi_nullable.include?(attr)
181
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
- end
183
-
184
- hash[param] = _to_hash(value)
185
- end
186
- hash
187
- end
188
-
189
- # Outputs non-array value in the form of hash
190
- # For object, use to_hash. Otherwise, just return the value
191
- # @param [Object] value Any valid value
192
- # @return [Hash] Returns the value in the form of hash
193
- def _to_hash(value)
194
- if value.is_a?(Array)
195
- value.compact.map { |v| _to_hash(v) }
196
- elsif value.is_a?(Hash)
197
- {}.tap do |hash|
198
- value.each { |k, v| hash[k] = _to_hash(v) }
199
- end
200
- elsif value.respond_to? :to_hash
201
- value.to_hash
202
- else
203
- value
204
- end
205
- end
206
- end
207
- end