docusign_monitor 1.0.0.beta1 → 1.0.0.pre.alpha

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: 5a706c627c950f185c15a90ff568768725285f785690a9942f0b2831cfc2f9f6
4
- data.tar.gz: 7afec697c7cbf634b852ca2613f2d17ccfbac8b30f1814a05df7b8de0e9c35d6
3
+ metadata.gz: 2f7ee701e7e21458660d78df75bafd685c19a27849672ecad41cce915efa3f16
4
+ data.tar.gz: a0412fbfa9ffdd0e8548eea90bfddca8b8f610ba7fb903e0fc7b8081dfd1d9fd
5
5
  SHA512:
6
- metadata.gz: de4654e3096578aa87ad5a48256f0a26a60b193698a42437e03c5c3437d00e06cf147433db588d8e66a1e63320819df018559de035a2b1890b582ec847827f68
7
- data.tar.gz: af19aa01ea42949f7494d2a05d36496037ecd8c2d38374e2b3fe1aff97caf8f1b456d908464dc9fffbaa64c3202c0c977f6e681d0ad1098d7dbfe0670011f3fc
6
+ metadata.gz: 301c5c6b2633963c4d5f6c39ba48dbd2b28629f93ffb7b9f93ef70a2846b6fd98bb52947f5a8435420fbf9c93e46d9bb8574f0b8141382e6e64d6e7739d52bb0
7
+ data.tar.gz: 7e0054f50320f8a88cc88f6b63c01afdf490c08bfa65adb1803c3782bc3405b545c8c6aa39c5158cc6397b1e50470afd582e8c5cac91a50ec16e1edd9a6cf08d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DocuSign Monitor Ruby Client Changelog
2
2
  See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
3
3
 
4
- ## [v1.0.0.beta1] - DocuSign Monitor API v1 - 05/14/2021
4
+ ## [v1.0.0.alpha] - DocuSign Monitor API v1 - 02/25/2022
5
5
  ### Changed
6
- - First BETA version of Monitor API, supports DocuSign Monitor v2.0
6
+ - First GA version of Monitor API, supports DocuSign Monitor v1-1.0.0
@@ -13,15 +13,33 @@ require "uri"
13
13
 
14
14
  module DocuSign_Monitor
15
15
 
16
- class GetStreamOptions
17
- # The cursor value to continue querying the data with. For an intial call, use empty string
16
+ class GetStreamForDatasetOptions
17
+ # Starting cursor position
18
18
  attr_accessor :cursor
19
19
 
20
- # The maximum number of records to return, minimum of 1, maximum of 2000. Defaults to 1000 if no value is provided
20
+ # Max number of results to return
21
21
  attr_accessor :limit
22
22
 
23
23
  def self.default
24
- @@default ||= GetStreamOptions.new
24
+ @@default ||= GetStreamForDatasetOptions.new
25
+ end
26
+ end
27
+
28
+ class GetWebQueryForDatasetOptions
29
+ # A JSON list of filters to apply to the underlying dataset
30
+ attr_accessor :filters
31
+
32
+ # A JSON list of aggregations to apply to the filtered dataset
33
+ attr_accessor :aggregations
34
+
35
+ # The scope to limit the query by. If omitted, defaults to the QueryScope of the DataSet. DocuSign.API.Lens.Common.QueryScope
36
+ attr_accessor :query_scope
37
+
38
+ # The AccountId or OrganizationId for this query, which will be double-checked against the User JWT. If QueryScope==AccountId, this is required. If QueryScope==OrganizationId, this is optional.
39
+ attr_accessor :query_scope_id
40
+
41
+ def self.default
42
+ @@default ||= GetWebQueryForDatasetOptions.new
25
43
  end
26
44
  end
27
45
 
@@ -34,30 +52,30 @@ module DocuSign_Monitor
34
52
  end
35
53
 
36
54
  #
37
- # Allows for the streaming of data as it becomes available Required scopes: impersonation
55
+ #
38
56
  # @param data_set_name The name of the dataset to stream
39
57
  # @param version The requested API version
