zyphr 0.1.46 → 0.1.47

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: 77f15d268b6cde06333ab1c4730afbd297f5f5eab479921e5e43b65704f78f8a
4
- data.tar.gz: b1018ca20b1b79c6e8eb6dbab973e046175ee9e3950bbb96fa734e608f12893a
3
+ metadata.gz: 1631c8b08187f685f9ba0705937529c10b793216403e569e084b19bbe76eed98
4
+ data.tar.gz: d459bb04c1089992c9c18a2287a5cdf859fdef80e94fe8859a78b659c4b56c4c
5
5
  SHA512:
6
- metadata.gz: b918028f5a8ebf48f6573951e75b17fdee5f96ea7943416e9240f513be9f3b9204fee331e52ca355d82eb9ad111198ba5cf53bbcd7fe02641ef924d04e0aab24
7
- data.tar.gz: 0e714ffc0bddf9ca677f420e2a97a4e4f1ae63612dd4935a417c0fb0a0f3c0cfb7a407a577a0b43a41819bdd9a012ae28259ce4cf138488b10e4d086abaf5f13
6
+ metadata.gz: dbdbfe7cb026b80ff24bfb3760983f9be06c4aaa2da6bdcd3d1386e29ac838c0ce1a927cfedfa48079ca3aab11dd4c6a4f47e065064c82a382253fdeeb01a14f
7
+ data.tar.gz: befc207eb3218353d296f8b14466fdb9fcf53a008c576381c843c998c8875bad60131e5bdb0b97785eb7bbd9aedc501e09f882ed1d3157f46f6350e771e65a1c
data/docs/EmailMessage.md CHANGED
@@ -9,6 +9,7 @@
9
9
  | **to** | [**EmailAddress**](EmailAddress.md) | | [optional] |
10
10
  | **subject** | **String** | | [optional] |
11
11
  | **status** | **String** | | [optional] |
12
+ | **status_reason** | **String** | Why the message is in its current status, when applicable. For a `suppressed` row this is the suppression reason (e.g. `recipient_not_allowlisted` when blocked by the auth application's test_recipients allowlist). Null for normal sends. | [optional] |
12
13
  | **tags** | **Array<String>** | | [optional] |
13
14
  | **queued_at** | **Time** | | [optional] |
14
15
  | **sent_at** | **Time** | | [optional] |
@@ -29,6 +30,7 @@ instance = Zyphr::EmailMessage.new(
29
30
  to: null,
30
31
  subject: null,
31
32
  status: null,
33
+ status_reason: null,
32
34
  tags: null,
33
35
  queued_at: null,
34
36
  sent_at: null,
@@ -233,7 +233,7 @@ module Zyphr
233
233
  if @api_client.config.debugging
234
234
  @api_client.config.logger.debug 'Calling API: EmailsApi.list_emails ...'
235
235
  end
236
- allowable_values = ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"]
236
+ allowable_values = ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"]
237
237
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
238
238
  fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
239
239
  end
@@ -25,6 +25,9 @@ module Zyphr
25
25
 
26
26
  attr_accessor :status
27
27
 
28
+ # Why the message is in its current status, when applicable. For a `suppressed` row this is the suppression reason (e.g. `recipient_not_allowlisted` when blocked by the auth application's test_recipients allowlist). Null for normal sends.
29
+ attr_accessor :status_reason
30
+
28
31
  attr_accessor :tags
29
32
 
30
33
  attr_accessor :queued_at
@@ -71,6 +74,7 @@ module Zyphr
71
74
  :'to' => :'to',
72
75
  :'subject' => :'subject',
73
76
  :'status' => :'status',
77
+ :'status_reason' => :'status_reason',
74
78
  :'tags' => :'tags',
75
79
  :'queued_at' => :'queued_at',
76
80
  :'sent_at' => :'sent_at',
@@ -100,6 +104,7 @@ module Zyphr
100
104
  :'to' => :'EmailAddress',
101
105
  :'subject' => :'String',
102
106
  :'status' => :'String',
107
+ :'status_reason' => :'String',
103
108
  :'tags' => :'Array<String>',
104
109
  :'queued_at' => :'Time',
105
110
  :'sent_at' => :'Time',
@@ -114,6 +119,7 @@ module Zyphr
114
119
  # List of attributes with nullable: true
115
120
  def self.openapi_nullable
116
121
  Set.new([
122
+ :'status_reason',
117
123
  :'sent_at',
118
124
  :'delivered_at',
119
125
  :'bounced_at',
@@ -158,6 +164,10 @@ module Zyphr
158
164
  self.status = attributes[:'status']
159
165
  end
160
166
 
167
+ if attributes.key?(:'status_reason')
168
+ self.status_reason = attributes[:'status_reason']
169
+ end
170
+
161
171
  if attributes.key?(:'tags')
162
172
  if (value = attributes[:'tags']).is_a?(Array)
163
173
  self.tags = value
@@ -205,7 +215,7 @@ module Zyphr
205
215
  # @return true if the model is valid
206
216
  def valid?
207
217
  warn '[DEPRECATED] the `valid?` method is obsolete'
208
- status_validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"])
218
+ status_validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"])
209
219
  return false unless status_validator.valid?(@status)
210
220
  true
211
221
  end
@@ -213,7 +223,7 @@ module Zyphr
213
223
  # Custom attribute writer method checking allowed values (enum).
214
224
  # @param [Object] status Object to be assigned
215
225
  def status=(status)
216
- validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"])
226
+ validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"])
217
227
  unless validator.valid?(status)
218
228
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
219
229
  end
@@ -230,6 +240,7 @@ module Zyphr
230
240
  to == o.to &&
231
241
  subject == o.subject &&
232
242
  status == o.status &&
243
+ status_reason == o.status_reason &&
233
244
  tags == o.tags &&
234
245
  queued_at == o.queued_at &&
235
246
  sent_at == o.sent_at &&
@@ -249,7 +260,7 @@ module Zyphr
249
260
  # Calculates hash code according to all attributes.
250
261
  # @return [Integer] Hash code
251
262
  def hash
252
- [id, from, to, subject, status, tags, queued_at, sent_at, delivered_at, bounced_at, opened_at, clicked_at, created_at].hash
263
+ [id, from, to, subject, status, status_reason, tags, queued_at, sent_at, delivered_at, bounced_at, opened_at, clicked_at, created_at].hash
253
264
  end
254
265
 
255
266
  # Builds the object from hash
@@ -54,13 +54,19 @@ describe Zyphr::EmailMessage do
54
54
  describe 'test attribute "status"' do
55
55
  it 'should work' do
56
56
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"])
57
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"])
58
58
  # validator.allowable_values.each do |value|
59
59
  # expect { instance.status = value }.not_to raise_error
60
60
  # end
61
61
  end
62
62
  end
63
63
 
64
+ describe 'test attribute "status_reason"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
64
70
  describe 'test attribute "tags"' do
65
71
  it 'should work' do
66
72
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
data/zyphr.gemspec CHANGED
@@ -17,7 +17,7 @@ require "zyphr/version"
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = "zyphr"
20
- s.version = '0.1.46'
20
+ s.version = '0.1.47'
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Zyphr"]
23
23
  s.email = ["support@zyphr.dev"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zyphr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.46
4
+ version: 0.1.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zyphr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-31 00:00:00.000000000 Z
11
+ date: 2026-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday