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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -25
  3. data/docs/AuthApplicationApi.md +66 -0
  4. data/docs/AuthEmailVerificationApi.md +4 -4
  5. data/docs/ConfirmEmailVerificationResponseData.md +3 -1
  6. data/docs/EmailsApi.md +1 -1
  7. data/docs/ResendEmailVerificationRequest.md +18 -0
  8. data/docs/SMSApi.md +69 -1
  9. data/docs/SendEmailVerificationRequest.md +1 -1
  10. data/docs/WebhookDelivery.md +0 -2
  11. data/docs/WebhookDeliveryDetail.md +0 -2
  12. data/docs/WebhooksApi.md +0 -69
  13. data/lib/zyphr/api/auth_application_api.rb +67 -0
  14. data/lib/zyphr/api/auth_email_verification_api.rb +7 -7
  15. data/lib/zyphr/api/emails_api.rb +2 -2
  16. data/lib/zyphr/api/sms_api.rb +57 -2
  17. data/lib/zyphr/api/webhooks_api.rb +0 -57
  18. data/lib/zyphr/models/confirm_email_verification_response_data.rb +14 -4
  19. data/lib/zyphr/models/{webhook_regions_response.rb → resend_email_verification_request.rb} +11 -19
  20. data/lib/zyphr/models/send_email_verification_request.rb +1 -1
  21. data/lib/zyphr/models/webhook_delivery.rb +1 -11
  22. data/lib/zyphr/models/webhook_delivery_detail.rb +1 -11
  23. data/lib/zyphr.rb +1 -3
  24. data/spec/api/auth_application_api_spec.rb +13 -0
  25. data/spec/api/auth_email_verification_api_spec.rb +3 -3
  26. data/spec/api/emails_api_spec.rb +1 -1
  27. data/spec/api/sms_api_spec.rb +12 -1
  28. data/spec/api/webhooks_api_spec.rb +0 -11
  29. data/spec/models/confirm_email_verification_response_data_spec.rb +6 -0
  30. data/spec/models/{webhook_regions_response_spec.rb → resend_email_verification_request_spec.rb} +7 -13
  31. data/spec/models/webhook_delivery_detail_spec.rb +0 -6
  32. data/spec/models/webhook_delivery_spec.rb +0 -6
  33. data/zyphr.gemspec +1 -1
  34. metadata +494 -502
  35. data/docs/WebhookRegion.md +0 -22
  36. data/docs/WebhookRegionsResponse.md +0 -20
  37. data/docs/WebhookRegionsResponseData.md +0 -20
  38. data/lib/zyphr/models/webhook_region.rb +0 -240
  39. data/lib/zyphr/models/webhook_regions_response_data.rb +0 -232
  40. data/spec/models/webhook_region_spec.rb +0 -48
  41. data/spec/models/webhook_regions_response_data_spec.rb +0 -42
@@ -1,22 +0,0 @@
1
- # Zyphr::WebhookRegion
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **code** | **String** | | [optional] |
8
- | **name** | **String** | | [optional] |
9
- | **static_ips** | **Array<String>** | | [optional] |
10
-
11
- ## Example
12
-
13
- ```ruby
14
- require 'zyphr'
15
-
16
- instance = Zyphr::WebhookRegion.new(
17
- code: null,
18
- name: null,
19
- static_ips: null
20
- )
21
- ```
22
-
@@ -1,20 +0,0 @@
1
- # Zyphr::WebhookRegionsResponse
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **data** | [**WebhookRegionsResponseData**](WebhookRegionsResponseData.md) | | [optional] |
8
- | **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
9
-
10
- ## Example
11
-
12
- ```ruby
13
- require 'zyphr'
14
-
15
- instance = Zyphr::WebhookRegionsResponse.new(
16
- data: null,
17
- meta: null
18
- )
19
- ```
20
-
@@ -1,20 +0,0 @@
1
- # Zyphr::WebhookRegionsResponseData
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **regions** | [**Array<WebhookRegion>**](WebhookRegion.md) | | [optional] |
8
- | **default_region** | **String** | Default delivery region | [optional] |
9
-
10
- ## Example
11
-
12
- ```ruby
13
- require 'zyphr'
14
-
15
- instance = Zyphr::WebhookRegionsResponseData.new(
16
- regions: null,
17
- default_region: null
18
- )
19
- ```
20
-
@@ -1,240 +0,0 @@
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 ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 WebhookRegion
18
- attr_accessor :code
19
-
20
- attr_accessor :name
21
-
22
- attr_accessor :static_ips
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'code' => :'code',
28
- :'name' => :'name',
29
- :'static_ips' => :'static_ips'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'code' => :'String',
47
- :'name' => :'String',
48
- :'static_ips' => :'Array<String>'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::WebhookRegion` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- acceptable_attribute_map = self.class.acceptable_attribute_map
67
- attributes = attributes.each_with_object({}) { |(k, v), h|
68
- if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::WebhookRegion`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
- end
71
- h[k.to_sym] = v
72
- }
73
-
74
- if attributes.key?(:'code')
75
- self.code = attributes[:'code']
76
- end
77
-
78
- if attributes.key?(:'name')
79
- self.name = attributes[:'name']
80
- end
81
-
82
- if attributes.key?(:'static_ips')
83
- if (value = attributes[:'static_ips']).is_a?(Array)
84
- self.static_ips = value
85
- end
86
- end
87
- end
88
-
89
- # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properties with the reasons
91
- def list_invalid_properties
92
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
- invalid_properties = Array.new
94
- invalid_properties
95
- end
96
-
97
- # Check to see if the all the properties in the model are valid
98
- # @return true if the model is valid
99
- def valid?
100
- warn '[DEPRECATED] the `valid?` method is obsolete'
101
- true
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- code == o.code &&
110
- name == o.name &&
111
- static_ips == o.static_ips
112
- end
113
-
114
- # @see the `==` method
115
- # @param [Object] Object to be compared
116
- def eql?(o)
117
- self == o
118
- end
119
-
120
- # Calculates hash code according to all attributes.
121
- # @return [Integer] Hash code
122
- def hash
123
- [code, name, static_ips].hash
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def self.build_from_hash(attributes)
130
- return nil unless attributes.is_a?(Hash)
131
- attributes = attributes.transform_keys(&:to_sym)
132
- transformed_hash = {}
133
- openapi_types.each_pair do |key, type|
134
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = nil
136
- elsif type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the attribute
138
- # is documented as an array but the input is not
139
- if attributes[attribute_map[key]].is_a?(Array)
140
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
- end
142
- elsif !attributes[attribute_map[key]].nil?
143
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
- end
145
- end
146
- new(transformed_hash)
147
- end
148
-
149
- # Deserializes the data based on type
150
- # @param string type Data type
151
- # @param string value Value to be deserialized
152
- # @return [Object] Deserialized data
153
- def self._deserialize(type, value)
154
- case type.to_sym
155
- when :Time
156
- Time.parse(value)
157
- when :Date
158
- Date.parse(value)
159
- when :String
160
- value.to_s
161
- when :Integer
162
- value.to_i
163
- when :Float
164
- value.to_f
165
- when :Boolean
166
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
- true
168
- else
169
- false
170
- end
171
- when :Object
172
- # generic object (usually a Hash), return directly
173
- value
174
- when /\AArray<(?<inner_type>.+)>\z/
175
- inner_type = Regexp.last_match[:inner_type]
176
- value.map { |v| _deserialize(inner_type, v) }
177
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
- k_type = Regexp.last_match[:k_type]
179
- v_type = Regexp.last_match[:v_type]
180
- {}.tap do |hash|
181
- value.each do |k, v|
182
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
- end
184
- end
185
- else # model
186
- # models (e.g. Pet) or oneOf
187
- klass = Zyphr.const_get(type)
188
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
- end
190
- end
191
-
192
- # Returns the string representation of the object
193
- # @return [String] String presentation of the object
194
- def to_s
195
- to_hash.to_s
196
- end
197
-
198
- # to_body is an alias to to_hash (backward compatibility)
199
- # @return [Hash] Returns the object in the form of hash
200
- def to_body
201
- to_hash
202
- end
203
-
204
- # Returns the object in the form of hash
205
- # @return [Hash] Returns the object in the form of hash
206
- def to_hash
207
- hash = {}
208
- self.class.attribute_map.each_pair do |attr, param|
209
- value = self.send(attr)
210
- if value.nil?
211
- is_nullable = self.class.openapi_nullable.include?(attr)
212
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
- end
214
-
215
- hash[param] = _to_hash(value)
216
- end
217
- hash
218
- end
219
-
220
- # Outputs non-array value in the form of hash
221
- # For object, use to_hash. Otherwise, just return the value
222
- # @param [Object] value Any valid value
223
- # @return [Hash] Returns the value in the form of hash
224
- def _to_hash(value)
225
- if value.is_a?(Array)
226
- value.compact.map { |v| _to_hash(v) }
227
- elsif value.is_a?(Hash)
228
- {}.tap do |hash|
229
- value.each { |k, v| hash[k] = _to_hash(v) }
230
- end
231
- elsif value.respond_to? :to_hash
232
- value.to_hash
233
- else
234
- value
235
- end
236
- end
237
-
238
- end
239
-
240
- end
@@ -1,232 +0,0 @@
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 ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 WebhookRegionsResponseData
18
- attr_accessor :regions
19
-
20
- # Default delivery region
21
- attr_accessor :default_region
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'regions' => :'regions',
27
- :'default_region' => :'default_region'
28
- }
29
- end
30
-
31
- # Returns attribute mapping this model knows about
32
- def self.acceptable_attribute_map
33
- attribute_map
34
- end
35
-
36
- # Returns all the JSON keys this model knows about
37
- def self.acceptable_attributes
38
- acceptable_attribute_map.values
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.openapi_types
43
- {
44
- :'regions' => :'Array<WebhookRegion>',
45
- :'default_region' => :'String'
46
- }
47
- end
48
-
49
- # List of attributes with nullable: true
50
- def self.openapi_nullable
51
- Set.new([
52
- ])
53
- end
54
-
55
- # Initializes the object
56
- # @param [Hash] attributes Model attributes in the form of hash
57
- def initialize(attributes = {})
58
- if (!attributes.is_a?(Hash))
59
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::WebhookRegionsResponseData` initialize method"
60
- end
61
-
62
- # check to see if the attribute exists and convert string to symbol for hash key
63
- acceptable_attribute_map = self.class.acceptable_attribute_map
64
- attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!acceptable_attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::WebhookRegionsResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
- end
68
- h[k.to_sym] = v
69
- }
70
-
71
- if attributes.key?(:'regions')
72
- if (value = attributes[:'regions']).is_a?(Array)
73
- self.regions = value
74
- end
75
- end
76
-
77
- if attributes.key?(:'default_region')
78
- self.default_region = attributes[:'default_region']
79
- end
80
- end
81
-
82
- # Show invalid properties with the reasons. Usually used together with valid?
83
- # @return Array for valid properties with the reasons
84
- def list_invalid_properties
85
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
- invalid_properties = Array.new
87
- invalid_properties
88
- end
89
-
90
- # Check to see if the all the properties in the model are valid
91
- # @return true if the model is valid
92
- def valid?
93
- warn '[DEPRECATED] the `valid?` method is obsolete'
94
- true
95
- end
96
-
97
- # Checks equality by comparing each attribute.
98
- # @param [Object] Object to be compared
99
- def ==(o)
100
- return true if self.equal?(o)
101
- self.class == o.class &&
102
- regions == o.regions &&
103
- default_region == o.default_region
104
- end
105
-
106
- # @see the `==` method
107
- # @param [Object] Object to be compared
108
- def eql?(o)
109
- self == o
110
- end
111
-
112
- # Calculates hash code according to all attributes.
113
- # @return [Integer] Hash code
114
- def hash
115
- [regions, default_region].hash
116
- end
117
-
118
- # Builds the object from hash
119
- # @param [Hash] attributes Model attributes in the form of hash
120
- # @return [Object] Returns the model itself
121
- def self.build_from_hash(attributes)
122
- return nil unless attributes.is_a?(Hash)
123
- attributes = attributes.transform_keys(&:to_sym)
124
- transformed_hash = {}
125
- openapi_types.each_pair do |key, type|
126
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
- transformed_hash["#{key}"] = nil
128
- elsif type =~ /\AArray<(.*)>/i
129
- # check to ensure the input is an array given that the attribute
130
- # is documented as an array but the input is not
131
- if attributes[attribute_map[key]].is_a?(Array)
132
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
- end
134
- elsif !attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
- end
137
- end
138
- new(transformed_hash)
139
- end
140
-
141
- # Deserializes the data based on type
142
- # @param string type Data type
143
- # @param string value Value to be deserialized
144
- # @return [Object] Deserialized data
145
- def self._deserialize(type, value)
146
- case type.to_sym
147
- when :Time
148
- Time.parse(value)
149
- when :Date
150
- Date.parse(value)
151
- when :String
152
- value.to_s
153
- when :Integer
154
- value.to_i
155
- when :Float
156
- value.to_f
157
- when :Boolean
158
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
- true
160
- else
161
- false
162
- end
163
- when :Object
164
- # generic object (usually a Hash), return directly
165
- value
166
- when /\AArray<(?<inner_type>.+)>\z/
167
- inner_type = Regexp.last_match[:inner_type]
168
- value.map { |v| _deserialize(inner_type, v) }
169
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
- k_type = Regexp.last_match[:k_type]
171
- v_type = Regexp.last_match[:v_type]
172
- {}.tap do |hash|
173
- value.each do |k, v|
174
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
- end
176
- end
177
- else # model
178
- # models (e.g. Pet) or oneOf
179
- klass = Zyphr.const_get(type)
180
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
- end
182
- end
183
-
184
- # Returns the string representation of the object
185
- # @return [String] String presentation of the object
186
- def to_s
187
- to_hash.to_s
188
- end
189
-
190
- # to_body is an alias to to_hash (backward compatibility)
191
- # @return [Hash] Returns the object in the form of hash
192
- def to_body
193
- to_hash
194
- end
195
-
196
- # Returns the object in the form of hash
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_hash
199
- hash = {}
200
- self.class.attribute_map.each_pair do |attr, param|
201
- value = self.send(attr)
202
- if value.nil?
203
- is_nullable = self.class.openapi_nullable.include?(attr)
204
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
- end
206
-
207
- hash[param] = _to_hash(value)
208
- end
209
- hash
210
- end
211
-
212
- # Outputs non-array value in the form of hash
213
- # For object, use to_hash. Otherwise, just return the value
214
- # @param [Object] value Any valid value
215
- # @return [Hash] Returns the value in the form of hash
216
- def _to_hash(value)
217
- if value.is_a?(Array)
218
- value.compact.map { |v| _to_hash(v) }
219
- elsif value.is_a?(Hash)
220
- {}.tap do |hash|
221
- value.each { |k, v| hash[k] = _to_hash(v) }
222
- end
223
- elsif value.respond_to? :to_hash
224
- value.to_hash
225
- else
226
- value
227
- end
228
- end
229
-
230
- end
231
-
232
- end
@@ -1,48 +0,0 @@
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 ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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::WebhookRegion
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe Zyphr::WebhookRegion do
21
- let(:instance) { Zyphr::WebhookRegion.new }
22
-
23
- describe 'test an instance of WebhookRegion' do
24
- it 'should create an instance of WebhookRegion' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zyphr::WebhookRegion)
27
- end
28
- end
29
-
30
- describe 'test attribute "code"' 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 "name"' 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
- describe 'test attribute "static_ips"' 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
-
48
- end
@@ -1,42 +0,0 @@
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 ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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::WebhookRegionsResponseData
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe Zyphr::WebhookRegionsResponseData do
21
- let(:instance) { Zyphr::WebhookRegionsResponseData.new }
22
-
23
- describe 'test an instance of WebhookRegionsResponseData' do
24
- it 'should create an instance of WebhookRegionsResponseData' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zyphr::WebhookRegionsResponseData)
27
- end
28
- end
29
-
30
- describe 'test attribute "regions"' 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 "default_region"' 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