40
- # @param DocuSign_Monitor::GetStreamOptions Options for modifying the behavior of the function.
41
- # @return [CursoredResult]
42
- def get_stream(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default)
43
- data, _status_code, _headers = get_stream_with_http_info(data_set_name, version, options)
44
- return data
58
+ # @param DocuSign_Monitor::GetStreamForDatasetOptions Options for modifying the behavior of the function.
59
+ # @return [nil]
60
+ def get_stream_for_dataset(data_set_name, version, options = DocuSign_Monitor::GetStreamForDatasetOptions.default)
61
+ get_stream_for_dataset_with_http_info(data_set_name, version, options)
62
+ return nil
45
63
  end
46
64
 
47
65
  #
48
- # Allows for the streaming of data as it becomes available Required scopes: impersonation
66
+ #
49
67
  # @param data_set_name The name of the dataset to stream
50
68
  # @param version The requested API version
51
- # @param DocuSign_Monitor::GetStreamOptions Options for modifying the behavior of the function.
52
- # @return [Array<(CursoredResult, Fixnum, Hash)>] CursoredResult data, response status code and response headers
53
- def get_stream_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default)
69
+ # @param DocuSign_Monitor::GetStreamForDatasetOptions Options for modifying the behavior of the function.
70
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
71
+ def get_stream_for_dataset_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetStreamForDatasetOptions.default)
54
72
  if @api_client.config.debugging
55
- @api_client.config.logger.debug "Calling API: DataSetApi.get_stream ..."
73
+ @api_client.config.logger.debug "Calling API: DataSetApi.get_stream_for_dataset ..."
56
74
  end
57
75
  # verify the required parameter 'data_set_name' is set
58
- fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.get_stream" if data_set_name.nil?
76
+ fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.get_stream_for_dataset" if data_set_name.nil?
59
77
  # verify the required parameter 'version' is set
60
- fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.get_stream" if version.nil?
78
+ fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.get_stream_for_dataset" if version.nil?
61
79
  # resource path
62
80
  local_var_path = "/api/v{version}/datasets/{dataSetName}/stream".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s)
63
81
 
@@ -68,10 +86,6 @@ module DocuSign_Monitor
68
86
 
69
87
  # header parameters
70
88
  header_params = {}
71
- # HTTP header 'Accept' (if needed)
72
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
73
- # HTTP header 'Content-Type'
74
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
75
89
 
76
90
  # form parameters
77
91
  form_params = {}
@@ -84,10 +98,176 @@ module DocuSign_Monitor
84
98
  :query_params => query_params,
85
99
  :form_params => form_params,
86
100
  :body => post_body,
