lockally 0.3.1 → 0.3.3

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.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -5
  3. data/docs/AdminApi.md +3 -3
  4. data/docs/AdminsApi.md +1 -1
  5. data/docs/AgentSendResult.md +6 -2
  6. data/docs/AgentsApi.md +2 -2
  7. data/docs/AiApi.md +1 -1
  8. data/docs/AliasesApi.md +1 -1
  9. data/docs/ApiKeysApi.md +3 -3
  10. data/docs/DomainsApi.md +3 -3
  11. data/docs/MailboxGrant.md +7 -3
  12. data/docs/MailboxGrantList.md +2 -2
  13. data/docs/MailboxesApi.md +6 -6
  14. data/docs/MarkReadResult.md +2 -0
  15. data/docs/SendApi.md +4 -4
  16. data/docs/SimulatedInbound.md +6 -0
  17. data/docs/TenantApi.md +1 -1
  18. data/docs/TestApi.md +1 -1
  19. data/docs/ThreadClassification.md +2 -0
  20. data/docs/ThreadMessageBody.md +10 -26
  21. data/docs/{ThreadMessageBodyAllOfBody.md → ThreadMessageBodyBody.md} +2 -2
  22. data/docs/WebhooksApi.md +3 -3
  23. data/docs/Whoami.md +7 -7
  24. data/docs/WhoamiKey.md +20 -0
  25. data/docs/WhoamiTenant.md +22 -0
  26. data/lib/lockally/api/admin_api.rb +6 -6
  27. data/lib/lockally/api/admins_api.rb +2 -2
  28. data/lib/lockally/api/agents_api.rb +4 -4
  29. data/lib/lockally/api/ai_api.rb +2 -2
  30. data/lib/lockally/api/aliases_api.rb +2 -2
  31. data/lib/lockally/api/api_keys_api.rb +6 -6
  32. data/lib/lockally/api/domains_api.rb +6 -6
  33. data/lib/lockally/api/mailboxes_api.rb +12 -12
  34. data/lib/lockally/api/send_api.rb +8 -8
  35. data/lib/lockally/api/tenant_api.rb +2 -2
  36. data/lib/lockally/api/test_api.rb +2 -2
  37. data/lib/lockally/api/webhooks_api.rb +6 -6
  38. data/lib/lockally/models/agent_send_result.rb +72 -1
  39. data/lib/lockally/models/mailbox_grant.rb +28 -10
  40. data/lib/lockally/models/mailbox_grant_list.rb +17 -17
  41. data/lib/lockally/models/mark_read_result.rb +10 -1
  42. data/lib/lockally/models/simulated_inbound.rb +29 -1
  43. data/lib/lockally/models/thread_classification.rb +11 -1
  44. data/lib/lockally/models/thread_message_body.rb +58 -233
  45. data/lib/lockally/models/{thread_message_body_all_of_body.rb → thread_message_body_body.rb} +4 -3
  46. data/lib/lockally/models/whoami.rb +98 -24
  47. data/lib/lockally/models/whoami_key.rb +157 -0
  48. data/lib/lockally/models/whoami_tenant.rb +166 -0
  49. data/lib/lockally/version.rb +1 -1
  50. data/lib/lockally.rb +3 -1
  51. data/spec/api/admin_api_spec.rb +3 -3
  52. data/spec/api/admins_api_spec.rb +1 -1
  53. data/spec/api/agents_api_spec.rb +2 -2
  54. data/spec/api/ai_api_spec.rb +1 -1
  55. data/spec/api/aliases_api_spec.rb +1 -1
  56. data/spec/api/api_keys_api_spec.rb +3 -3
  57. data/spec/api/domains_api_spec.rb +3 -3
  58. data/spec/api/mailboxes_api_spec.rb +6 -6
  59. data/spec/api/send_api_spec.rb +4 -4
  60. data/spec/api/tenant_api_spec.rb +1 -1
  61. data/spec/api/test_api_spec.rb +1 -1
  62. data/spec/api/webhooks_api_spec.rb +3 -3
  63. data/spec/models/agent_send_result_spec.rb +12 -0
  64. data/spec/models/mailbox_grant_list_spec.rb +1 -1
  65. data/spec/models/mailbox_grant_spec.rb +13 -1
  66. data/spec/models/mark_read_result_spec.rb +6 -0
  67. data/spec/models/simulated_inbound_spec.rb +18 -0
  68. data/spec/models/thread_classification_spec.rb +6 -0
  69. data/spec/models/{thread_message_body_all_of_body_spec.rb → thread_message_body_body_spec.rb} +6 -6
  70. data/spec/models/thread_message_body_spec.rb +5 -57
  71. data/spec/models/whoami_key_spec.rb +42 -0
  72. data/spec/models/whoami_spec.rb +8 -4
  73. data/spec/models/whoami_tenant_spec.rb +48 -0
  74. metadata +14 -6
@@ -18,8 +18,14 @@ module Lockally
18
18
  # The Lockally message id.
19
19
  attr_accessor :id
20
20
 
21
+ # The Internet Message-ID.
22
+ attr_accessor :message_id
23
+
21
24
  attr_accessor :status
22
25
 
26
+ # Set when the send is accepted but worth noting
27
+ attr_accessor :warning
28
+
23
29
  # The conversation the message joined.
24
30
  attr_accessor :thread_id
25
31
 
@@ -27,7 +33,9 @@ module Lockally
27
33
  def self.attribute_map
28
34
  {
29
35
  :'id' => :'id',
36
+ :'message_id' => :'message_id',
30
37
  :'status' => :'status',
38
+ :'warning' => :'warning',
31
39
  :'thread_id' => :'thread_id'
32
40
  }
33
41
  end
@@ -46,7 +54,9 @@ module Lockally
46
54
  def self.openapi_types
47
55
  {
48
56
  :'id' => :'String',
57
+ :'message_id' => :'String',
49
58
  :'status' => :'String',
59
+ :'warning' => :'String',
50
60
  :'thread_id' => :'String'
51
61
  }
52
62
  end
@@ -75,10 +85,24 @@ module Lockally
75
85
 
76
86
  if attributes.key?(:'id')
77
87
  self.id = attributes[:'id']
88
+ else
89
+ self.id = nil
90
+ end
91
+
92
+ if attributes.key?(:'message_id')
93
+ self.message_id = attributes[:'message_id']
94
+ else
95
+ self.message_id = nil
78
96
  end
79
97
 
80
98
  if attributes.key?(:'status')
81
99
  self.status = attributes[:'status']
100
+ else
101
+ self.status = nil
102
+ end
103
+
104
+ if attributes.key?(:'warning')
105
+ self.warning = attributes[:'warning']
82
106
  end
83
107
 
84
108
  if attributes.key?(:'thread_id')
@@ -93,6 +117,18 @@ module Lockally
93
117
  def list_invalid_properties
94
118
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
119
  invalid_properties = Array.new
120
+ if @id.nil?
121
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
122
+ end
123
+
124
+ if @message_id.nil?
125
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
126
+ end
127
+
128
+ if @status.nil?
129
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
130
+ end
131
+
96
132
  if @thread_id.nil?
97
133
  invalid_properties.push('invalid value for "thread_id", thread_id cannot be nil.')
98
134
  end
@@ -104,10 +140,43 @@ module Lockally
104
140
  # @return true if the model is valid
105
141
  def valid?
106
142
  warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ return false if @id.nil?
144
+ return false if @message_id.nil?
145
+ return false if @status.nil?
107
146
  return false if @thread_id.nil?
108
147
  true
109
148
  end
110
149
 
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] id Value to be assigned
152
+ def id=(id)
153
+ if id.nil?
154
+ fail ArgumentError, 'id cannot be nil'
155
+ end
156
+
157
+ @id = id
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] message_id Value to be assigned
162
+ def message_id=(message_id)
163
+ if message_id.nil?
164
+ fail ArgumentError, 'message_id cannot be nil'
165
+ end
166
+
167
+ @message_id = message_id
168
+ end
169
+
170
+ # Custom attribute writer method with validation
171
+ # @param [Object] status Value to be assigned
172
+ def status=(status)
173
+ if status.nil?
174
+ fail ArgumentError, 'status cannot be nil'
175
+ end
176
+
177
+ @status = status
178
+ end
179
+
111
180
  # Custom attribute writer method with validation
112
181
  # @param [Object] thread_id Value to be assigned
113
182
  def thread_id=(thread_id)
@@ -124,7 +193,9 @@ module Lockally
124
193
  return true if self.equal?(o)
125
194
  self.class == o.class &&
126
195
  id == o.id &&
196
+ message_id == o.message_id &&
127
197
  status == o.status &&
198
+ warning == o.warning &&
128
199
  thread_id == o.thread_id
