zyphr 0.1.53 → 0.1.55
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 +8 -25
- data/docs/AuthApplicationApi.md +66 -0
- data/docs/AuthEmailVerificationApi.md +4 -4
- data/docs/ConfirmEmailVerificationResponseData.md +3 -1
- data/docs/EmailsApi.md +1 -1
- data/docs/ResendEmailVerificationRequest.md +18 -0
- data/docs/SMSApi.md +69 -1
- data/docs/SendEmailVerificationRequest.md +1 -1
- data/docs/WebhookDelivery.md +0 -2
- data/docs/WebhookDeliveryDetail.md +0 -2
- data/docs/WebhooksApi.md +0 -69
- data/lib/zyphr/api/auth_application_api.rb +67 -0
- data/lib/zyphr/api/auth_email_verification_api.rb +7 -7
- data/lib/zyphr/api/emails_api.rb +2 -2
- data/lib/zyphr/api/sms_api.rb +57 -2
- data/lib/zyphr/api/webhooks_api.rb +0 -57
- data/lib/zyphr/models/confirm_email_verification_response_data.rb +14 -4
- data/lib/zyphr/models/{webhook_regions_response.rb → resend_email_verification_request.rb} +11 -19
- data/lib/zyphr/models/send_email_verification_request.rb +1 -1
- data/lib/zyphr/models/webhook_delivery.rb +1 -11
- data/lib/zyphr/models/webhook_delivery_detail.rb +1 -11
- data/lib/zyphr.rb +1 -3
- data/spec/api/auth_application_api_spec.rb +13 -0
- data/spec/api/auth_email_verification_api_spec.rb +3 -3
- data/spec/api/emails_api_spec.rb +1 -1
- data/spec/api/sms_api_spec.rb +12 -1
- data/spec/api/webhooks_api_spec.rb +0 -11
- data/spec/models/confirm_email_verification_response_data_spec.rb +6 -0
- data/spec/models/{webhook_regions_response_spec.rb → resend_email_verification_request_spec.rb} +7 -13
- data/spec/models/webhook_delivery_detail_spec.rb +0 -6
- data/spec/models/webhook_delivery_spec.rb +0 -6
- data/zyphr.gemspec +1 -1
- metadata +494 -502
- data/docs/WebhookRegion.md +0 -22
- data/docs/WebhookRegionsResponse.md +0 -20
- data/docs/WebhookRegionsResponseData.md +0 -20
- data/lib/zyphr/models/webhook_region.rb +0 -240
- data/lib/zyphr/models/webhook_regions_response_data.rb +0 -232
- data/spec/models/webhook_region_spec.rb +0 -48
- data/spec/models/webhook_regions_response_data_spec.rb +0 -42
data/lib/zyphr/api/sms_api.rb
CHANGED
|
@@ -196,6 +196,61 @@ module Zyphr
|
|
|
196
196
|
return data, status_code, headers
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
+
# Get the inbound SMS webhook URL
|
|
200
|
+
# Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr's side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
201
|
+
# @param [Hash] opts the optional parameters
|
|
202
|
+
# @return [nil]
|
|
203
|
+
def get_sms_inbound_webhook(opts = {})
|
|
204
|
+
get_sms_inbound_webhook_with_http_info(opts)
|
|
205
|
+
nil
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Get the inbound SMS webhook URL
|
|
209
|
+
# Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr's side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
210
|
+
# @param [Hash] opts the optional parameters
|
|
211
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
212
|
+
def get_sms_inbound_webhook_with_http_info(opts = {})
|
|
213
|
+
if @api_client.config.debugging
|
|
214
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.get_sms_inbound_webhook ...'
|
|
215
|
+
end
|
|
216
|
+
# resource path
|
|
217
|
+
local_var_path = '/sms/inbound-webhook'
|
|
218
|
+
|
|
219
|
+
# query parameters
|
|
220
|
+
query_params = opts[:query_params] || {}
|
|
221
|
+
|
|
222
|
+
# header parameters
|
|
223
|
+
header_params = opts[:header_params] || {}
|
|
224
|
+
|
|
225
|
+
# form parameters
|
|
226
|
+
form_params = opts[:form_params] || {}
|
|
227
|
+
|
|
228
|
+
# http body (model)
|
|
229
|
+
post_body = opts[:debug_body]
|
|
230
|
+
|
|
231
|
+
# return_type
|
|
232
|
+
return_type = opts[:debug_return_type]
|
|
233
|
+
|
|
234
|
+
# auth_names
|
|
235
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
236
|
+
|
|
237
|
+
new_options = opts.merge(
|
|
238
|
+
:operation => :"SMSApi.get_sms_inbound_webhook",
|
|
239
|
+
:header_params => header_params,
|
|
240
|
+
:query_params => query_params,
|
|
241
|
+
:form_params => form_params,
|
|
242
|
+
:body => post_body,
|
|
243
|
+
:auth_names => auth_names,
|
|
244
|
+
:return_type => return_type
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug "API called: SMSApi#get_sms_inbound_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
250
|
+
end
|
|
251
|
+
return data, status_code, headers
|
|
252
|
+
end
|
|
253
|
+
|
|
199
254
|
# List SMS messages
|
|
200
255
|
# List SMS messages for the account with optional filtering and pagination.
|
|
201
256
|
# @param [Hash] opts the optional parameters
|
|
@@ -342,7 +397,7 @@ module Zyphr
|
|
|
342
397
|
end
|
|
343
398
|
|
|
344
399
|
# Send an SMS message
|
|
345
|
-
# Send a single SMS text message. Supports subscriber preference checks and scheduling.
|
|
400
|
+
# Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
|
|
346
401
|
# @param send_sms_request [SendSmsRequest]
|
|
347
402
|
# @param [Hash] opts the optional parameters
|
|
348
403
|
# @return [SendSmsResponse]
|
|
@@ -352,7 +407,7 @@ module Zyphr
|
|
|
352
407
|
end
|
|
353
408
|
|
|
354
409
|
# Send an SMS message
|
|
355
|
-
# Send a single SMS text message. Supports subscriber preference checks and scheduling.
|
|
410
|
+
# Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
|
|
356
411
|
# @param send_sms_request [SendSmsRequest]
|
|
357
412
|
# @param [Hash] opts the optional parameters
|
|
358
413
|
# @return [Array<(SendSmsResponse, Integer, Hash)>] SendSmsResponse data, response status code and response headers
|
|
@@ -718,63 +718,6 @@ module Zyphr
|
|
|
718
718
|
return data, status_code, headers
|
|
719
719
|
end
|
|
720
720
|
|
|
721
|
-
# Get available webhook regions
|
|
722
|
-
# Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
|
|
723
|
-
# @param [Hash] opts the optional parameters
|
|
724
|
-
# @return [WebhookRegionsResponse]
|
|
725
|
-
def get_webhook_regions(opts = {})
|
|
726
|
-
data, _status_code, _headers = get_webhook_regions_with_http_info(opts)
|
|
727
|
-
data
|
|
728
|
-
end
|
|
729
|
-
|
|
730
|
-
# Get available webhook regions
|
|
731
|
-
# Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
|
|
732
|
-
# @param [Hash] opts the optional parameters
|
|
733
|
-
# @return [Array<(WebhookRegionsResponse, Integer, Hash)>] WebhookRegionsResponse data, response status code and response headers
|
|
734
|
-
def get_webhook_regions_with_http_info(opts = {})
|
|
735
|
-
if @api_client.config.debugging
|
|
736
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.get_webhook_regions ...'
|
|
737
|
-
end
|
|
738
|
-
# resource path
|
|
739
|
-
local_var_path = '/v1/webhooks/regions'
|
|
740
|
-
|
|
741
|
-
# query parameters
|
|
742
|
-
query_params = opts[:query_params] || {}
|
|
743
|
-
|
|
744
|
-
# header parameters
|
|
745
|
-
header_params = opts[:header_params] || {}
|
|
746
|
-
# HTTP header 'Accept' (if needed)
|
|
747
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
748
|
-
|
|
749
|
-
# form parameters
|
|
750
|
-
form_params = opts[:form_params] || {}
|
|
751
|
-
|
|
752
|
-
# http body (model)
|
|
753
|
-
post_body = opts[:debug_body]
|
|
754
|
-
|
|
755
|
-
# return_type
|
|
756
|
-
return_type = opts[:debug_return_type] || 'WebhookRegionsResponse'
|
|
757
|
-
|
|
758
|
-
# auth_names
|
|
759
|
-
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
760
|
-
|
|
761
|
-
new_options = opts.merge(
|
|
762
|
-
:operation => :"WebhooksApi.get_webhook_regions",
|
|
763
|
-
:header_params => header_params,
|
|
764
|
-
:query_params => query_params,
|
|
765
|
-
:form_params => form_params,
|
|
766
|
-
:body => post_body,
|
|
767
|
-
:auth_names => auth_names,
|
|
768
|
-
:return_type => return_type
|
|
769
|
-
)
|
|
770
|
-
|
|
771
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
772
|
-
if @api_client.config.debugging
|
|
773
|
-
@api_client.config.logger.debug "API called: WebhooksApi#get_webhook_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
774
|
-
end
|
|
775
|
-
return data, status_code, headers
|
|
776
|
-
end
|
|
777
|
-
|
|
778
721
|
# Get webhook usage metrics
|
|
779
722
|
# Get webhook delivery usage statistics for the current billing period.
|
|
780
723
|
# @param [Hash] opts the optional parameters
|
|
@@ -19,11 +19,15 @@ module Zyphr
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :email
|
|
21
21
|
|
|
22
|
+
# True when the address was already verified (the emailed link consumed the token on click). Still a 200 — an idempotent success, not an error (sc-7721).
|
|
23
|
+
attr_accessor :already_verified
|
|
24
|
+
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
26
|
def self.attribute_map
|
|
24
27
|
{
|
|
25
28
|
:'success' => :'success',
|
|
26
|
-
:'email' => :'email'
|
|
29
|
+
:'email' => :'email',
|
|
30
|
+
:'already_verified' => :'already_verified'
|
|
27
31
|
}
|
|
28
32
|
end
|
|
29
33
|
|
|
@@ -41,7 +45,8 @@ module Zyphr
|
|
|
41
45
|
def self.openapi_types
|
|
42
46
|
{
|
|
43
47
|
:'success' => :'Boolean',
|
|
44
|
-
:'email' => :'String'
|
|
48
|
+
:'email' => :'String',
|
|
49
|
+
:'already_verified' => :'Boolean'
|
|
45
50
|
}
|
|
46
51
|
end
|
|
47
52
|
|
|
@@ -74,6 +79,10 @@ module Zyphr
|
|
|
74
79
|
if attributes.key?(:'email')
|
|
75
80
|
self.email = attributes[:'email']
|
|
76
81
|
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'already_verified')
|
|
84
|
+
self.already_verified = attributes[:'already_verified']
|
|
85
|
+
end
|
|
77
86
|
end
|
|
78
87
|
|
|
79
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -97,7 +106,8 @@ module Zyphr
|
|
|
97
106
|
return true if self.equal?(o)
|
|
98
107
|
self.class == o.class &&
|
|
99
108
|
success == o.success &&
|
|
100
|
-
email == o.email
|
|
109
|
+
email == o.email &&
|
|
110
|
+
already_verified == o.already_verified
|
|
101
111
|
end
|
|
102
112
|
|
|
103
113
|
# @see the `==` method
|
|
@@ -109,7 +119,7 @@ module Zyphr
|
|
|
109
119
|
# Calculates hash code according to all attributes.
|
|
110
120
|
# @return [Integer] Hash code
|
|
111
121
|
def hash
|
|
112
|
-
[success, email].hash
|
|
122
|
+
[success, email, already_verified].hash
|
|
113
123
|
end
|
|
114
124
|
|
|
115
125
|
# Builds the object from hash
|
|
@@ -14,16 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zyphr
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attr_accessor :meta
|
|
17
|
+
class ResendEmailVerificationRequest
|
|
18
|
+
# URL to redirect to after verification
|
|
19
|
+
attr_accessor :redirect_url
|
|
21
20
|
|
|
22
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
22
|
def self.attribute_map
|
|
24
23
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'meta' => :'meta'
|
|
24
|
+
:'redirect_url' => :'redirect_url'
|
|
27
25
|
}
|
|
28
26
|
end
|
|
29
27
|
|
|
@@ -40,8 +38,7 @@ module Zyphr
|
|
|
40
38
|
# Attribute type mapping.
|
|
41
39
|
def self.openapi_types
|
|
42
40
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'meta' => :'RequestMeta'
|
|
41
|
+
:'redirect_url' => :'String'
|
|
45
42
|
}
|
|
46
43
|
end
|
|
47
44
|
|
|
@@ -55,24 +52,20 @@ module Zyphr
|
|
|
55
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
53
|
def initialize(attributes = {})
|
|
57
54
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::ResendEmailVerificationRequest` initialize method"
|
|
59
56
|
end
|
|
60
57
|
|
|
61
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
59
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
61
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::ResendEmailVerificationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
63
|
end
|
|
67
64
|
h[k.to_sym] = v
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
if attributes.key?(:'
|
|
71
|
-
self.
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
if attributes.key?(:'meta')
|
|
75
|
-
self.meta = attributes[:'meta']
|
|
67
|
+
if attributes.key?(:'redirect_url')
|
|
68
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
76
69
|
end
|
|
77
70
|
end
|
|
78
71
|
|
|
@@ -96,8 +89,7 @@ module Zyphr
|
|
|
96
89
|
def ==(o)
|
|
97
90
|
return true if self.equal?(o)
|
|
98
91
|
self.class == o.class &&
|
|
99
|
-
|
|
100
|
-
meta == o.meta
|
|
92
|
+
redirect_url == o.redirect_url
|
|
101
93
|
end
|
|
102
94
|
|
|
103
95
|
# @see the `==` method
|
|
@@ -109,7 +101,7 @@ module Zyphr
|
|
|
109
101
|
# Calculates hash code according to all attributes.
|
|
110
102
|
# @return [Integer] Hash code
|
|
111
103
|
def hash
|
|
112
|
-
[
|
|
104
|
+
[redirect_url].hash
|
|
113
105
|
end
|
|
114
106
|
|
|
115
107
|
# Builds the object from hash
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zyphr
|
|
17
17
|
class SendEmailVerificationRequest
|
|
18
|
-
# URL to redirect to after verification
|
|
18
|
+
# URL to redirect to after verification (snake_case `redirect_url` — a camelCase `redirectUrl` is ignored and the hosted verification page is used instead). Must match one of the application's configured redirect URIs.
|
|
19
19
|
attr_accessor :redirect_url
|
|
20
20
|
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -43,8 +43,6 @@ module Zyphr
|
|
|
43
43
|
|
|
44
44
|
attr_accessor :completed_at
|
|
45
45
|
|
|
46
|
-
attr_accessor :delivery_region
|
|
47
|
-
|
|
48
46
|
attr_accessor :created_at
|
|
49
47
|
|
|
50
48
|
class EnumAttributeValidator
|
|
@@ -86,7 +84,6 @@ module Zyphr
|
|
|
86
84
|
:'first_attempted_at' => :'first_attempted_at',
|
|
87
85
|
:'last_attempted_at' => :'last_attempted_at',
|
|
88
86
|
:'completed_at' => :'completed_at',
|
|
89
|
-
:'delivery_region' => :'delivery_region',
|
|
90
87
|
:'created_at' => :'created_at'
|
|
91
88
|
}
|
|
92
89
|
end
|
|
@@ -118,7 +115,6 @@ module Zyphr
|
|
|
118
115
|
:'first_attempted_at' => :'Time',
|
|
119
116
|
:'last_attempted_at' => :'Time',
|
|
120
117
|
:'completed_at' => :'Time',
|
|
121
|
-
:'delivery_region' => :'String',
|
|
122
118
|
:'created_at' => :'Time'
|
|
123
119
|
}
|
|
124
120
|
end
|
|
@@ -133,7 +129,6 @@ module Zyphr
|
|
|
133
129
|
:'first_attempted_at',
|
|
134
130
|
:'last_attempted_at',
|
|
135
131
|
:'completed_at',
|
|
136
|
-
:'delivery_region',
|
|
137
132
|
])
|
|
138
133
|
end
|
|
139
134
|
|
|
@@ -209,10 +204,6 @@ module Zyphr
|
|
|
209
204
|
self.completed_at = attributes[:'completed_at']
|
|
210
205
|
end
|
|
211
206
|
|
|
212
|
-
if attributes.key?(:'delivery_region')
|
|
213
|
-
self.delivery_region = attributes[:'delivery_region']
|
|
214
|
-
end
|
|
215
|
-
|
|
216
207
|
if attributes.key?(:'created_at')
|
|
217
208
|
self.created_at = attributes[:'created_at']
|
|
218
209
|
end
|
|
@@ -264,7 +255,6 @@ module Zyphr
|
|
|
264
255
|
first_attempted_at == o.first_attempted_at &&
|
|
265
256
|
last_attempted_at == o.last_attempted_at &&
|
|
266
257
|
completed_at == o.completed_at &&
|
|
267
|
-
delivery_region == o.delivery_region &&
|
|
268
258
|
created_at == o.created_at
|
|
269
259
|
end
|
|
270
260
|
|
|
@@ -277,7 +267,7 @@ module Zyphr
|
|
|
277
267
|
# Calculates hash code according to all attributes.
|
|
278
268
|
# @return [Integer] Hash code
|
|
279
269
|
def hash
|
|
280
|
-
[id, msg_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, last_response_status, latency_ms, last_error, first_attempted_at, last_attempted_at, completed_at,
|
|
270
|
+
[id, msg_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, last_response_status, latency_ms, last_error, first_attempted_at, last_attempted_at, completed_at, created_at].hash
|
|
281
271
|
end
|
|
282
272
|
|
|
283
273
|
# Builds the object from hash
|
|
@@ -44,8 +44,6 @@ module Zyphr
|
|
|
44
44
|
|
|
45
45
|
attr_accessor :completed_at
|
|
46
46
|
|
|
47
|
-
attr_accessor :delivery_region
|
|
48
|
-
|
|
49
47
|
attr_accessor :created_at
|
|
50
48
|
|
|
51
49
|
attr_accessor :payload
|
|
@@ -95,7 +93,6 @@ module Zyphr
|
|
|
95
93
|
:'first_attempted_at' => :'first_attempted_at',
|
|
96
94
|
:'last_attempted_at' => :'last_attempted_at',
|
|
97
95
|
:'completed_at' => :'completed_at',
|
|
98
|
-
:'delivery_region' => :'delivery_region',
|
|
99
96
|
:'created_at' => :'created_at',
|
|
100
97
|
:'payload' => :'payload',
|
|
101
98
|
:'last_response_body' => :'last_response_body',
|
|
@@ -131,7 +128,6 @@ module Zyphr
|
|
|
131
128
|
:'first_attempted_at' => :'Time',
|
|
132
129
|
:'last_attempted_at' => :'Time',
|
|
133
130
|
:'completed_at' => :'Time',
|
|
134
|
-
:'delivery_region' => :'String',
|
|
135
131
|
:'created_at' => :'Time',
|
|
136
132
|
:'payload' => :'Object',
|
|
137
133
|
:'last_response_body' => :'String',
|
|
@@ -150,7 +146,6 @@ module Zyphr
|
|
|
150
146
|
:'first_attempted_at',
|
|
151
147
|
:'last_attempted_at',
|
|
152
148
|
:'completed_at',
|
|
153
|
-
:'delivery_region',
|
|
154
149
|
:'last_response_body',
|
|
155
150
|
:'request_headers',
|
|
156
151
|
:'response_headers'
|
|
@@ -236,10 +231,6 @@ module Zyphr
|
|
|
236
231
|
self.completed_at = attributes[:'completed_at']
|
|
237
232
|
end
|
|
238
233
|
|
|
239
|
-
if attributes.key?(:'delivery_region')
|
|
240
|
-
self.delivery_region = attributes[:'delivery_region']
|
|
241
|
-
end
|
|
242
|
-
|
|
243
234
|
if attributes.key?(:'created_at')
|
|
244
235
|
self.created_at = attributes[:'created_at']
|
|
245
236
|
end
|
|
@@ -307,7 +298,6 @@ module Zyphr
|
|
|
307
298
|
first_attempted_at == o.first_attempted_at &&
|
|
308
299
|
last_attempted_at == o.last_attempted_at &&
|
|
309
300
|
completed_at == o.completed_at &&
|
|
310
|
-
delivery_region == o.delivery_region &&
|
|
311
301
|
created_at == o.created_at &&
|
|
312
302
|
payload == o.payload &&
|
|
313
303
|
last_response_body == o.last_response_body &&
|
|
@@ -324,7 +314,7 @@ module Zyphr
|
|
|
324
314
|
# Calculates hash code according to all attributes.
|
|
325
315
|
# @return [Integer] Hash code
|
|
326
316
|
def hash
|
|
327
|
-
[id, msg_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, last_response_status, latency_ms, last_error, first_attempted_at, last_attempted_at, completed_at,
|
|
317
|
+
[id, msg_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, last_response_status, latency_ms, last_error, first_attempted_at, last_attempted_at, completed_at, created_at, payload, last_response_body, request_headers, response_headers].hash
|
|
328
318
|
end
|
|
329
319
|
|
|
330
320
|
# Builds the object from hash
|
data/lib/zyphr.rb
CHANGED
|
@@ -294,6 +294,7 @@ require 'zyphr/models/render_template_request'
|
|
|
294
294
|
require 'zyphr/models/reorder_workflow_steps_request'
|
|
295
295
|
require 'zyphr/models/replay_webhook_events_request'
|
|
296
296
|
require 'zyphr/models/request_meta'
|
|
297
|
+
require 'zyphr/models/resend_email_verification_request'
|
|
297
298
|
require 'zyphr/models/reset_password_request'
|
|
298
299
|
require 'zyphr/models/reset_password_response'
|
|
299
300
|
require 'zyphr/models/resubscribe_request'
|
|
@@ -498,9 +499,6 @@ require 'zyphr/models/webhook_ips_response_data'
|
|
|
498
499
|
require 'zyphr/models/webhook_job_response'
|
|
499
500
|
require 'zyphr/models/webhook_list_response'
|
|
500
501
|
require 'zyphr/models/webhook_metrics_response'
|
|
501
|
-
require 'zyphr/models/webhook_region'
|
|
502
|
-
require 'zyphr/models/webhook_regions_response'
|
|
503
|
-
require 'zyphr/models/webhook_regions_response_data'
|
|
504
502
|
require 'zyphr/models/webhook_replay_response'
|
|
505
503
|
require 'zyphr/models/webhook_response'
|
|
506
504
|
require 'zyphr/models/webhook_secret_rotate_response'
|
|
@@ -32,6 +32,19 @@ describe 'AuthApplicationApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for export_end_user_data
|
|
36
|
+
# Export all data held about an end user
|
|
37
|
+
# Returns a machine-readable JSON bundle of everything stored about one end user, for answering a GDPR Art. 15 (access) or Art. 20 (portability) request. Zyphr is a **processor**: we do not answer data subjects directly. This endpoint gives you, the controller, the data needed to respond to your own end user. **Credentials are deliberately excluded** and are listed in `export_metadata.excluded`: password hashes, session refresh-token hashes, MFA secrets, OAuth access/refresh tokens and WebAuthn public keys. These are authentication artifacts rather than personal data about the subject, and including them would turn this endpoint into a credential-exfiltration path. Message history is capped at the 1,000 most recent messages; `export_metadata.message_history_truncated` reports whether the cap was hit.
|
|
38
|
+
# @param id Application ID
|
|
39
|
+
# @param user_id End user ID
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [nil]
|
|
42
|
+
describe 'export_end_user_data test' 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
|
+
|
|
35
48
|
# unit tests for get_self_application
|
|
36
49
|
# Get the authenticating application
|
|
37
50
|
# Return non-sensitive metadata about the application whose credentials authenticated this request. Lets an integrator read their own application_id (the sole tenant discriminator embedded in every end-user token) directly from the API, rather than only from the dashboard UI or by decoding a token. Returns only id, name, the calling environment's mode, and the JWT signing algorithm — never secrets, signing keys, or account-internal fields.
|
|
@@ -34,7 +34,7 @@ describe 'AuthEmailVerificationApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for confirm_email_verification
|
|
36
36
|
# Confirm email verification
|
|
37
|
-
# Verify the user's email using
|
|
37
|
+
# Verify the user's email using a token you collected yourself. IMPORTANT: the emailed verification LINK verifies the address server-side **on click** and then redirects to `redirect_url`. So if you take the token off that redirect and post it here, it is already redeemed — and this endpoint treats that as an idempotent **success** (`200` with `already_verified: true`), not an error. Only a genuinely invalid / expired / unknown token returns `400`. `send` / `confirm` / `resend` are NOT a mandatory matched set — `confirm` is for flows where you collect the token directly rather than landing the hosted redirect. Recommended pattern for the redirect landing: call `confirm`, ignore its result, then read the user's verified state back and report that — correct whether or not the link already consumed the token.
|
|
38
38
|
# @param confirm_email_verification_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [ConfirmEmailVerificationResponse]
|
|
@@ -48,7 +48,7 @@ describe 'AuthEmailVerificationApi' do
|
|
|
48
48
|
# Resend email verification
|
|
49
49
|
# Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
|
|
50
50
|
# @param [Hash] opts the optional parameters
|
|
51
|
-
# @option opts [
|
|
51
|
+
# @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
|
|
52
52
|
# @return [SuccessResult]
|
|
53
53
|
describe 'resend_email_verification test' do
|
|
54
54
|
it 'should work' do
|
|
@@ -58,7 +58,7 @@ describe 'AuthEmailVerificationApi' do
|
|
|
58
58
|
|
|
59
59
|
# unit tests for send_email_verification
|
|
60
60
|
# Send email verification
|
|
61
|
-
# Send an email verification link to the authenticated user.
|
|
61
|
+
# Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user's `Authorization: Bearer` token. If the recipient is blocked by the application's `auth_email_mode=allowlist` gate, the request is still **accepted with 200** (mirroring `POST /auth/forgot-password`): no email is sent, and the suppression is recorded as a `messages` row (`status=suppressed`, `status_reason=recipient_not_allowlisted`) and an `email.suppressed` webhook. It is NOT a 500.
|
|
62
62
|
# @param [Hash] opts the optional parameters
|
|
63
63
|
# @option opts [SendEmailVerificationRequest] :send_email_verification_request
|
|
64
64
|
# @return [SuccessResult]
|
data/spec/api/emails_api_spec.rb
CHANGED
|
@@ -97,7 +97,7 @@ describe 'EmailsApi' do
|
|
|
97
97
|
|
|
98
98
|
# unit tests for send_email
|
|
99
99
|
# Send an email
|
|
100
|
-
# Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`.
|
|
100
|
+
# Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`. **CAN-SPAM compliance — actions required from you:** - **Set `classification`** to `transactional` or `marketing`. Unclassified is treated as marketing, the stricter reading. Transactional mail (password resets, receipts) is exempt from the opt-out and postal-address requirements. - **Set your postal address** in project settings. Commercial email must carry a valid physical postal address — the most commonly missed CAN-SPAM element. Marketing sends without one are flagged. - **Include an unsubscribe mechanism** on commercial email. Zyphr enforces suppression automatically once someone opts out, but the link itself is yours to include. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
101
101
|
# @param send_email_request
|
|
102
102
|
# @param [Hash] opts the optional parameters
|
|
103
103
|
# @return [SendEmailResponse]
|
data/spec/api/sms_api_spec.rb
CHANGED
|
@@ -66,6 +66,17 @@ describe 'SMSApi' do
|
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
+
# unit tests for get_sms_inbound_webhook
|
|
70
|
+
# Get the inbound SMS webhook URL
|
|
71
|
+
# Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr's side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
72
|
+
# @param [Hash] opts the optional parameters
|
|
73
|
+
# @return [nil]
|
|
74
|
+
describe 'get_sms_inbound_webhook test' do
|
|
75
|
+
it 'should work' do
|
|
76
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
69
80
|
# unit tests for list_sms
|
|
70
81
|
# List SMS messages
|
|
71
82
|
# List SMS messages for the account with optional filtering and pagination.
|
|
@@ -95,7 +106,7 @@ describe 'SMSApi' do
|
|
|
95
106
|
|
|
96
107
|
# unit tests for send_sms
|
|
97
108
|
# Send an SMS message
|
|
98
|
-
# Send a single SMS text message. Supports subscriber preference checks and scheduling.
|
|
109
|
+
# Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
|
|
99
110
|
# @param send_sms_request
|
|
100
111
|
# @param [Hash] opts the optional parameters
|
|
101
112
|
# @return [SendSmsResponse]
|
|
@@ -164,17 +164,6 @@ describe 'WebhooksApi' do
|
|
|
164
164
|
end
|
|
165
165
|
end
|
|
166
166
|
|
|
167
|
-
# unit tests for get_webhook_regions
|
|
168
|
-
# Get available webhook regions
|
|
169
|
-
# Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
|
|
170
|
-
# @param [Hash] opts the optional parameters
|
|
171
|
-
# @return [WebhookRegionsResponse]
|
|
172
|
-
describe 'get_webhook_regions test' do
|
|
173
|
-
it 'should work' do
|
|
174
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
167
|
# unit tests for get_webhook_usage
|
|
179
168
|
# Get webhook usage metrics
|
|
180
169
|
# Get webhook delivery usage statistics for the current billing period.
|
|
@@ -39,4 +39,10 @@ describe Zyphr::ConfirmEmailVerificationResponseData do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "already_verified"' 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
|
end
|
data/spec/models/{webhook_regions_response_spec.rb → resend_email_verification_request_spec.rb}
RENAMED
|
@@ -14,26 +14,20 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zyphr::
|
|
17
|
+
# Unit tests for Zyphr::ResendEmailVerificationRequest
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zyphr::
|
|
21
|
-
let(:instance) { Zyphr::
|
|
20
|
+
describe Zyphr::ResendEmailVerificationRequest do
|
|
21
|
+
let(:instance) { Zyphr::ResendEmailVerificationRequest.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of ResendEmailVerificationRequest' do
|
|
24
|
+
it 'should create an instance of ResendEmailVerificationRequest' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zyphr::
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::ResendEmailVerificationRequest)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
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 "meta"' do
|
|
30
|
+
describe 'test attribute "redirect_url"' do
|
|
37
31
|
it 'should work' do
|
|
38
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
33
|
end
|
|
@@ -115,12 +115,6 @@ describe Zyphr::WebhookDeliveryDetail do
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
describe 'test attribute "delivery_region"' do
|
|
119
|
-
it 'should work' do
|
|
120
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
|
|
124
118
|
describe 'test attribute "created_at"' do
|
|
125
119
|
it 'should work' do
|
|
126
120
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -115,12 +115,6 @@ describe Zyphr::WebhookDelivery do
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
describe 'test attribute "delivery_region"' do
|
|
119
|
-
it 'should work' do
|
|
120
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
|
|
124
118
|
describe 'test attribute "created_at"' do
|
|
125
119
|
it 'should work' do
|
|
126
120
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|