87
- :auth_names => auth_names,
88
- :return_type => 'CursoredResult')
101
+ :auth_names => auth_names)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: DataSetApi#get_stream_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
108
+ # Supplies secured, processed data for web-based dashboards
109
+ #
110
+ # @param data_set_name The name of the dataset to query
111
+ # @param version The requested API version
112
+ # @param DocuSign_Monitor::GetWebQueryForDatasetOptions Options for modifying the behavior of the function.
113
+ # @return [nil]
114
+ def get_web_query_for_dataset(data_set_name, version, options = DocuSign_Monitor::GetWebQueryForDatasetOptions.default)
115
+ get_web_query_for_dataset_with_http_info(data_set_name, version, options)
116
+ return nil
117
+ end
118
+
119
+ # Supplies secured, processed data for web-based dashboards
120
+ #
121
+ # @param data_set_name The name of the dataset to query
122
+ # @param version The requested API version
123
+ # @param DocuSign_Monitor::GetWebQueryForDatasetOptions Options for modifying the behavior of the function.
124
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
125
+ def get_web_query_for_dataset_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetWebQueryForDatasetOptions.default)
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug "Calling API: DataSetApi.get_web_query_for_dataset ..."
128
+ end
129
+ # verify the required parameter 'data_set_name' is set
130
+ fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.get_web_query_for_dataset" if data_set_name.nil?
131
+ # verify the required parameter 'version' is set
132
+ fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.get_web_query_for_dataset" if version.nil?
133
+ if options.query_scope && !['AccountId', 'OrganizationId', 'None'].include?(options.query_scope)
134
+ fail ArgumentError, 'invalid value for "query_scope", must be one of AccountId, OrganizationId, None'
135
+ end
136
+ # resource path
137
+ local_var_path = "/api/v{version}/datasets/{dataSetName}/web_query".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s)
138
+
139
+ # query parameters
140
+ query_params = {}
141
+ query_params[:'filters'] = options.filters if !options.filters.nil?
142
+ query_params[:'aggregations'] = options.aggregations if !options.aggregations.nil?
143
+ query_params[:'queryScope'] = options.query_scope if !options.query_scope.nil?
144
+ query_params[:'queryScopeId'] = options.query_scope_id if !options.query_scope_id.nil?
145
+
146
+ # header parameters
147
+ header_params = {}
148
+
149
+ # form parameters
150
+ form_params = {}
151
+
152
+ # http body (model)
153
+ post_body = nil
154
+ auth_names = []
155
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names)
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "API called: DataSetApi#get_web_query_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
163
+ end
164
+ return data, status_code, headers
165
+ end
166
+
167
+ # Provides a raw kusto query capability to internal Docusign services
168
+ #
169
+ # @param data_set_name The name of the dataset to query
170
+ # @param version The requested API version
171
+ # @param raw_request The request body DocuSign.API.Lens.Common.RawRequest (optional parameter)
172
+ # @return [nil]
173
+ def post_raw_for_dataset(data_set_name, version, raw_request)
174
+ post_raw_for_dataset_with_http_info(data_set_name, version, raw_request)
175
+ return nil
176
+ end
177
+
178
+ # Provides a raw kusto query capability to internal Docusign services
179
+ #
180
+ # @param data_set_name The name of the dataset to query
181
+ # @param version The requested API version
182
+ # @param raw_request The request body DocuSign.API.Lens.Common.RawRequest (optional parameter)
183
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
184
+ def post_raw_for_dataset_with_http_info(data_set_name, version, raw_request)
185
+ if @api_client.config.debugging
186
+ @api_client.config.logger.debug "Calling API: DataSetApi.post_raw_for_dataset ..."
187
+ end
188
+ # verify the required parameter 'data_set_name' is set
189
+ fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.post_raw_for_dataset" if data_set_name.nil?
190
+ # verify the required parameter 'version' is set
191
+ fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.post_raw_for_dataset" if version.nil?
192
+ # resource path
193
+ local_var_path = "/api/v{version}/datasets/{dataSetName}/raw".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s)
194
+
195
+ # query parameters
196
+ query_params = {}
197
+
198
+ # header parameters
199
+ header_params = {}
200
+ # HTTP header 'Content-Type'
201
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json'])
202
+
203
+ # form parameters
204
+ form_params = {}
205
+
206
+ # http body (model)
207
+ post_body = @api_client.object_to_http_body(raw_request)
208
+ auth_names = []
209
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: DataSetApi#post_raw_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+
221
+ #
222
+ #
223
+ # @param data_set_name
224
+ # @param version The requested API version
225
+ # @param web_query (optional parameter)
226
+ # @return [nil]
227
+ def post_web_query_for_dataset(data_set_name, version, web_query)
228
+ post_web_query_for_dataset_with_http_info(data_set_name, version, web_query)
229
+ return nil
230
+ end
231
+
232
+ #
233
+ #
234
+ # @param data_set_name
235
+ # @param version The requested API version
236
+ # @param web_query (optional parameter)
237
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
238
+ def post_web_query_for_dataset_with_http_info(data_set_name, version, web_query)
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug "Calling API: DataSetApi.post_web_query_for_dataset ..."
241
+ end
242
+ # verify the required parameter 'data_set_name' is set
243
+ fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.post_web_query_for_dataset" if data_set_name.nil?
244
+ # verify the required parameter 'version' is set
245
+ fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.post_web_query_for_dataset" if version.nil?
246
+ # resource path
247
+ local_var_path = "/api/v{version}/datasets/{dataSetName}/web_query".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s)
248
+
249
+ # query parameters
250
+ query_params = {}
251
+
252
+ # header parameters
253
+ header_params = {}
254
+ # HTTP header 'Content-Type'
255
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json'])
256
+
257
+ # form parameters
258
+ form_params = {}
259
+
260
+ # http body (model)
261
+ post_body = @api_client.object_to_http_body(web_query)
262
+ auth_names = []
263
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
264
+ :header_params => header_params,
265
+ :query_params => query_params,
266
+ :form_params => form_params,
267
+ :body => post_body,
268
+ :auth_names => auth_names)
89
269
  if @api_client.config.debugging
