docusign_monitor 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/docusign_monitor/api/data_set_api.rb +10 -69
- data/lib/docusign_monitor/client/api_client.rb +8 -3
- data/lib/docusign_monitor/models/cursored_result.rb +3 -0
- data/lib/docusign_monitor/models/data_set.rb +197 -0
- data/lib/docusign_monitor/version.rb +1 -1
- data/lib/docusign_monitor.rb +1 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 528f68adbdfd32aaee5309d739858c7bf7bf33d50ed93273be2952497a3476e6
|
4
|
+
data.tar.gz: 3a88085b1c80ecf5ce01a232c0f7de5fbc015fd1564cb981c2231563583ef279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28317aed365ccc05c13a62d16d1cb190dc5db434e62fed2eba121f3d2f8eb73b07897f279b9d3283cfbf386ddcf877259905254e52f49c5f20ce0914798e308f
|
7
|
+
data.tar.gz: d657c0decdd89a18c5b289cd877fdd786cff8324acb83a29139bdde408fd73a9576c364470210575e00258075f18e988b3272e4baf7e20e58316b83159ad227f
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
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.2.0] - Monitor API v2.0-2.0.0 - 2023-06-14
|
5
|
+
### Changed
|
6
|
+
- Added support for version v2.0-2.0.0 of the DocuSign Monitor API.
|
7
|
+
- Updated the SDK release version.
|
8
|
+
|
4
9
|
## [v1.1.0] - Monitor API v2.0-1.1.0 - 2022-04-11
|
5
10
|
### Changed
|
6
11
|
- Added support for version v2.0-1.1.0 of the DocuSign Monitor API.
|
@@ -14,10 +14,10 @@ require "uri"
|
|
14
14
|
module DocuSign_Monitor
|
15
15
|
|
16
16
|
class GetStreamOptions
|
17
|
-
#
|
17
|
+
# Specifies a pointer into the dataset where your query will begin. You can either provide an ISO DateTime or a string cursor (from the `endCursor` value in the response). If no value is provided, the query begins from seven days ago. For example, to fetch event data beginning from January 1, 2022, set this value to `2022-01-01T00:00:00Z`. The response will include data about events starting from that date in chronological order. The response also includes an `endCursor` property. To fetch the next page of event data, call this endpoint again with `cursor` set to the previous `endCursor` value.
|
18
18
|
attr_accessor :cursor
|
19
19
|
|
20
|
-
# The maximum number of records to return
|
20
|
+
# The maximum number of records to return. The default value is 1000.
|
21
21
|
attr_accessor :limit
|
22
22
|
|
23
23
|
def self.default
|
@@ -33,10 +33,10 @@ module DocuSign_Monitor
|
|
33
33
|
@api_client = api_client
|
34
34
|
end
|
35
35
|
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# @param data_set_name
|
39
|
-
# @param version
|
36
|
+
# Gets customer event data for an organization.
|
37
|
+
# Gets customer event data for the organization that owns the integration key. The results for this endpoint are paginated by event timestamp. Use the `cursor` parameter to specify where the query begins in the dataset. Use the `limit` parameter to set the number of records returned.
|
38
|
+
# @param data_set_name Must be `monitor`.
|
39
|
+
# @param version Must be `2`.
|
40
40
|
# @param DocuSign_Monitor::GetStreamOptions Options for modifying the behavior of the function.
|
41
41
|
# @return [CursoredResult]
|
42
42
|
def get_stream(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default)
|
@@ -44,10 +44,10 @@ module DocuSign_Monitor
|
|
44
44
|
return data
|
45
45
|
end
|
46
46
|
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# @param data_set_name
|
50
|
-
# @param version
|
47
|
+
# Gets customer event data for an organization.
|
48
|
+
# Gets customer event data for the organization that owns the integration key. The results for this endpoint are paginated by event timestamp. Use the `cursor` parameter to specify where the query begins in the dataset. Use the `limit` parameter to set the number of records returned.
|
49
|
+
# @param data_set_name Must be `monitor`.
|
50
|
+
# @param version Must be `2`.
|
51
51
|
# @param DocuSign_Monitor::GetStreamOptions Options for modifying the behavior of the function.
|
52
52
|
# @return [Array<(CursoredResult, Fixnum, Hash)>] CursoredResult data, response status code and response headers
|
53
53
|
def get_stream_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default)
|
@@ -91,64 +91,5 @@ module DocuSign_Monitor
|
|
91
91
|
end
|
92
92
|
return data, status_code, headers
|
93
93
|
end
|
94
|
-
|
95
|
-
#
|
96
|
-
# Allows for querying existing data using filter and aggregation clauses Required scopes: impersonation
|
97
|
-
# @param data_set_name The name of the dataset to query
|
98
|
-
# @param version The requested API version
|
99
|
-
# @param web_query A collection of filter clauses and aggregations scoped to one or more organizations. The fields queryScope and queryScopeId may be omitted defaulting to all applicable organizations
|
100
|
-
# @return [AggregateResult]
|
101
|
-
def post_web_query(data_set_name, version, web_query)
|
102
|
-
data, _status_code, _headers = post_web_query_with_http_info(data_set_name, version, web_query)
|
103
|
-
return data
|
104
|
-
end
|
105
|
-
|
106
|
-
#
|
107
|
-
# Allows for querying existing data using filter and aggregation clauses Required scopes: impersonation
|
108
|
-
# @param data_set_name The name of the dataset to query
|
109
|
-
# @param version The requested API version
|
110
|
-
# @param web_query A collection of filter clauses and aggregations scoped to one or more organizations. The fields queryScope and queryScopeId may be omitted defaulting to all applicable organizations
|
111
|
-
# @return [Array<(AggregateResult, Fixnum, Hash)>] AggregateResult data, response status code and response headers
|
112
|
-
def post_web_query_with_http_info(data_set_name, version, web_query)
|
113
|
-
if @api_client.config.debugging
|
114
|
-
@api_client.config.logger.debug "Calling API: DataSetApi.post_web_query ..."
|
115
|
-
end
|
116
|
-
# verify the required parameter 'data_set_name' is set
|
117
|
-
fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.post_web_query" if data_set_name.nil?
|
118
|
-
# verify the required parameter 'version' is set
|
119
|
-
fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.post_web_query" if version.nil?
|
120
|
-
# verify the required parameter 'web_query' is set
|
121
|
-
fail ArgumentError, "Missing the required parameter 'web_query' when calling DataSetApi.post_web_query" if web_query.nil?
|
122
|
-
# resource path
|
123
|
-
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)
|
124
|
-
|
125
|
-
# query parameters
|
126
|
-
query_params = {}
|
127
|
-
|
128
|
-
# header parameters
|
129
|
-
header_params = {}
|
130
|
-
# HTTP header 'Accept' (if needed)
|
131
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
132
|
-
# HTTP header 'Content-Type'
|
133
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
134
|
-
|
135
|
-
# form parameters
|
136
|
-
form_params = {}
|
137
|
-
|
138
|
-
# http body (model)
|
139
|
-
post_body = @api_client.object_to_http_body(web_query)
|
140
|
-
auth_names = []
|
141
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
142
|
-
:header_params => header_params,
|
143
|
-
:query_params => query_params,
|
144
|
-
:form_params => form_params,
|
145
|
-
:body => post_body,
|
146
|
-
:auth_names => auth_names,
|
147
|
-
:return_type => 'AggregateResult')
|
148
|
-
if @api_client.config.debugging
|
149
|
-
@api_client.config.logger.debug "API called: DataSetApi#post_web_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
150
|
-
end
|
151
|
-
return data, status_code, headers
|
152
|
-
end
|
153
94
|
end
|
154
95
|
end
|
@@ -35,7 +35,7 @@ module DocuSign_Monitor
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
36
36
|
def initialize(config = Configuration.default)
|
37
37
|
@config = config
|
38
|
-
@user_agent = "Swagger-Codegen/1.
|
38
|
+
@user_agent = "Swagger-Codegen/1.2.0/ruby"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => "application/json",
|
41
41
|
'User-Agent' => @user_agent
|
@@ -106,7 +106,7 @@ module DocuSign_Monitor
|
|
106
106
|
|
107
107
|
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
108
108
|
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
109
|
-
|
109
|
+
|
110
110
|
req_opts = {
|
111
111
|
:method => http_method,
|
112
112
|
:headers => header_params,
|
@@ -281,7 +281,12 @@ module DocuSign_Monitor
|
|
281
281
|
# let typhoeus handle File, Array and nil parameters
|
282
282
|
data[key] = value
|
283
283
|
else
|
284
|
-
|
284
|
+
if header_params['Content-Type'] == 'multipart/form-data'
|
285
|
+
header_params['Content-Disposition'] = 'form-data; name=file; filename=' + key
|
286
|
+
data = value
|
287
|
+
else
|
288
|
+
data[key] = value.to_s
|
289
|
+
end
|
285
290
|
end
|
286
291
|
end
|
287
292
|
elsif body
|
@@ -12,9 +12,12 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
12
12
|
require 'date'
|
13
13
|
|
14
14
|
module DocuSign_Monitor
|
15
|
+
#
|
15
16
|
class CursoredResult
|
17
|
+
#
|
16
18
|
attr_accessor :end_cursor
|
17
19
|
|
20
|
+
#
|
18
21
|
attr_accessor :data
|
19
22
|
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -0,0 +1,197 @@
|
|
1
|
+
=begin
|
2
|
+
#Monitor API
|
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
|
+
# Methods to fetch organization event data.
|
16
|
+
class DataSet
|
17
|
+
#
|
18
|
+
attr_accessor :end_cursor
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :data
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'end_cursor' => :'endCursor',
|
27
|
+
:'data' => :'data'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'end_cursor' => :'String',
|
35
|
+
:'data' => :'Array<Object>'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'endCursor')
|
48
|
+
self.end_cursor = attributes[:'endCursor']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'data')
|
52
|
+
if (value = attributes[:'data']).is_a?(Array)
|
53
|
+
self.data = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
59
|
+
# @return Array for valid properties with the reasons
|
60
|
+
def list_invalid_properties
|
61
|
+
invalid_properties = Array.new
|
62
|
+
invalid_properties
|
63
|
+
end
|
64
|
+
|
65
|
+
# Check to see if the all the properties in the model are valid
|
66
|
+
# @return true if the model is valid
|
67
|
+
def valid?
|
68
|
+
true
|
69
|
+
end
|
70
|
+
|
71
|
+
# Checks equality by comparing each attribute.
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def ==(o)
|
74
|
+
return true if self.equal?(o)
|
75
|
+
self.class == o.class &&
|
76
|
+
end_cursor == o.end_cursor &&
|
77
|
+
data == o.data
|
78
|
+
end
|
79
|
+
|
80
|
+
# @see the `==` method
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def eql?(o)
|
83
|
+
self == o
|
84
|
+
end
|
85
|
+
|
86
|
+
# Calculates hash code according to all attributes.
|
87
|
+
# @return [Fixnum] Hash code
|
88
|
+
def hash
|
89
|
+
[end_cursor, data].hash
|
90
|
+
end
|
91
|
+
|
92
|
+
# Builds the object from hash
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
# @return [Object] Returns the model itself
|
95
|
+
def build_from_hash(attributes)
|
96
|
+
return nil unless attributes.is_a?(Hash)
|
97
|
+
self.class.swagger_types.each_pair do |key, type|
|
98
|
+
if type =~ /\AArray<(.*)>/i
|
99
|
+
# check to ensure the input is an array given that the attribute
|
100
|
+
# is documented as an array but the input is not
|
101
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
102
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
103
|
+
end
|
104
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
105
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
106
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
107
|
+
end
|
108
|
+
|
109
|
+
self
|
110
|
+
end
|
111
|
+
|
112
|
+
# Deserializes the data based on type
|
113
|
+
# @param string type Data type
|
114
|
+
# @param string value Value to be deserialized
|
115
|
+
# @return [Object] Deserialized data
|
116
|
+
def _deserialize(type, value)
|
117
|
+
case type.to_sym
|
118
|
+
when :DateTime
|
119
|
+
DateTime.parse(value)
|
120
|
+
when :Date
|
121
|
+
Date.parse(value)
|
122
|
+
when :String
|
123
|
+
value.to_s
|
124
|
+
when :Integer
|
125
|
+
value.to_i
|
126
|
+
when :Float
|
127
|
+
value.to_f
|
128
|
+
when :BOOLEAN
|
129
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
130
|
+
true
|
131
|
+
else
|
132
|
+
false
|
133
|
+
end
|
134
|
+
when :Object
|
135
|
+
# generic object (usually a Hash), return directly
|
136
|
+
value
|
137
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
138
|
+
inner_type = Regexp.last_match[:inner_type]
|
139
|
+
value.map { |v| _deserialize(inner_type, v) }
|
140
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
141
|
+
k_type = Regexp.last_match[:k_type]
|
142
|
+
v_type = Regexp.last_match[:v_type]
|
143
|
+
{}.tap do |hash|
|
144
|
+
value.each do |k, v|
|
145
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
else # model
|
149
|
+
temp_model = DocuSign_Monitor.const_get(type).new
|
150
|
+
temp_model.build_from_hash(value)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
# Returns the string representation of the object
|
155
|
+
# @return [String] String presentation of the object
|
156
|
+
def to_s
|
157
|
+
to_hash.to_s
|
158
|
+
end
|
159
|
+
|
160
|
+
# to_body is an alias to to_hash (backward compatibility)
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
162
|
+
def to_body
|
163
|
+
to_hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Returns the object in the form of hash
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
168
|
+
def to_hash
|
169
|
+
hash = {}
|
170
|
+
self.class.attribute_map.each_pair do |attr, param|
|
171
|
+
value = self.send(attr)
|
172
|
+
next if value.nil?
|
173
|
+
hash[param] = _to_hash(value)
|
174
|
+
end
|
175
|
+
hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Outputs non-array value in the form of hash
|
179
|
+
# For object, use to_hash. Otherwise, just return the value
|
180
|
+
# @param [Object] value Any valid value
|
181
|
+
# @return [Hash] Returns the value in the form of hash
|
182
|
+
def _to_hash(value)
|
183
|
+
if value.is_a?(Array)
|
184
|
+
value.compact.map { |v| _to_hash(v) }
|
185
|
+
elsif value.is_a?(Hash)
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
188
|
+
end
|
189
|
+
elsif value.respond_to? :to_hash
|
190
|
+
value.to_hash
|
191
|
+
else
|
192
|
+
value
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
end
|
197
|
+
end
|
data/lib/docusign_monitor.rb
CHANGED
@@ -19,10 +19,8 @@ require 'docusign_monitor/configuration'
|
|
19
19
|
require 'docusign_monitor/client/auth/oauth'
|
20
20
|
|
21
21
|
# Models
|
22
|
-
require 'docusign_monitor/models/aggregate_result'
|
23
|
-
require 'docusign_monitor/models/aggregate_result_result'
|
24
22
|
require 'docusign_monitor/models/cursored_result'
|
25
|
-
require 'docusign_monitor/models/
|
23
|
+
require 'docusign_monitor/models/data_set'
|
26
24
|
|
27
25
|
# APIs
|
28
26
|
require 'docusign_monitor/api/data_set_api'
|
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DocuSign
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -296,6 +296,7 @@ files:
|
|
296
296
|
- lib/docusign_monitor/models/aggregate_result_result.rb
|
297
297
|
- lib/docusign_monitor/models/aggregation.rb
|
298
298
|
- lib/docusign_monitor/models/cursored_result.rb
|
299
|
+
- lib/docusign_monitor/models/data_set.rb
|
299
300
|
- lib/docusign_monitor/models/filter.rb
|
300
301
|
- lib/docusign_monitor/models/raw_request.rb
|
301
302
|
- lib/docusign_monitor/models/web_query.rb
|