129
200
  end
130
201
 
@@ -137,7 +208,7 @@ module Lockally
137
208
  # Calculates hash code according to all attributes.
138
209
  # @return [Integer] Hash code
139
210
  def hash
140
- [id, status, thread_id].hash
211
+ [id, message_id, status, warning, thread_id].hash
141
212
  end
142
213
 
143
214
  # Builds the object from hash
@@ -15,15 +15,21 @@ require 'time'
15
15
 
16
16
  module Lockally
17
17
  class MailboxGrant < ApiModelBase
18
- attr_accessor :id
18
+ attr_accessor :api_key_id
19
+
20
+ attr_accessor :mailbox_id
19
21
 
20
22
  attr_accessor :mailbox
21
23
 
24
+ attr_accessor :created_at
25
+
22
26
  # Attribute mapping from ruby-style variable name to JSON key.
23
27
  def self.attribute_map
24
28
  {
25
- :'id' => :'id',
26
- :'mailbox' => :'mailbox'
29
+ :'api_key_id' => :'api_key_id',
30
+ :'mailbox_id' => :'mailbox_id',
31
+ :'mailbox' => :'mailbox',
32
+ :'created_at' => :'created_at'
27
33
  }
28
34
  end
29
35
 
@@ -40,8 +46,10 @@ module Lockally
40
46
  # Attribute type mapping.
41
47
  def self.openapi_types
42
48
  {
43
- :'id' => :'String',
44
- :'mailbox' => :'String'
49
+ :'api_key_id' => :'String',
50
+ :'mailbox_id' => :'String',
51
+ :'mailbox' => :'String',
52
+ :'created_at' => :'Time'
45
53
  }
46
54
  end
47
55
 
@@ -67,13 +75,21 @@ module Lockally
67
75
  h[k.to_sym] = v
68
76
  }
69
77
 
70
- if attributes.key?(:'id')
71
- self.id = attributes[:'id']
78
+ if attributes.key?(:'api_key_id')
79
+ self.api_key_id = attributes[:'api_key_id']
80
+ end
81
+
82
+ if attributes.key?(:'mailbox_id')
83
+ self.mailbox_id = attributes[:'mailbox_id']
72
84
  end
73
85
 
74
86
  if attributes.key?(:'mailbox')
75
87
  self.mailbox = attributes[:'mailbox']
76
88
  end
89
+
90
+ if attributes.key?(:'created_at')
91
+ self.created_at = attributes[:'created_at']
92
+ end
77
93
  end
78
94
 
79
95
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -96,8 +112,10 @@ module Lockally
96
112
  def ==(o)
97
113
  return true if self.equal?(o)
98
114
  self.class == o.class &&
99
- id == o.id &&
100
- mailbox == o.mailbox
115
+ api_key_id == o.api_key_id &&
116
+ mailbox_id == o.mailbox_id &&
117
+ mailbox == o.mailbox &&
118
+ created_at == o.created_at
101
119
  end
102
120
 
103
121
  # @see the `==` method
@@ -109,7 +127,7 @@ module Lockally
109
127
  # Calculates hash code according to all attributes.
110
128
  # @return [Integer] Hash code
111
129
  def hash
112
- [id, mailbox].hash
130
+ [api_key_id, mailbox_id, mailbox, created_at].hash
113
131
  end
114
132
 
115
133
  # Builds the object from hash
@@ -15,12 +15,12 @@ require 'time'
15
15
 
16
16
  module Lockally
17
17
  class MailboxGrantList < ApiModelBase
18
- attr_accessor :mailboxes
18
+ attr_accessor :grants
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :'mailboxes' => :'mailboxes'
23
+ :'grants' => :'grants'
24
24
  }
25
25
  end
26
26
 
@@ -37,7 +37,7 @@ module Lockally
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'mailboxes' => :'Array<MailboxGrant>'
40
+ :'grants' => :'Array<MailboxGrant>'
41
41
  }
42
42
  end
43
43
 
@@ -63,12 +63,12 @@ module Lockally
63
63
  h[k.to_sym] = v
64
64
  }
65
65
 
66
- if attributes.key?(:'mailboxes')
67
- if (value = attributes[:'mailboxes']).is_a?(Array)
68
- self.mailboxes = value
66
+ if attributes.key?(:'grants')
67
+ if (value = attributes[:'grants']).is_a?(Array)
68
+ self.grants = value
69
69
  end
70
70
  else