90
- @api_client.config.logger.debug "API called: DataSetApi#get_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ @api_client.config.logger.debug "API called: DataSetApi#post_web_query_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
271
  end
92
272
  return data, status_code, headers
93
273
  end
@@ -261,7 +261,7 @@ module DocuSign_Monitor
261
261
  # Add leading and trailing slashes to path
262
262
  path = "/#{path}".gsub(/\/+/, '/')
263
263
  return Addressable::URI.encode("https://" + self.get_oauth_base_path + path) if opts[:oauth]
264
- Addressable::URI.encode(@config.base_url + path)
264
+ URI.encode(@config.base_url + path) Addressable::URI.encode(@config.base_url + path)
265
265
  end
266
266
 
267
267
  # Builds the HTTP request body
@@ -125,7 +125,7 @@ module DocuSign_Monitor
125
125
  def initialize
126
126
  @scheme = 'https'
127
127
  @host = 'lens.docusign.net'
128
- @base_path = ''
128
+ @base_path = '/api'
129
129
  @api_key = {}
130
130
  @api_key_prefix = {}
131
131
  @timeout = 0
@@ -10,5 +10,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
10
10
  =end
11
11
 
12
12
  module DocuSign_Monitor
13
- VERSION = '1.0.0.beta1'
13
+ VERSION = '1.0.0-alpha'
14
14
  end
@@ -19,7 +19,10 @@ require 'docusign_monitor/configuration'
19
19
  require 'docusign_monitor/client/auth/oauth'
20
20
 
21
21
  # Models
22
- require 'docusign_monitor/models/cursored_result'
22
+ require 'docusign_monitor/models/aggregation'
23
+ require 'docusign_monitor/models/filter'
24
+ require 'docusign_monitor/models/raw_request'
25
+ require 'docusign_monitor/models/web_query'
23
26
 
24
27
  # APIs
25
28
  require 'docusign_monitor/api/data_set_api'
@@ -58,7 +58,7 @@ describe 'DocuSign Ruby Client Tests' do
58
58
 
59
59
  before(:all) do
60
60
  # run before each test
61
- $host = "https://lens-d.docusign.net"
61
+ $host = "https://lens-d.docusign.net/api"
62
62
 
63
63
  $expires_in_seconds = 3600 #1 hour
64
64
  $auth_server = 'account-d.docusign.com'
@@ -103,19 +103,22 @@ describe 'DocuSign Ruby Client Tests' do
103
103
  end
104
104
  end
105
105
 
106
- describe DocuSign_Monitor::DataSetApi do
106
+ describe DocuSign_Monitor::MonitorApi do
107
107
  describe '.get' do
108
108
  context 'datasets' do
109
109
  it 'successfully returns monitor' do
110
110
  api_client = create_api_client()
111
- dataset_api = DocuSign_Monitor::DataSetApi.new(api_client)
111
+ monitor_api = DocuSign_Monitor::MonitorApi.new(api_client)
112
112
 
113
- data_set_name = 'monitor'
114
- version = '2.0'
113
+ options = DocuSign_Monitor::GetMonitorOptions.new
114
+
115
+ # account_id
116
+ options = DocuSign_Monitor::GetStreamForDatasetOptions.default
115
117
 
116
- getStreamOptions = DocuSign_Monitor::GetStreamOptions.new
118
+ data_set_name = 'devcenter_0001'
119
+ version = '2.0'
117
120
 
118
- dataset_stream = dataset_api.get_stream(data_set_name, version, getStreamOptions)
121
+ dataset_stream = monitor_api.get_stream_for_dataset($data_set_name, $version, $options)
119
122
 
120
123
  expect(dataset_stream).to be_truthy
121
124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docusign_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta1
4
+ version: 1.0.0.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - DocuSign
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-14 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -244,8 +244,6 @@ files:
244
244
  - LICENSE
245
245
  - README.md
246
246
  - Rakefile
247
- - docusign_monitor-1.0.0.pre.alpha.gem
248
- - docusign_monitor-1.0.1.pre.alpha.gem
249
247
  - docusign_monitor.gemspec
