zyphr 0.1.26 → 0.1.28
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 +21 -0
- data/docs/AddDomain200Response.md +20 -0
- data/docs/AddDomain200ResponseMeta.md +20 -0
- data/docs/AddDomainRequest.md +18 -0
- data/docs/DeleteDomainResponse.md +20 -0
- data/docs/DeleteDomainResponseData.md +20 -0
- data/docs/DnsRecord.md +26 -0
- data/docs/DomainListResponse.md +20 -0
- data/docs/DomainListResponseMeta.md +24 -0
- data/docs/DomainResponse.md +38 -0
- data/docs/DomainsApi.md +436 -0
- data/docs/GetDomain200Response.md +20 -0
- data/docs/GetDomain200ResponseMeta.md +18 -0
- data/docs/VerificationStatusResponse.md +20 -0
- data/docs/VerificationStatusResponseData.md +32 -0
- data/docs/VerifyDomainResponse.md +20 -0
- data/docs/VerifyDomainResponseData.md +24 -0
- data/lib/zyphr/api/domains_api.rb +399 -0
- data/lib/zyphr/models/add_domain200_response.rb +229 -0
- data/lib/zyphr/models/add_domain200_response_meta.rb +229 -0
- data/lib/zyphr/models/add_domain_request.rb +238 -0
- data/lib/zyphr/models/delete_domain_response.rb +263 -0
- data/lib/zyphr/models/delete_domain_response_data.rb +263 -0
- data/lib/zyphr/models/dns_record.rb +373 -0
- data/lib/zyphr/models/domain_list_response.rb +265 -0
- data/lib/zyphr/models/domain_list_response_meta.rb +249 -0
- data/lib/zyphr/models/domain_response.rb +463 -0
- data/lib/zyphr/models/get_domain200_response.rb +229 -0
- data/lib/zyphr/models/get_domain200_response_meta.rb +220 -0
- data/lib/zyphr/models/verification_status_response.rb +263 -0
- data/lib/zyphr/models/verification_status_response_data.rb +415 -0
- data/lib/zyphr/models/verify_domain_response.rb +263 -0
- data/lib/zyphr/models/verify_domain_response_data.rb +339 -0
- data/lib/zyphr.rb +16 -0
- data/spec/api/domains_api_spec.rb +106 -0
- data/spec/models/add_domain200_response_meta_spec.rb +42 -0
- data/spec/models/add_domain200_response_spec.rb +42 -0
- data/spec/models/add_domain_request_spec.rb +36 -0
- data/spec/models/delete_domain_response_data_spec.rb +42 -0
- data/spec/models/delete_domain_response_spec.rb +42 -0
- data/spec/models/dns_record_spec.rb +68 -0
- data/spec/models/domain_list_response_meta_spec.rb +54 -0
- data/spec/models/domain_list_response_spec.rb +42 -0
- data/spec/models/domain_response_spec.rb +100 -0
- data/spec/models/get_domain200_response_meta_spec.rb +36 -0
- data/spec/models/get_domain200_response_spec.rb +42 -0
- data/spec/models/verification_status_response_data_spec.rb +82 -0
- data/spec/models/verification_status_response_spec.rb +42 -0
- data/spec/models/verify_domain_response_data_spec.rb +58 -0
- data/spec/models/verify_domain_response_spec.rb +42 -0
- data/zyphr.gemspec +1 -1
- metadata +435 -371
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zyphr
|
|
17
|
+
class VerifyDomainResponseData
|
|
18
|
+
attr_accessor :job_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :domain_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :domain
|
|
23
|
+
|
|
24
|
+
attr_accessor :status
|
|
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
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'job_id' => :'job_id',
|
|
52
|
+
:'domain_id' => :'domain_id',
|
|
53
|
+
:'domain' => :'domain',
|
|
54
|
+
:'status' => :'status'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
acceptable_attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'job_id' => :'String',
|
|
72
|
+
:'domain_id' => :'String',
|
|
73
|
+
:'domain' => :'String',
|
|
74
|
+
:'status' => :'String'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# List of attributes with nullable: true
|
|
79
|
+
def self.openapi_nullable
|
|
80
|
+
Set.new([
|
|
81
|
+
])
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::VerifyDomainResponseData` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::VerifyDomainResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'job_id')
|
|
101
|
+
self.job_id = attributes[:'job_id']
|
|
102
|
+
else
|
|
103
|
+
self.job_id = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'domain_id')
|
|
107
|
+
self.domain_id = attributes[:'domain_id']
|
|
108
|
+
else
|
|
109
|
+
self.domain_id = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'domain')
|
|
113
|
+
self.domain = attributes[:'domain']
|
|
114
|
+
else
|
|
115
|
+
self.domain = nil
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'status')
|
|
119
|
+
self.status = attributes[:'status']
|
|
120
|
+
else
|
|
121
|
+
self.status = nil
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
+
# @return Array for valid properties with the reasons
|
|
127
|
+
def list_invalid_properties
|
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
|
+
invalid_properties = Array.new
|
|
130
|
+
if @job_id.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "job_id", job_id cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @domain_id.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "domain_id", domain_id cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @domain.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @status.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
invalid_properties
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Check to see if the all the properties in the model are valid
|
|
150
|
+
# @return true if the model is valid
|
|
151
|
+
def valid?
|
|
152
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
153
|
+
return false if @job_id.nil?
|
|
154
|
+
return false if @domain_id.nil?
|
|
155
|
+
return false if @domain.nil?
|
|
156
|
+
return false if @status.nil?
|
|
157
|
+
status_validator = EnumAttributeValidator.new('String', ["verifying"])
|
|
158
|
+
return false unless status_validator.valid?(@status)
|
|
159
|
+
true
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] job_id Value to be assigned
|
|
164
|
+
def job_id=(job_id)
|
|
165
|
+
if job_id.nil?
|
|
166
|
+
fail ArgumentError, 'job_id cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@job_id = job_id
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method with validation
|
|
173
|
+
# @param [Object] domain_id Value to be assigned
|
|
174
|
+
def domain_id=(domain_id)
|
|
175
|
+
if domain_id.nil?
|
|
176
|
+
fail ArgumentError, 'domain_id cannot be nil'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
@domain_id = domain_id
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method with validation
|
|
183
|
+
# @param [Object] domain Value to be assigned
|
|
184
|
+
def domain=(domain)
|
|
185
|
+
if domain.nil?
|
|
186
|
+
fail ArgumentError, 'domain cannot be nil'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
@domain = domain
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
193
|
+
# @param [Object] status Object to be assigned
|
|
194
|
+
def status=(status)
|
|
195
|
+
validator = EnumAttributeValidator.new('String', ["verifying"])
|
|
196
|
+
unless validator.valid?(status)
|
|
197
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
198
|
+
end
|
|
199
|
+
@status = status
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Checks equality by comparing each attribute.
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def ==(o)
|
|
205
|
+
return true if self.equal?(o)
|
|
206
|
+
self.class == o.class &&
|
|
207
|
+
job_id == o.job_id &&
|
|
208
|
+
domain_id == o.domain_id &&
|
|
209
|
+
domain == o.domain &&
|
|
210
|
+
status == o.status
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Integer] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[job_id, domain_id, domain, status].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Builds the object from hash
|
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
227
|
+
# @return [Object] Returns the model itself
|
|
228
|
+
def self.build_from_hash(attributes)
|
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
231
|
+
transformed_hash = {}
|
|
232
|
+
openapi_types.each_pair do |key, type|
|
|
233
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
234
|
+
transformed_hash["#{key}"] = nil
|
|
235
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
236
|
+
# check to ensure the input is an array given that the attribute
|
|
237
|
+
# is documented as an array but the input is not
|
|
238
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
239
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
240
|
+
end
|
|
241
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
242
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
new(transformed_hash)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Deserializes the data based on type
|
|
249
|
+
# @param string type Data type
|
|
250
|
+
# @param string value Value to be deserialized
|
|
251
|
+
# @return [Object] Deserialized data
|
|
252
|
+
def self._deserialize(type, value)
|
|
253
|
+
case type.to_sym
|
|
254
|
+
when :Time
|
|
255
|
+
Time.parse(value)
|
|
256
|
+
when :Date
|
|
257
|
+
Date.parse(value)
|
|
258
|
+
when :String
|
|
259
|
+
value.to_s
|
|
260
|
+
when :Integer
|
|
261
|
+
value.to_i
|
|
262
|
+
when :Float
|
|
263
|
+
value.to_f
|
|
264
|
+
when :Boolean
|
|
265
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
266
|
+
true
|
|
267
|
+
else
|
|
268
|
+
false
|
|
269
|
+
end
|
|
270
|
+
when :Object
|
|
271
|
+
# generic object (usually a Hash), return directly
|
|
272
|
+
value
|
|
273
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
274
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
275
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
276
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
277
|
+
k_type = Regexp.last_match[:k_type]
|
|
278
|
+
v_type = Regexp.last_match[:v_type]
|
|
279
|
+
{}.tap do |hash|
|
|
280
|
+
value.each do |k, v|
|
|
281
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
else # model
|
|
285
|
+
# models (e.g. Pet) or oneOf
|
|
286
|
+
klass = Zyphr.const_get(type)
|
|
287
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Returns the string representation of the object
|
|
292
|
+
# @return [String] String presentation of the object
|
|
293
|
+
def to_s
|
|
294
|
+
to_hash.to_s
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
|
299
|
+
def to_body
|
|
300
|
+
to_hash
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Returns the object in the form of hash
|
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
|
305
|
+
def to_hash
|
|
306
|
+
hash = {}
|
|
307
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
308
|
+
value = self.send(attr)
|
|
309
|
+
if value.nil?
|
|
310
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
311
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
hash[param] = _to_hash(value)
|
|
315
|
+
end
|
|
316
|
+
hash
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Outputs non-array value in the form of hash
|
|
320
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
321
|
+
# @param [Object] value Any valid value
|
|
322
|
+
# @return [Hash] Returns the value in the form of hash
|
|
323
|
+
def _to_hash(value)
|
|
324
|
+
if value.is_a?(Array)
|
|
325
|
+
value.compact.map { |v| _to_hash(v) }
|
|
326
|
+
elsif value.is_a?(Hash)
|
|
327
|
+
{}.tap do |hash|
|
|
328
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
329
|
+
end
|
|
330
|
+
elsif value.respond_to? :to_hash
|
|
331
|
+
value.to_hash
|
|
332
|
+
else
|
|
333
|
+
value
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
end
|
data/lib/zyphr.rb
CHANGED
|
@@ -17,6 +17,9 @@ require 'zyphr/version'
|
|
|
17
17
|
require 'zyphr/configuration'
|
|
18
18
|
|
|
19
19
|
# Models
|
|
20
|
+
require 'zyphr/models/add_domain200_response'
|
|
21
|
+
require 'zyphr/models/add_domain200_response_meta'
|
|
22
|
+
require 'zyphr/models/add_domain_request'
|
|
20
23
|
require 'zyphr/models/add_topic_subscribers_request'
|
|
21
24
|
require 'zyphr/models/api_error'
|
|
22
25
|
require 'zyphr/models/api_error_error'
|
|
@@ -83,6 +86,8 @@ require 'zyphr/models/create_waa_s_endpoint_response'
|
|
|
83
86
|
require 'zyphr/models/create_waa_s_event_type201_response'
|
|
84
87
|
require 'zyphr/models/create_waa_s_event_type_request'
|
|
85
88
|
require 'zyphr/models/create_webhook_request'
|
|
89
|
+
require 'zyphr/models/delete_domain_response'
|
|
90
|
+
require 'zyphr/models/delete_domain_response_data'
|
|
86
91
|
require 'zyphr/models/delete_result'
|
|
87
92
|
require 'zyphr/models/delete_result_data'
|
|
88
93
|
require 'zyphr/models/device'
|
|
@@ -93,6 +98,10 @@ require 'zyphr/models/device_push_topic_list_response_meta'
|
|
|
93
98
|
require 'zyphr/models/device_response'
|
|
94
99
|
require 'zyphr/models/device_stats'
|
|
95
100
|
require 'zyphr/models/device_stats_response'
|
|
101
|
+
require 'zyphr/models/dns_record'
|
|
102
|
+
require 'zyphr/models/domain_list_response'
|
|
103
|
+
require 'zyphr/models/domain_list_response_meta'
|
|
104
|
+
require 'zyphr/models/domain_response'
|
|
96
105
|
require 'zyphr/models/email_address'
|
|
97
106
|
require 'zyphr/models/email_attachment'
|
|
98
107
|
require 'zyphr/models/email_event'
|
|
@@ -117,6 +126,8 @@ require 'zyphr/models/generate_subscriber_token200_response'
|
|
|
117
126
|
require 'zyphr/models/generate_subscriber_token200_response_data'
|
|
118
127
|
require 'zyphr/models/generate_subscriber_token_request'
|
|
119
128
|
require 'zyphr/models/generate_waa_s_portal_token201_response'
|
|
129
|
+
require 'zyphr/models/get_domain200_response'
|
|
130
|
+
require 'zyphr/models/get_domain200_response_meta'
|
|
120
131
|
require 'zyphr/models/get_waa_s_endpoint200_response'
|
|
121
132
|
require 'zyphr/models/get_waa_s_usage200_response'
|
|
122
133
|
require 'zyphr/models/in_app_notification'
|
|
@@ -329,6 +340,10 @@ require 'zyphr/models/user_devices_delete_response_data'
|
|
|
329
340
|
require 'zyphr/models/validate_reset_token_request'
|
|
330
341
|
require 'zyphr/models/validate_reset_token_response'
|
|
331
342
|
require 'zyphr/models/validate_reset_token_response_data'
|
|
343
|
+
require 'zyphr/models/verification_status_response'
|
|
344
|
+
require 'zyphr/models/verification_status_response_data'
|
|
345
|
+
require 'zyphr/models/verify_domain_response'
|
|
346
|
+
require 'zyphr/models/verify_domain_response_data'
|
|
332
347
|
require 'zyphr/models/verify_sms_config_data'
|
|
333
348
|
require 'zyphr/models/verify_sms_config_response'
|
|
334
349
|
require 'zyphr/models/waa_s_application'
|
|
@@ -414,6 +429,7 @@ require 'zyphr/api/auth_sessions_api'
|
|
|
414
429
|
require 'zyphr/api/auth_user_profile_api'
|
|
415
430
|
require 'zyphr/api/auth_web_authn_api'
|
|
416
431
|
require 'zyphr/api/devices_api'
|
|
432
|
+
require 'zyphr/api/domains_api'
|
|
417
433
|
require 'zyphr/api/emails_api'
|
|
418
434
|
require 'zyphr/api/executions_api'
|
|
419
435
|
require 'zyphr/api/inbox_api'
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Zyphr::DomainsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DomainsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Zyphr::DomainsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DomainsApi' do
|
|
30
|
+
it 'should create an instance of DomainsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Zyphr::DomainsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for add_domain
|
|
36
|
+
# Add a sending domain
|
|
37
|
+
# Register a new sending domain on the account. Returns the full set of DNS records that must be published before email can send from this domain. **Idempotent:** calling this with a domain already registered on the current project returns the existing domain (200) instead of erroring, so re-runs from IaC tooling are safe.
|
|
38
|
+
# @param add_domain_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [AddDomain200Response]
|
|
41
|
+
describe 'add_domain test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for delete_domain
|
|
48
|
+
# Remove a sending domain
|
|
49
|
+
# Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
|
|
50
|
+
# @param id
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [DeleteDomainResponse]
|
|
53
|
+
describe 'delete_domain test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for get_domain
|
|
60
|
+
# Get a sending domain
|
|
61
|
+
# Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
62
|
+
# @param id
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [GetDomain200Response]
|
|
65
|
+
describe 'get_domain test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for get_domain_verification_status
|
|
72
|
+
# Get domain verification status
|
|
73
|
+
# Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
|
|
74
|
+
# @param id Domain ID
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @return [VerificationStatusResponse]
|
|
77
|
+
describe 'get_domain_verification_status test' do
|
|
78
|
+
it 'should work' do
|
|
79
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# unit tests for list_domains
|
|
84
|
+
# List sending domains
|
|
85
|
+
# List sending domains on the current project, with verification status and DNS records.
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [DomainListResponse]
|
|
88
|
+
describe 'list_domains test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# unit tests for verify_domain
|
|
95
|
+
# Trigger domain verification
|
|
96
|
+
# Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
|
|
97
|
+
# @param id
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [VerifyDomainResponse]
|
|
100
|
+
describe 'verify_domain test' do
|
|
101
|
+
it 'should work' do
|
|
102
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::AddDomain200ResponseMeta
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::AddDomain200ResponseMeta do
|
|
21
|
+
let(:instance) { Zyphr::AddDomain200ResponseMeta.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AddDomain200ResponseMeta' do
|
|
24
|
+
it 'should create an instance of AddDomain200ResponseMeta' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::AddDomain200ResponseMeta)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "request_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 "message"' 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
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::AddDomain200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::AddDomain200Response do
|
|
21
|
+
let(:instance) { Zyphr::AddDomain200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AddDomain200Response' do
|
|
24
|
+
it 'should create an instance of AddDomain200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::AddDomain200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' 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 "meta"' 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
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::AddDomainRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::AddDomainRequest do
|
|
21
|
+
let(:instance) { Zyphr::AddDomainRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AddDomainRequest' do
|
|
24
|
+
it 'should create an instance of AddDomainRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::AddDomainRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "domain"' 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
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::DeleteDomainResponseData
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::DeleteDomainResponseData do
|
|
21
|
+
let(:instance) { Zyphr::DeleteDomainResponseData.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DeleteDomainResponseData' do
|
|
24
|
+
it 'should create an instance of DeleteDomainResponseData' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::DeleteDomainResponseData)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "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 "deleted"' 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
|
+
|
|
42
|
+
end
|