71
- self.mailboxes = nil
71
+ self.grants = nil
72
72
  end
73
73
  end
74
74
 
@@ -77,8 +77,8 @@ module Lockally
77
77
  def list_invalid_properties
78
78
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
79
  invalid_properties = Array.new
80
- if @mailboxes.nil?
81
- invalid_properties.push('invalid value for "mailboxes", mailboxes cannot be nil.')
80
+ if @grants.nil?
81
+ invalid_properties.push('invalid value for "grants", grants cannot be nil.')
82
82
  end
83
83
 
84
84
  invalid_properties
@@ -88,18 +88,18 @@ module Lockally
88
88
  # @return true if the model is valid
89
89
  def valid?
90
90
  warn '[DEPRECATED] the `valid?` method is obsolete'
91
- return false if @mailboxes.nil?
91
+ return false if @grants.nil?
92
92
  true
93
93
  end
94
94
 
95
95
  # Custom attribute writer method with validation
96
- # @param [Object] mailboxes Value to be assigned
97
- def mailboxes=(mailboxes)
98
- if mailboxes.nil?
99
- fail ArgumentError, 'mailboxes cannot be nil'
96
+ # @param [Object] grants Value to be assigned
97
+ def grants=(grants)
98
+ if grants.nil?
99
+ fail ArgumentError, 'grants cannot be nil'
100
100
  end
101
101
 
102
- @mailboxes = mailboxes
102
+ @grants = grants
103
103
  end
104
104
 
105
105
  # Checks equality by comparing each attribute.
@@ -107,7 +107,7 @@ module Lockally
107
107
  def ==(o)
108
108
  return true if self.equal?(o)
109
109
  self.class == o.class &&
110
- mailboxes == o.mailboxes
110
+ grants == o.grants
111
111
  end
112
112
 
113
113
  # @see the `==` method
@@ -119,7 +119,7 @@ module Lockally
119
119
  # Calculates hash code according to all attributes.
120
120
  # @return [Integer] Hash code
121
121
  def hash
122
- [mailboxes].hash
122
+ [grants].hash
123
123
  end
124
124
 
125
125
  # Builds the object from hash
@@ -15,11 +15,14 @@ require 'time'
15
15
 
16
16
  module Lockally
17
17
  class MarkReadResult < ApiModelBase
18
+ attr_accessor :message_id
19
+
18
20
  attr_accessor :read
19
21
 
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
25
+ :'message_id' => :'message_id',
23
26
  :'read' => :'read'
24
27
  }
25
28
  end
@@ -37,6 +40,7 @@ module Lockally
37
40
  # Attribute type mapping.
38
41
  def self.openapi_types
39
42
  {
43
+ :'message_id' => :'String',
40
44
  :'read' => :'Boolean'
41
45
  }
42
46
  end
@@ -63,6 +67,10 @@ module Lockally
63
67
  h[k.to_sym] = v
64
68
  }
65
69
 
70
+ if attributes.key?(:'message_id')
71
+ self.message_id = attributes[:'message_id']
72
+ end
73
+
66
74
  if attributes.key?(:'read')
67
75
  self.read = attributes[:'read']
68
76
  end
@@ -88,6 +96,7 @@ module Lockally
88
96
  def ==(o)
89
97
  return true if self.equal?(o)
90
98
  self.class == o.class &&
99
+ message_id == o.message_id &&
91
100
  read == o.read
92
101
  end
93
102
 
@@ -100,7 +109,7 @@ module Lockally
100
109
  # Calculates hash code according to all attributes.
101
110
  # @return [Integer] Hash code
102
111
  def hash
103
- [read].hash
112
+ [message_id, read].hash
104
113
  end
105
114
 
106
115
  # Builds the object from hash
@@ -15,17 +15,27 @@ require 'time'
15
15
 
16
16
  module Lockally
17
17
  class SimulatedInbound < ApiModelBase
18
+ attr_accessor :simulated
19
+
20
+ # True when the message was adopted into a thread.
21
+ attr_accessor :indexed
22
+
18
23
  attr_accessor :thread_id
19
24
 
20
25
  attr_accessor :message_id
21
26
 
27
+ attr_accessor :rfc_message_id
28
+
22
29
  attr_accessor :annotations
23
30
 
24
31
  # Attribute mapping from ruby-style variable name to JSON key.
25
32
  def self.attribute_map