250
248
  - git_push.sh
251
249
  - lib/docusign_monitor.rb
@@ -255,15 +253,12 @@ files:
255
253
  - lib/docusign_monitor/client/auth/oauth.rb
256
254
  - lib/docusign_monitor/configuration.rb
257
255
  - lib/docusign_monitor/models/aggregation.rb
258
- - lib/docusign_monitor/models/cursored_result.rb
259
256
  - lib/docusign_monitor/models/filter.rb
260
257
  - lib/docusign_monitor/models/raw_request.rb
261
258
  - lib/docusign_monitor/models/web_query.rb
262
259
  - lib/docusign_monitor/version.rb
263
260
  - tests/Gemfile
264
- - tests/Gemfile.lock
265
261
  - tests/docs/Test.pdf
266
- - tests/docs/private.pem
267
262
  - tests/spec/unit_tests_using_jwt_spec.rb
268
263
  homepage: https://github.com/docusign/docusign-monitor-ruby-client
269
264
  licenses:
Binary file
Binary file
@@ -1,194 +0,0 @@
1
- =begin
2
- #DocuSign Monitor API - v2
3
-
4
- #An API for an integrator to access the features of DocuSign Monitor
5
-
6
- OpenAPI spec version: v2.0
7
- Contact: devcenter@docusign.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
-
10
- =end
11
-
12
- require 'date'
13
-
14
- module DocuSign_Monitor
15
- class CursoredResult
16
- attr_accessor :end_cursor
17
-
18
- attr_accessor :data
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'end_cursor' => :'endCursor',
24
- :'data' => :'data'
25
- }
26
- end
27
-
28
- # Attribute type mapping.
29
- def self.swagger_types
30
- {
31
- :'end_cursor' => :'String',
32
- :'data' => :'Array<Object>'
33
- }
34
- end
35
-
36
- # Initializes the object
37
- # @param [Hash] attributes Model attributes in the form of hash
38
- def initialize(attributes = {})
39
- return unless attributes.is_a?(Hash)
40
-
41
- # convert string to symbol for hash key
42
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
-
44
- if attributes.has_key?(:'endCursor')
45
- self.end_cursor = attributes[:'endCursor']
46
- end
47
-
48
- if attributes.has_key?(:'data')
49
- if (value = attributes[:'data']).is_a?(Array)
50
- self.data = value
51
- end
52
- end
53
- end
54
-
55
- # Show invalid properties with the reasons. Usually used together with valid?
56
- # @return Array for valid properties with the reasons
57
- def list_invalid_properties
58
- invalid_properties = Array.new
59
- invalid_properties
60
- end
61
-
62
- # Check to see if the all the properties in the model are valid
63
- # @return true if the model is valid
64
- def valid?
65
- true
66
- end
67
-
68
- # Checks equality by comparing each attribute.
69
- # @param [Object] Object to be compared
70
- def ==(o)
71
- return true if self.equal?(o)
72
- self.class == o.class &&
73
- end_cursor == o.end_cursor &&
74
- data == o.data
75
- end
76
-
77
- # @see the `==` method
78
- # @param [Object] Object to be compared
79
- def eql?(o)
80
- self == o
81
- end
82
-
83
- # Calculates hash code according to all attributes.
84
- # @return [Fixnum] Hash code
85
- def hash
86
- [end_cursor, data].hash
87
- end
88
-
89
- # Builds the object from hash
90
- # @param [Hash] attributes Model attributes in the form of hash
91
- # @return [Object] Returns the model itself
92
- def build_from_hash(attributes)
93
- return nil unless attributes.is_a?(Hash)
94
- self.class.swagger_types.each_pair do |key, type|
95
- if type =~ /\AArray<(.*)>/i
96
- # check to ensure the input is an array given that the attribute
97
- # is documented as an array but the input is not
98
- if attributes[self.class.attribute_map[key]].is_a?(Array)
99
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
100
- end
101
- elsif !attributes[self.class.attribute_map[key]].nil?
102
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
103
- end # or else data not found in attributes(hash), not an issue as the data can be optional
104
- end
105
-
106
- self
107
- end
108
-
109
- # Deserializes the data based on type
110
- # @param string type Data type
111
- # @param string value Value to be deserialized
112
- # @return [Object] Deserialized data
113
- def _deserialize(type, value)
114
- case type.to_sym
115
- when :DateTime
116
- DateTime.parse(value)
117
- when :Date
118
- Date.parse(value)
119
- when :String
120
- value.to_s
121
- when :Integer
122
- value.to_i
123
- when :Float
124
- value.to_f
125
- when :BOOLEAN
126
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
127
- true
128
- else
129
- false
130
- end
131
- when :Object
132
- # generic object (usually a Hash), return directly
133
- value
134
- when /\AArray<(?<inner_type>.+)>\z/
135
- inner_type = Regexp.last_match[:inner_type]
136
- value.map { |v| _deserialize(inner_type, v) }
137
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
138
- k_type = Regexp.last_match[:k_type]
139
- v_type = Regexp.last_match[:v_type]
140
- {}.tap do |hash|
141
- value.each do |k, v|
142
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
143
- end
144
- end
145
- else # model
146
- temp_model = DocuSign_Monitor.const_get(type).new
147
- temp_model.build_from_hash(value)
148
- end
149
- end
150
-
151
- # Returns the string representation of the object
152
- # @return [String] String presentation of the object
153
- def to_s
154
- to_hash.to_s
155
- end
156
-
157
- # to_body is an alias to to_hash (backward compatibility)
158
- # @return [Hash] Returns the object in the form of hash
159
- def to_body
160
- to_hash
161
- end
162
-
163
- # Returns the object in the form of hash
164
- # @return [Hash] Returns the object in the form of hash
165
- def to_hash
166
- hash = {}
167
- self.class.attribute_map.each_pair do |attr, param|
168
- value = self.send(attr)
169
- next if value.nil?
170
- hash[param] = _to_hash(value)
171
- end
172
- hash
173
- end
174
-
175
- # Outputs non-array value in the form of hash
176
- # For object, use to_hash. Otherwise, just return the value
177
- # @param [Object] value Any valid value
178
- # @return [Hash] Returns the value in the form of hash
179
- def _to_hash(value)
180
- if value.is_a?(Array)
181
- value.compact.map { |v| _to_hash(v) }
182
- elsif value.is_a?(Hash)
183
- {}.tap do |hash|
184
- value.each { |k, v| hash[k] = _to_hash(v) }
185
- end
186
- elsif value.respond_to? :to_hash
187
- value.to_hash
188
- else
189
- value
190
- end
191
- end
192
-
193
- end
194
- end
data/tests/Gemfile.lock DELETED
@@ -1,46 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- docusign_monitor (1.0.0.beta1)
5
- addressable (~> 2.7, >= 2.7.0)
6
- json (~> 2.1, >= 2.1.0)
7
- jwt (~> 2.2, >= 2.2.1)
8
- typhoeus (~> 1.0, >= 1.0.1)
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- addressable (2.7.0)
14
- public_suffix (>= 2.0.2, < 5.0)
15
- diff-lcs (1.4.4)
16
- ethon (0.12.0)
17
- ffi (>= 1.3.0)
18
- ffi (1.13.1)
19
- json (2.3.1)
20
- jwt (2.2.2)
21
- public_suffix (4.0.6)
22
- rspec (3.9.0)
23
- rspec-core (~> 3.9.0)
24
- rspec-expectations (~> 3.9.0)
25
- rspec-mocks (~> 3.9.0)
26
- rspec-core (3.9.3)
27
- rspec-support (~> 3.9.3)
28
- rspec-expectations (3.9.3)
29
- diff-lcs (>= 1.2.0, < 2.0)
30
- rspec-support (~> 3.9.0)
31
- rspec-mocks (3.9.1)
32
- diff-lcs (>= 1.2.0, < 2.0)
33
- rspec-support (~> 3.9.0)
34
- rspec-support (3.9.4)
35
- typhoeus (1.4.0)
36
- ethon (>= 0.9.0)
37
-
38
- PLATFORMS
39
- ruby
40
-
41
- DEPENDENCIES
42
- docusign_monitor!
43
- rspec
44
-
45
- BUNDLED WITH
46
- 1.17.2
@@ -1,27 +0,0 @@
1
- -----BEGIN RSA PRIVATE KEY-----
2
- MIIEogIBAAKCAQEAq1yUzw3owo+yIuBntG4EFPEaeJqemjdnIKu4JJB8Vm5LJRaX
3
- 68smh+pz2K0GtfqB3fiIaguw3NsVZ8v+carfxzoX58jeiITi6NDXK6i3Q+9tyCJp
4
- rxcmTlyPIh1o+R9BaZAn7Uc0OIkkconrncRlDAjgRusBs79izJIqMHE+YG5uSCG+
5
- TLDP+LtzzPK8A4rRB+/lDKoXM+O905KBSEJyZ2xGZOHY4SEWKH5vjA50syy6oGpM
6
- Hpcpx4rrvRLfcmJDcSHvY1WT3GaPAOXnSoGzUDnwiOPdS1rcznH2nwrw+kPWxHwj
7
- sE2O/jvELduVl8H/PPsW1wtyjnEt7B7Q9wrWcwIDAQABAoIBAAMpoHW5BJg+7Gm5
8
- TZk1Wg4RKARhI32u3/KTi/PhVoKohPu4cvYBTVyL3z9WsJCvGkw3/W8yzcVtLnyN
9
- uf90hJ0tA8RVBZbsXGWX/0GxwRxku3IGVm790rfDYwVp9nlobe7TsSOeZ6sO6jyw
10
- h1kp3EiggqS9fgFIhbLgtmEnbm0VBfA/+8UNZQxJxzw0uZCVojEoFtbxyv3inHSu
11
- clKGs3sDQ1RA2PDE3xyOR51a4RLAWuavQC1TdydS/QEnCmxJnZ1eQY+bjt+GnHOO
12
- OPzgCKHu1TdJyPT57kU7FXMEkuuj5aG1i/UtZSNH+L386y6nPmo7b/mXyFgMil7r
13
- lNaT81ECgYEA7/b0uotZEm3Gz1OwNYmQS8gNxAq1WtW225RCBxiEV+S7xslueCiG
14
- nATBidwMI/8XbN8KvbmU2TNnndcsUNt9ta8ufX0GXQ0pjEXNL3ZfTKoZF0e/Bn3W
15
- BqSV1YBlpE7B81M79mSVYbMScfzxCVjaU53JRDzYUYxPQNV+iMkYk8kCgYEAttAK
16
- 2ZKPozlWTP6GO1v3ekm+QwUftvJ43XyZ59Pzhegjm2hkIEbUuIPCVfuQIVCvfPIB
17
- yAoTC+9i4rAPmCvYXoGYAx8l5YuwfiUh8ajTavzgrCk9u9/xOH2ypIxRnHzpe99t
18
- V+kLEEuW+uLcN9+D10bP04qTHo+DIGh9Muj23lsCgYAkXqy2/VnRtju0vr1tT91D
19
- 7x1PAkR8cPnXDAB57NhaLfvb5DnPEm1chkgDKgvZBNe7E48gNFmAFg91V+CKnMnP
20
- 2K5WLLXjMpSCgy3XLLzC9OD6q1AjnrzqotVm16AQKDOzOoFTFemiNi7sgebSgNoO
21
- ZFLV+dbbfUWh0Pntp3UHKQKBgF1/9DypUBusZK5Gc4MCm4WJF+2RPlJEm3q0ksbW
22
- SbQQMb33W1aCw6OHiCqP2nyfltGxuSWFuY4eJpZIdAFhU22qnIPkN266zk8GUOEX
23
- duI+ae7DvRZNCEPbTjYIqmj+HjDD6lnPEGCKOLMiun09LWI6jmrkcjBsOCWoK3iR
24
- XEoHAoGAOSXO1kM6p0MZEhKxrVunF6HpW8aHRjcdcjjJJRFgap3hxCT1OZ9YB+SD
25
- Prn+cjFJ7WSMrHpIRt56FZGUUgmp+97WqYsIuAJx56ETKdAVx6C7RuEtbJoqdTER
26
- hS4vaGq+EWmjVc/pSMbBzZ99lpIEbyYBk2jD3GpCWgSd9CDrxGY=
27
- -----END RSA PRIVATE KEY-----