lockally 0.3.1 → 0.3.2
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 +4 -4
- data/README.md +7 -5
- data/docs/AgentSendResult.md +6 -2
- data/docs/MailboxGrant.md +7 -3
- data/docs/MailboxGrantList.md +2 -2
- data/docs/MarkReadResult.md +2 -0
- data/docs/SimulatedInbound.md +6 -0
- data/docs/ThreadClassification.md +2 -0
- data/docs/ThreadMessageBody.md +10 -26
- data/docs/{ThreadMessageBodyAllOfBody.md → ThreadMessageBodyBody.md} +2 -2
- data/docs/Whoami.md +7 -7
- data/docs/WhoamiKey.md +20 -0
- data/docs/WhoamiTenant.md +22 -0
- data/lib/lockally/models/agent_send_result.rb +72 -1
- data/lib/lockally/models/mailbox_grant.rb +28 -10
- data/lib/lockally/models/mailbox_grant_list.rb +17 -17
- data/lib/lockally/models/mark_read_result.rb +10 -1
- data/lib/lockally/models/simulated_inbound.rb +29 -1
- data/lib/lockally/models/thread_classification.rb +11 -1
- data/lib/lockally/models/thread_message_body.rb +58 -233
- data/lib/lockally/models/{thread_message_body_all_of_body.rb → thread_message_body_body.rb} +4 -3
- data/lib/lockally/models/whoami.rb +98 -24
- data/lib/lockally/models/whoami_key.rb +157 -0
- data/lib/lockally/models/whoami_tenant.rb +166 -0
- data/lib/lockally/version.rb +1 -1
- data/lib/lockally.rb +3 -1
- data/spec/models/agent_send_result_spec.rb +12 -0
- data/spec/models/mailbox_grant_list_spec.rb +1 -1
- data/spec/models/mailbox_grant_spec.rb +13 -1
- data/spec/models/mark_read_result_spec.rb +6 -0
- data/spec/models/simulated_inbound_spec.rb +18 -0
- data/spec/models/thread_classification_spec.rb +6 -0
- data/spec/models/{thread_message_body_all_of_body_spec.rb → thread_message_body_body_spec.rb} +6 -6
- data/spec/models/thread_message_body_spec.rb +5 -57
- data/spec/models/whoami_key_spec.rb +42 -0
- data/spec/models/whoami_spec.rb +8 -4
- data/spec/models/whoami_tenant_spec.rb +48 -0
- metadata +13 -5
|
@@ -15,22 +15,43 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Lockally
|
|
17
17
|
class Whoami < ApiModelBase
|
|
18
|
-
attr_accessor :tenant_id
|
|
19
|
-
|
|
20
18
|
attr_accessor :tenant
|
|
21
19
|
|
|
22
|
-
# The API key's label.
|
|
23
|
-
attr_accessor :label
|
|
24
|
-
|
|
25
20
|
attr_accessor :scopes
|
|
26
21
|
|
|
22
|
+
attr_accessor :auth
|
|
23
|
+
|
|
24
|
+
attr_accessor :key
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
27
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
49
|
def self.attribute_map
|
|
29
50
|
{
|
|
30
|
-
:'tenant_id' => :'tenant_id',
|
|
31
51
|
:'tenant' => :'tenant',
|
|
32
|
-
:'
|
|
33
|
-
:'
|
|
52
|
+
:'scopes' => :'scopes',
|
|
53
|
+
:'auth' => :'auth',
|
|
54
|
+
:'key' => :'key'
|
|
34
55
|
}
|
|
35
56
|
end
|
|
36
57
|
|
|
@@ -47,10 +68,10 @@ module Lockally
|
|
|
47
68
|
# Attribute type mapping.
|
|
48
69
|
def self.openapi_types
|
|
49
70
|
{
|
|
50
|
-
:'
|
|
51
|
-
:'
|
|
52
|
-
:'
|
|
53
|
-
:'
|
|
71
|
+
:'tenant' => :'WhoamiTenant',
|
|
72
|
+
:'scopes' => :'Array<String>',
|
|
73
|
+
:'auth' => :'String',
|
|
74
|
+
:'key' => :'WhoamiKey'
|
|
54
75
|
}
|
|
55
76
|
end
|
|
56
77
|
|
|
@@ -76,22 +97,28 @@ module Lockally
|
|
|
76
97
|
h[k.to_sym] = v
|
|
77
98
|
}
|
|
78
99
|
|
|
79
|
-
if attributes.key?(:'tenant_id')
|
|
80
|
-
self.tenant_id = attributes[:'tenant_id']
|
|
81
|
-
end
|
|
82
|
-
|
|
83
100
|
if attributes.key?(:'tenant')
|
|
84
101
|
self.tenant = attributes[:'tenant']
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if attributes.key?(:'label')
|
|
88
|
-
self.label = attributes[:'label']
|
|
102
|
+
else
|
|
103
|
+
self.tenant = nil
|
|
89
104
|
end
|
|
90
105
|
|
|
91
106
|
if attributes.key?(:'scopes')
|
|
92
107
|
if (value = attributes[:'scopes']).is_a?(Array)
|
|
93
108
|
self.scopes = value
|
|
94
109
|
end
|
|
110
|
+
else
|
|
111
|
+
self.scopes = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'auth')
|
|
115
|
+
self.auth = attributes[:'auth']
|
|
116
|
+
else
|
|
117
|
+
self.auth = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'key')
|
|
121
|
+
self.key = attributes[:'key']
|
|
95
122
|
end
|
|
96
123
|
end
|
|
97
124
|
|
|
@@ -100,6 +127,18 @@ module Lockally
|
|
|
100
127
|
def list_invalid_properties
|
|
101
128
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
129
|
invalid_properties = Array.new
|
|
130
|
+
if @tenant.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "tenant", tenant cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @scopes.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "scopes", scopes cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @auth.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "auth", auth cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
103
142
|
invalid_properties
|
|
104
143
|
end
|
|
105
144
|
|
|
@@ -107,18 +146,53 @@ module Lockally
|
|
|
107
146
|
# @return true if the model is valid
|
|
108
147
|
def valid?
|
|
109
148
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
149
|
+
return false if @tenant.nil?
|
|
150
|
+
return false if @scopes.nil?
|
|
151
|
+
return false if @auth.nil?
|
|
152
|
+
auth_validator = EnumAttributeValidator.new('String', ["api_key", "session"])
|
|
153
|
+
return false unless auth_validator.valid?(@auth)
|
|
110
154
|
true
|
|
111
155
|
end
|
|
112
156
|
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] tenant Value to be assigned
|
|
159
|
+
def tenant=(tenant)
|
|
160
|
+
if tenant.nil?
|
|
161
|
+
fail ArgumentError, 'tenant cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@tenant = tenant
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] scopes Value to be assigned
|
|
169
|
+
def scopes=(scopes)
|
|
170
|
+
if scopes.nil?
|
|
171
|
+
fail ArgumentError, 'scopes cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@scopes = scopes
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
178
|
+
# @param [Object] auth Object to be assigned
|
|
179
|
+
def auth=(auth)
|
|
180
|
+
validator = EnumAttributeValidator.new('String', ["api_key", "session"])
|
|
181
|
+
unless validator.valid?(auth)
|
|
182
|
+
fail ArgumentError, "invalid value for \"auth\", must be one of #{validator.allowable_values}."
|
|
183
|
+
end
|
|
184
|
+
@auth = auth
|
|
185
|
+
end
|
|
186
|
+
|
|
113
187
|
# Checks equality by comparing each attribute.
|
|
114
188
|
# @param [Object] Object to be compared
|
|
115
189
|
def ==(o)
|
|
116
190
|
return true if self.equal?(o)
|
|
117
191
|
self.class == o.class &&
|
|
118
|
-
tenant_id == o.tenant_id &&
|
|
119
192
|
tenant == o.tenant &&
|
|
120
|
-
|
|
121
|
-
|
|
193
|
+
scopes == o.scopes &&
|
|
194
|
+
auth == o.auth &&
|
|
195
|
+
key == o.key
|
|
122
196
|
end
|
|
123
197
|
|
|
124
198
|
# @see the `==` method
|
|
@@ -130,7 +204,7 @@ module Lockally
|
|
|
130
204
|
# Calculates hash code according to all attributes.
|
|
131
205
|
# @return [Integer] Hash code
|
|
132
206
|
def hash
|
|
133
|
-
[
|
|
207
|
+
[tenant, scopes, auth, key].hash
|
|
134
208
|
end
|
|
135
209
|
|
|
136
210
|
# Builds the object from hash
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#lockally control plane
|
|
3
|
+
|
|
4
|
+
#The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
Contact: support@lockally.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Lockally
|
|
17
|
+
# Present only when auth is api_key.
|
|
18
|
+
class WhoamiKey < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :label
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'id' => :'id',
|
|
27
|
+
:'label' => :'label'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'id' => :'String',
|
|
45
|
+
:'label' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::WhoamiKey` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::WhoamiKey`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'id')
|
|
72
|
+
self.id = attributes[:'id']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'label')
|
|
76
|
+
self.label = attributes[:'label']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
id == o.id &&
|
|
101
|
+
label == o.label
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[id, label].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
transformed_hash = {}
|
|
123
|
+
openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = nil
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
new(transformed_hash)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Returns the object in the form of hash
|
|
140
|
+
# @return [Hash] Returns the object in the form of hash
|
|
141
|
+
def to_hash
|
|
142
|
+
hash = {}
|
|
143
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
144
|
+
value = self.send(attr)
|
|
145
|
+
if value.nil?
|
|
146
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
147
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
hash[param] = _to_hash(value)
|
|
151
|
+
end
|
|
152
|
+
hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#lockally control plane
|
|
3
|
+
|
|
4
|
+
#The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
Contact: support@lockally.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Lockally
|
|
17
|
+
class WhoamiTenant < ApiModelBase
|
|
18
|
+
attr_accessor :slug
|
|
19
|
+
|
|
20
|
+
# What the account calls itself.
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
attr_accessor :plan
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'slug' => :'slug',
|
|
29
|
+
:'name' => :'name',
|
|
30
|
+
:'plan' => :'plan'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'slug' => :'String',
|
|
48
|
+
:'name' => :'String',
|
|
49
|
+
:'plan' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::WhoamiTenant` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::WhoamiTenant`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'slug')
|
|
76
|
+
self.slug = attributes[:'slug']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'name')
|
|
80
|
+
self.name = attributes[:'name']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'plan')
|
|
84
|
+
self.plan = attributes[:'plan']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
slug == o.slug &&
|
|
109
|
+
name == o.name &&
|
|
110
|
+
plan == o.plan
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[slug, name, plan].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the object in the form of hash
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_hash
|
|
151
|
+
hash = {}
|
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
153
|
+
value = self.send(attr)
|
|
154
|
+
if value.nil?
|
|
155
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
156
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
hash[param] = _to_hash(value)
|
|
160
|
+
end
|
|
161
|
+
hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
data/lib/lockally/version.rb
CHANGED
data/lib/lockally.rb
CHANGED
|
@@ -203,7 +203,7 @@ require 'lockally/models/thread_classification'
|
|
|
203
203
|
require 'lockally/models/thread_list'
|
|
204
204
|
require 'lockally/models/thread_message'
|
|
205
205
|
require 'lockally/models/thread_message_body'
|
|
206
|
-
require 'lockally/models/
|
|
206
|
+
require 'lockally/models/thread_message_body_body'
|
|
207
207
|
require 'lockally/models/thread_summary'
|
|
208
208
|
require 'lockally/models/unit_bundle'
|
|
209
209
|
require 'lockally/models/update_admin_request'
|
|
@@ -228,6 +228,8 @@ require 'lockally/models/vacation_params'
|
|
|
228
228
|
require 'lockally/models/vacation_responder'
|
|
229
229
|
require 'lockally/models/webhook'
|
|
230
230
|
require 'lockally/models/whoami'
|
|
231
|
+
require 'lockally/models/whoami_key'
|
|
232
|
+
require 'lockally/models/whoami_tenant'
|
|
231
233
|
|
|
232
234
|
# APIs
|
|
233
235
|
require 'lockally/api/add_ons_api'
|
|
@@ -33,12 +33,24 @@ describe Lockally::AgentSendResult do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "message_id"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "status"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
45
|
end
|
|
40
46
|
end
|
|
41
47
|
|
|
48
|
+
describe 'test attribute "warning"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
42
54
|
describe 'test attribute "thread_id"' do
|
|
43
55
|
it 'should work' do
|
|
44
56
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -27,7 +27,7 @@ describe Lockally::MailboxGrantList do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "grants"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
@@ -27,7 +27,13 @@ describe Lockally::MailboxGrant do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "api_key_id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "mailbox_id"' do
|
|
31
37
|
it 'should work' do
|
|
32
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
39
|
end
|
|
@@ -39,4 +45,10 @@ describe Lockally::MailboxGrant do
|
|
|
39
45
|
end
|
|
40
46
|
end
|
|
41
47
|
|
|
48
|
+
describe 'test attribute "created_at"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
42
54
|
end
|
|
@@ -27,6 +27,12 @@ describe Lockally::MarkReadResult do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
describe 'test attribute "message_id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
30
36
|
describe 'test attribute "read"' do
|
|
31
37
|
it 'should work' do
|
|
32
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -27,6 +27,18 @@ describe Lockally::SimulatedInbound do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
describe 'test attribute "simulated"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "indexed"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
30
42
|
describe 'test attribute "thread_id"' do
|
|
31
43
|
it 'should work' do
|
|
32
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,6 +51,12 @@ describe Lockally::SimulatedInbound do
|
|
|
39
51
|
end
|
|
40
52
|
end
|
|
41
53
|
|
|
54
|
+
describe 'test attribute "rfc_message_id"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
42
60
|
describe 'test attribute "annotations"' do
|
|
43
61
|
it 'should work' do
|
|
44
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,6 +39,12 @@ describe Lockally::ThreadClassification do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "billed"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
42
48
|
describe 'test attribute "classification"' do
|
|
43
49
|
it 'should work' do
|
|
44
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/spec/models/{thread_message_body_all_of_body_spec.rb → thread_message_body_body_spec.rb}
RENAMED
|
@@ -14,16 +14,16 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Lockally::
|
|
17
|
+
# Unit tests for Lockally::ThreadMessageBodyBody
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Lockally::
|
|
21
|
-
#let(:instance) { Lockally::
|
|
20
|
+
describe Lockally::ThreadMessageBodyBody do
|
|
21
|
+
#let(:instance) { Lockally::ThreadMessageBodyBody.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of ThreadMessageBodyBody' do
|
|
24
|
+
it 'should create an instance of ThreadMessageBodyBody' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Lockally::
|
|
26
|
+
#expect(instance).to be_instance_of(Lockally::ThreadMessageBodyBody)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|