26
33
  {
34
+ :'simulated' => :'simulated',
35
+ :'indexed' => :'indexed',
27
36
  :'thread_id' => :'thread_id',
28
37
  :'message_id' => :'message_id',
38
+ :'rfc_message_id' => :'rfc_message_id',
29
39
  :'annotations' => :'annotations'
30
40
  }
31
41
  end
@@ -43,8 +53,11 @@ module Lockally
43
53
  # Attribute type mapping.
44
54
  def self.openapi_types
45
55
  {
56
+ :'simulated' => :'Boolean',
57
+ :'indexed' => :'Boolean',
46
58
  :'thread_id' => :'String',
47
59
  :'message_id' => :'String',
60
+ :'rfc_message_id' => :'String',
48
61
  :'annotations' => :'Annotations'
49
62
  }
50
63
  end
@@ -71,6 +84,14 @@ module Lockally
71
84
  h[k.to_sym] = v
72
85
  }
73
86
 
87
+ if attributes.key?(:'simulated')
88
+ self.simulated = attributes[:'simulated']
89
+ end
90
+
91
+ if attributes.key?(:'indexed')
92
+ self.indexed = attributes[:'indexed']
93
+ end
94
+
74
95
  if attributes.key?(:'thread_id')
75
96
  self.thread_id = attributes[:'thread_id']
76
97
  end
@@ -79,6 +100,10 @@ module Lockally
79
100
  self.message_id = attributes[:'message_id']
80
101
  end
81
102
 
103
+ if attributes.key?(:'rfc_message_id')
104
+ self.rfc_message_id = attributes[:'rfc_message_id']
105
+ end
106
+
82
107
  if attributes.key?(:'annotations')
83
108
  self.annotations = attributes[:'annotations']
84
109
  end
@@ -104,8 +129,11 @@ module Lockally
104
129
  def ==(o)
105
130
  return true if self.equal?(o)
106
131
  self.class == o.class &&
132
+ simulated == o.simulated &&
133
+ indexed == o.indexed &&
107
134
  thread_id == o.thread_id &&
108
135
  message_id == o.message_id &&
136
+ rfc_message_id == o.rfc_message_id &&
109
137
  annotations == o.annotations
110
138
  end
111
139
 
@@ -118,7 +146,7 @@ module Lockally
118
146
  # Calculates hash code according to all attributes.
119
147
  # @return [Integer] Hash code
120
148
  def hash
121
- [thread_id, message_id, annotations].hash
149
+ [simulated, indexed, thread_id, message_id, rfc_message_id, annotations].hash
122
150
  end
123
151
 
124
152
  # Builds the object from hash
@@ -20,6 +20,9 @@ module Lockally
20
20
  # True when a previous classification was reused.
21
21
  attr_accessor :cached
22
22
 
23
+ # True when this call consumed an AI unit.
24
+ attr_accessor :billed
25
+
23
26
  attr_accessor :classification
24
27
 
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -27,6 +30,7 @@ module Lockally
27
30
  {
28
31
  :'thread_id' => :'thread_id',
29
32
  :'cached' => :'cached',
33
+ :'billed' => :'billed',
30
34
  :'classification' => :'classification'
31
35
  }
32
36
  end
@@ -46,6 +50,7 @@ module Lockally
46
50
  {
47
51
  :'thread_id' => :'String',
48
52
  :'cached' => :'Boolean',
53
+ :'billed' => :'Boolean',
49
54
  :'classification' => :'Classification'
50
55
  }
51
56
  end
@@ -82,6 +87,10 @@ module Lockally
82
87
  self.cached = attributes[:'cached']
83
88
  end
84
89
 
90
+ if attributes.key?(:'billed')
91
+ self.billed = attributes[:'billed']
92
+ end
93
+
85
94
  if attributes.key?(:'classification')
86
95
  self.classification = attributes[:'classification']
87
96
  end
@@ -124,6 +133,7 @@ module Lockally
124
133
  self.class == o.class &&
125
134
  thread_id == o.thread_id &&
126
135
  cached == o.cached &&
136
+ billed == o.billed &&
127
137
  classification == o.classification
128
138
  end
129
139
 
@@ -136,7 +146,7 @@ module Lockally
136
146
  # Calculates hash code according to all attributes.
137
147
  # @return [Integer] Hash code
138
148
  def hash
139
- [thread_id, cached, classification].hash
149
+ [thread_id, cached, billed, classification].hash
140
150
  end
141
151
 
142
152
  # Builds the object from hash