docusign_admin 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,226 @@
1
+ =begin
2
+ #DocuSign Admin API
3
+
4
+ #An API for an organization administrator to manage organizations, accounts and users
5
+
6
+ OpenAPI spec version: v2.1
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_Admin
15
+ class MembershipDataRedactionResponse
16
+ attr_accessor :account_id
17
+
18
+ attr_accessor :status
19
+
20
+ class EnumAttributeValidator
21
+ attr_reader :datatype
22
+ attr_reader :allowable_values
23
+
24
+ def initialize(datatype, allowable_values)
25
+ @allowable_values = allowable_values.map do |value|
26
+ case datatype.to_s
27
+ when /Integer/i
28
+ value.to_i
29
+ when /Float/i
30
+ value.to_f
31
+ else
32
+ value
33
+ end
34
+ end
35
+ end
36
+
37
+ def valid?(value)
38
+ !value || allowable_values.include?(value)
39
+ end
40
+ end
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'account_id' => :'account_id',
46
+ :'status' => :'status'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'account_id' => :'String',
54
+ :'status' => :'String'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
65
+
66
+ if attributes.has_key?(:'account_id')
67
+ self.account_id = attributes[:'account_id']
68
+ end
69
+
70
+ if attributes.has_key?(:'status')
71
+ self.status = attributes[:'status']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ status_validator = EnumAttributeValidator.new('String', ['unknown', 'pending', 'failure', 'success', 'already_redacted'])
86
+ return false unless status_validator.valid?(@status)
87
+ true
88
+ end
89
+
90
+ # Custom attribute writer method checking allowed values (enum).
91
+ # @param [Object] status Object to be assigned
92
+ def status=(status)
93
+ validator = EnumAttributeValidator.new('String', ['unknown', 'pending', 'failure', 'success', 'already_redacted'])
94
+ unless validator.valid?(status)
95
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
96
+ end
97
+ @status = status
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ account_id == o.account_id &&
106
+ status == o.status
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Fixnum] Hash code
117
+ def hash
118
+ [account_id, status].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ self.class.swagger_types.each_pair do |key, type|
127
+ if type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
131
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ end
133
+ elsif !attributes[self.class.attribute_map[key]].nil?
134
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :DateTime
148
+ DateTime.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :BOOLEAN
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ temp_model = DocuSign_Admin.const_get(type).new
179
+ temp_model.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ next if value.nil?
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+ end
@@ -10,5 +10,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
10
10
  =end
11
11
 
12
12
  module DocuSign_Admin
13
- VERSION = '1.1.0'
13
+ VERSION = '1.2.0'
14
14
  end
@@ -46,9 +46,14 @@ require 'docusign_admin/models/force_activate_membership_request'
46
46
  require 'docusign_admin/models/group_request'
47
47
  require 'docusign_admin/models/identity_provider_response'
48
48
  require 'docusign_admin/models/identity_providers_response'
49
+ require 'docusign_admin/models/individual_membership_data_redaction_request'
50
+ require 'docusign_admin/models/individual_user_data_redaction_request'
51
+ require 'docusign_admin/models/individual_user_data_redaction_response'
49
52
  require 'docusign_admin/models/link_response'
50
53
  require 'docusign_admin/models/member_group_response'
51
54
  require 'docusign_admin/models/member_groups_response'
55
+ require 'docusign_admin/models/membership_data_redaction_request'
56
+ require 'docusign_admin/models/membership_data_redaction_response'
52
57
  require 'docusign_admin/models/membership_response'
53
58
  require 'docusign_admin/models/new_account_user_request'
54
59
  require 'docusign_admin/models/new_multi_product_user_add_request'
@@ -128,6 +133,7 @@ require 'docusign_admin/api/bulk_exports_api'
128
133
  require 'docusign_admin/api/bulk_imports_api'
129
134
  require 'docusign_admin/api/ds_groups_api'
130
135
  require 'docusign_admin/api/identity_providers_api'
136
+ require 'docusign_admin/api/organizations_api'
131
137
  require 'docusign_admin/api/product_permission_profiles_api'
132
138
  require 'docusign_admin/api/reserved_domains_api'
133
139
  require 'docusign_admin/api/users_api'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docusign_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
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: 2022-04-28 00:00:00.000000000 Z
11
+ date: 2023-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -292,6 +292,7 @@ files:
292
292
  - lib/docusign_admin/api/bulk_imports_api.rb
293
293
  - lib/docusign_admin/api/ds_groups_api.rb
294
294
  - lib/docusign_admin/api/identity_providers_api.rb
295
+ - lib/docusign_admin/api/organizations_api.rb
295
296
  - lib/docusign_admin/api/product_permission_profiles_api.rb
296
297
  - lib/docusign_admin/api/reserved_domains_api.rb
297
298
  - lib/docusign_admin/api/users_api.rb
@@ -327,9 +328,14 @@ files:
327
328
  - lib/docusign_admin/models/group_request.rb
328
329
  - lib/docusign_admin/models/identity_provider_response.rb
329
330
  - lib/docusign_admin/models/identity_providers_response.rb
331
+ - lib/docusign_admin/models/individual_membership_data_redaction_request.rb
332
+ - lib/docusign_admin/models/individual_user_data_redaction_request.rb
333
+ - lib/docusign_admin/models/individual_user_data_redaction_response.rb
330
334
  - lib/docusign_admin/models/link_response.rb
331
335
  - lib/docusign_admin/models/member_group_response.rb
332
336
  - lib/docusign_admin/models/member_groups_response.rb
337
+ - lib/docusign_admin/models/membership_data_redaction_request.rb
338
+ - lib/docusign_admin/models/membership_data_redaction_response.rb
333
339
  - lib/docusign_admin/models/membership_response.rb
334
340
  - lib/docusign_admin/models/new_account_user_request.rb
335
341
  - lib/docusign_admin/models/new_multi_product_user_add_request.rb