authress-sdk 2.0.45.0 → 2.0.49.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af182231afad4b4bc13d5953f3a9bfc0cee00bb69d78e9a6b431284d57692ae3
4
- data.tar.gz: 66117157125df99898877a4c4cfee34650199ce6354d1fec711517b8c60bee4a
3
+ metadata.gz: d32ba00388565868a776bd1213baf44e5cdc1749090f0e17c6ba17dd49665d6c
4
+ data.tar.gz: 8070e3c1ff0fc5732e29779adac04dfd779f819dbb64df86548d16c997012e2a
5
5
  SHA512:
6
- metadata.gz: a6dd701c47674e16e43c77919d8a599bec4874505bde3592128889152ba324c80f5a2c8db05a8df4ddf4291ec5c376f516457adad104ac7caefb466b2be56649
7
- data.tar.gz: ee0feaafaa7015383e2068a05657d2e0045acb169577dc6274d1d749b88683bfd97ce399cd298395ada9623670eebd85090e90cd8635bc2b8259313e65ec8403
6
+ metadata.gz: 58e0ad55ea4f1defce30769a1592a0b1765a115bff387e0525f2dd3c43fe49adc325036410d8419ca695bac32f815667ec1826f35da83a348b65e669a010b52a
7
+ data.tar.gz: 0ae6d3fc39524892ce96d3429ff02eafdead245ed12a75f618dcbb27f3c38e43098692cd35a76d2ec44262981985996f89ea7d74bd50b8f55a6adf0c52fe0628
@@ -0,0 +1,222 @@
1
+ =begin
2
+
3
+ =end
4
+
5
+ require 'date'
6
+
7
+ module AuthressSdk
8
+ class InviteStatement
9
+ attr_accessor :roles
10
+
11
+ attr_accessor :resources
12
+
13
+ # Attribute mapping from ruby-style variable name to JSON key.
14
+ def self.attribute_map
15
+ {
16
+ :'roles' => :'roles',
17
+ :'resources' => :'resources'
18
+ }
19
+ end
20
+
21
+ # Attribute type mapping.
22
+ def self.openapi_types
23
+ {
24
+ :'roles' => :'Object',
25
+ :'resources' => :'Object'
26
+ }
27
+ end
28
+
29
+ # List of attributes with nullable: true
30
+ def self.openapi_nullable
31
+ Set.new([
32
+ ])
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AuthressSdk::InviteStatement` initialize method"
40
+ end
41
+
42
+ # check to see if the attribute exists and convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h|
44
+ if (!self.class.attribute_map.key?(k.to_sym))
45
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AuthressSdk::InviteStatement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
46
+ end
47
+ h[k.to_sym] = v
48
+ }
49
+
50
+ if attributes.key?(:'roles')
51
+ if (value = attributes[:'roles']).is_a?(Array)
52
+ self.roles = value
53
+ end
54
+ end
55
+
56
+ if attributes.key?(:'resources')
57
+ if (value = attributes[:'resources']).is_a?(Array)
58
+ self.resources = value
59
+ end
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ if @roles.nil?
68
+ invalid_properties.push('invalid value for "roles", roles cannot be nil.')
69
+ end
70
+
71
+ if @resources.nil?
72
+ invalid_properties.push('invalid value for "resources", resources cannot be nil.')
73
+ end
74
+
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ return false if @roles.nil?
82
+ return false if @resources.nil?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ roles == o.roles &&
92
+ resources == o.resources
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [roles, resources].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.openapi_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
129
+ self.send("#{key}=", nil)
130
+ end
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ AuthressSdk.const_get(type).build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end end
222
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authress-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.45.0
4
+ version: 2.0.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Authress
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-01 00:00:00.000000000 Z
11
+ date: 2025-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -168,6 +168,7 @@ files:
168
168
  - lib/authress-sdk/models/identity_collection_identities.rb
169
169
  - lib/authress-sdk/models/identity_request.rb
170
170
  - lib/authress-sdk/models/invite.rb
171
+ - lib/authress-sdk/models/invite_statement.rb
171
172
  - lib/authress-sdk/models/link.rb
172
173
  - lib/authress-sdk/models/metadata_object.rb
173
174
  - lib/authress-sdk/models/permission_collection.rb