zyphr 0.1.24 → 0.1.26

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -0
  3. data/docs/AuthRegistrationApi.md +137 -0
  4. data/docs/AuthUser.md +6 -0
  5. data/docs/ConvertAnonymousUserRequest.md +49 -0
  6. data/docs/ConvertAnonymousUserRequestOneOf.md +24 -0
  7. data/docs/ConvertAnonymousUserRequestOneOf1.md +24 -0
  8. data/docs/ConvertAnonymousUserRequestOneOf1AppleUser.md +18 -0
  9. data/docs/ConvertAnonymousUserRequestOneOf1AppleUserName.md +20 -0
  10. data/docs/PayloadTooLargeError.md +20 -0
  11. data/docs/PayloadTooLargeErrorError.md +22 -0
  12. data/docs/PayloadTooLargeErrorErrorDetails.md +20 -0
  13. data/docs/SignInAnonymouslyRequest.md +22 -0
  14. data/lib/zyphr/api/auth_registration_api.rb +136 -0
  15. data/lib/zyphr/models/auth_user.rb +33 -1
  16. data/lib/zyphr/models/convert_anonymous_user_request.rb +105 -0
  17. data/lib/zyphr/models/convert_anonymous_user_request_one_of.rb +323 -0
  18. data/lib/zyphr/models/convert_anonymous_user_request_one_of1.rb +324 -0
  19. data/lib/zyphr/models/convert_anonymous_user_request_one_of1_apple_user.rb +221 -0
  20. data/lib/zyphr/models/convert_anonymous_user_request_one_of1_apple_user_name.rb +229 -0
  21. data/lib/zyphr/models/payload_too_large_error.rb +246 -0
  22. data/lib/zyphr/models/payload_too_large_error_error.rb +296 -0
  23. data/lib/zyphr/models/payload_too_large_error_error_details.rb +231 -0
  24. data/lib/zyphr/models/sign_in_anonymously_request.rb +296 -0
  25. data/lib/zyphr.rb +9 -0
  26. data/spec/api/auth_registration_api_spec.rb +24 -0
  27. data/spec/models/auth_user_spec.rb +18 -0
  28. data/spec/models/convert_anonymous_user_request_one_of1_apple_user_name_spec.rb +42 -0
  29. data/spec/models/convert_anonymous_user_request_one_of1_apple_user_spec.rb +36 -0
  30. data/spec/models/convert_anonymous_user_request_one_of1_spec.rb +58 -0
  31. data/spec/models/convert_anonymous_user_request_one_of_spec.rb +58 -0
  32. data/spec/models/convert_anonymous_user_request_spec.rb +32 -0
  33. data/spec/models/payload_too_large_error_error_details_spec.rb +42 -0
  34. data/spec/models/payload_too_large_error_error_spec.rb +52 -0
  35. data/spec/models/payload_too_large_error_spec.rb +42 -0
  36. data/spec/models/sign_in_anonymously_request_spec.rb +48 -0
  37. data/zyphr.gemspec +1 -1
  38. metadata +398 -362
@@ -0,0 +1,296 @@
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 SignInAnonymouslyRequest
18
+ # Stable per-device identifier supplied by the client. Use a cryptographically-random opaque value persisted to client storage on first run.
19
+ attr_accessor :device_id
20
+
21
+ # Optional display name. If omitted, the user has no name until conversion.
22
+ attr_accessor :name
23
+
24
+ attr_accessor :metadata
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'device_id' => :'device_id',
30
+ :'name' => :'name',
31
+ :'metadata' => :'metadata'
32
+ }
33
+ end
34
+
35
+ # Returns attribute mapping this model knows about
36
+ def self.acceptable_attribute_map
37
+ attribute_map
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ acceptable_attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'device_id' => :'String',
49
+ :'name' => :'String',
50
+ :'metadata' => :'Hash<String, Object>'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::SignInAnonymouslyRequest` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ acceptable_attribute_map = self.class.acceptable_attribute_map
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!acceptable_attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::SignInAnonymouslyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'device_id')
77
+ self.device_id = attributes[:'device_id']
78
+ else
79
+ self.device_id = nil
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ end
85
+
86
+ if attributes.key?(:'metadata')
87
+ if (value = attributes[:'metadata']).is_a?(Hash)
88
+ self.metadata = value
89
+ end
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @device_id.nil?
99
+ invalid_properties.push('invalid value for "device_id", device_id cannot be nil.')
100
+ end
101
+
102
+ if @device_id.to_s.length > 256
103
+ invalid_properties.push('invalid value for "device_id", the character length must be smaller than or equal to 256.')
104
+ end
105
+
106
+ if @device_id.to_s.length < 8
107
+ invalid_properties.push('invalid value for "device_id", the character length must be great than or equal to 8.')
108
+ end
109
+
110
+ if !@name.nil? && @name.to_s.length > 256
111
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 256.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ return false if @device_id.nil?
122
+ return false if @device_id.to_s.length > 256
123
+ return false if @device_id.to_s.length < 8
124
+ return false if !@name.nil? && @name.to_s.length > 256
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] device_id Value to be assigned
130
+ def device_id=(device_id)
131
+ if device_id.nil?
132
+ fail ArgumentError, 'device_id cannot be nil'
133
+ end
134
+
135
+ if device_id.to_s.length > 256
136
+ fail ArgumentError, 'invalid value for "device_id", the character length must be smaller than or equal to 256.'
137
+ end
138
+
139
+ if device_id.to_s.length < 8
140
+ fail ArgumentError, 'invalid value for "device_id", the character length must be great than or equal to 8.'
141
+ end
142
+
143
+ @device_id = device_id
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] name Value to be assigned
148
+ def name=(name)
149
+ if name.nil?
150
+ fail ArgumentError, 'name cannot be nil'
151
+ end
152
+
153
+ if name.to_s.length > 256
154
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 256.'
155
+ end
156
+
157
+ @name = name
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ device_id == o.device_id &&
166
+ name == o.name &&
167
+ metadata == o.metadata
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [device_id, name, metadata].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ attributes = attributes.transform_keys(&:to_sym)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
+ end
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
+ end
201
+ end
202
+ new(transformed_hash)
203
+ end
204
+
205
+ # Deserializes the data based on type
206
+ # @param string type Data type
207
+ # @param string value Value to be deserialized
208
+ # @return [Object] Deserialized data
209
+ def self._deserialize(type, value)
210
+ case type.to_sym
211
+ when :Time
212
+ Time.parse(value)
213
+ when :Date
214
+ Date.parse(value)
215
+ when :String
216
+ value.to_s
217
+ when :Integer
218
+ value.to_i
219
+ when :Float
220
+ value.to_f
221
+ when :Boolean
222
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
223
+ true
224
+ else
225
+ false
226
+ end
227
+ when :Object
228
+ # generic object (usually a Hash), return directly
229
+ value
230
+ when /\AArray<(?<inner_type>.+)>\z/
231
+ inner_type = Regexp.last_match[:inner_type]
232
+ value.map { |v| _deserialize(inner_type, v) }
233
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
234
+ k_type = Regexp.last_match[:k_type]
235
+ v_type = Regexp.last_match[:v_type]
236
+ {}.tap do |hash|
237
+ value.each do |k, v|
238
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
239
+ end
240
+ end
241
+ else # model
242
+ # models (e.g. Pet) or oneOf
243
+ klass = Zyphr.const_get(type)
244
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
245
+ end
246
+ end
247
+
248
+ # Returns the string representation of the object
249
+ # @return [String] String presentation of the object
250
+ def to_s
251
+ to_hash.to_s
252
+ end
253
+
254
+ # to_body is an alias to to_hash (backward compatibility)
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_body
257
+ to_hash
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = self.send(attr)
266
+ if value.nil?
267
+ is_nullable = self.class.openapi_nullable.include?(attr)
268
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
269
+ end
270
+
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ # Outputs non-array value in the form of hash
277
+ # For object, use to_hash. Otherwise, just return the value
278
+ # @param [Object] value Any valid value
279
+ # @return [Hash] Returns the value in the form of hash
280
+ def _to_hash(value)
281
+ if value.is_a?(Array)
282
+ value.compact.map { |v| _to_hash(v) }
283
+ elsif value.is_a?(Hash)
284
+ {}.tap do |hash|
285
+ value.each { |k, v| hash[k] = _to_hash(v) }
286
+ end
287
+ elsif value.respond_to? :to_hash
288
+ value.to_hash
289
+ else
290
+ value
291
+ end
292
+ end
293
+
294
+ end
295
+
296
+ end
data/lib/zyphr.rb CHANGED
@@ -66,6 +66,11 @@ require 'zyphr/models/consent_record_response_data'
66
66
  require 'zyphr/models/consent_status'
67
67
  require 'zyphr/models/consent_status_response'
68
68
  require 'zyphr/models/consent_withdraw_response'
69
+ require 'zyphr/models/convert_anonymous_user_request'
70
+ require 'zyphr/models/convert_anonymous_user_request_one_of'
71
+ require 'zyphr/models/convert_anonymous_user_request_one_of1'
72
+ require 'zyphr/models/convert_anonymous_user_request_one_of1_apple_user'
73
+ require 'zyphr/models/convert_anonymous_user_request_one_of1_apple_user_name'
69
74
  require 'zyphr/models/create_category_request'
70
75
  require 'zyphr/models/create_subscriber_request'
71
76
  require 'zyphr/models/create_template_request'
@@ -172,6 +177,9 @@ require 'zyphr/models/pagination_meta'
172
177
  require 'zyphr/models/password_requirements'
173
178
  require 'zyphr/models/password_requirements_response'
174
179
  require 'zyphr/models/password_requirements_response_data'
180
+ require 'zyphr/models/payload_too_large_error'
181
+ require 'zyphr/models/payload_too_large_error_error'
182
+ require 'zyphr/models/payload_too_large_error_error_details'
175
183
  require 'zyphr/models/phone_auth_availability_response'
176
184
  require 'zyphr/models/phone_auth_availability_response_data'
177
185
  require 'zyphr/models/phone_login_verify_request'
@@ -253,6 +261,7 @@ require 'zyphr/models/session_list_response_data'
253
261
  require 'zyphr/models/session_list_response_data_session_info'
254
262
  require 'zyphr/models/set_preferences_request'
255
263
  require 'zyphr/models/set_preferences_request_preferences_inner'
264
+ require 'zyphr/models/sign_in_anonymously_request'
256
265
  require 'zyphr/models/slack_message'
257
266
  require 'zyphr/models/slack_message_list_response'
258
267
  require 'zyphr/models/slack_message_list_response_meta'
@@ -32,6 +32,18 @@ describe 'AuthRegistrationApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for convert_anonymous_user
36
+ # Convert anonymous account to a full account
37
+ # Upgrade the calling anonymous user to a full email+password account in place. The end_user.id is preserved, so customer-domain tables with foreign keys to end_users.id need no migration on conversion. All prior sessions for the user (including the anonymous token used to make this call) are revoked. A fresh token pair is returned in the response body. The conversion is the moment the user becomes billable -- MAU is tracked from this point forward.
38
+ # @param convert_anonymous_user_request
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [AuthResultResponse]
41
+ describe 'convert_anonymous_user 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
+
35
47
  # unit tests for register_end_user
36
48
  # Register a new end user
37
49
  # Register a new end user with email and password.
@@ -44,4 +56,16 @@ describe 'AuthRegistrationApi' do
44
56
  end
45
57
  end
46
58
 
59
+ # unit tests for sign_in_anonymously
60
+ # Sign in anonymously
61
+ # Issue an end-user identity to a device without email, password, OAuth, or any other credential. Idempotent per (application, environment, device_id): repeated calls with the same device_id return the same user but a fresh token pair. Prior sessions for the user remain valid until natural expiry. Anonymous users do not count toward MAU quota until their first authenticated request after sign-in (excluding /v1/auth/refresh). Convert an anonymous user to a full account via POST /v1/auth/users/convert.
62
+ # @param sign_in_anonymously_request
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [AuthResultResponse]
65
+ describe 'sign_in_anonymously 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
+
47
71
  end
@@ -91,6 +91,24 @@ describe Zyphr::AuthUser do
91
91
  end
92
92
  end
93
93
 
94
+ describe 'test attribute "is_anonymous"' do
95
+ it 'should work' do
96
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
97
+ end
98
+ end
99
+
100
+ describe 'test attribute "anonymous_device_id"' 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
+ describe 'test attribute "first_activity_at"' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
109
+ end
110
+ end
111
+
94
112
  describe 'test attribute "created_at"' do
95
113
  it 'should work' do
96
114
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -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::ConvertAnonymousUserRequestOneOf1AppleUserName
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::ConvertAnonymousUserRequestOneOf1AppleUserName do
21
+ let(:instance) { Zyphr::ConvertAnonymousUserRequestOneOf1AppleUserName.new }
22
+
23
+ describe 'test an instance of ConvertAnonymousUserRequestOneOf1AppleUserName' do
24
+ it 'should create an instance of ConvertAnonymousUserRequestOneOf1AppleUserName' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::ConvertAnonymousUserRequestOneOf1AppleUserName)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "first_name"' 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 "last_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
+ 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::ConvertAnonymousUserRequestOneOf1AppleUser
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::ConvertAnonymousUserRequestOneOf1AppleUser do
21
+ let(:instance) { Zyphr::ConvertAnonymousUserRequestOneOf1AppleUser.new }
22
+
23
+ describe 'test an instance of ConvertAnonymousUserRequestOneOf1AppleUser' do
24
+ it 'should create an instance of ConvertAnonymousUserRequestOneOf1AppleUser' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::ConvertAnonymousUserRequestOneOf1AppleUser)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "name"' 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,58 @@
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::ConvertAnonymousUserRequestOneOf1
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::ConvertAnonymousUserRequestOneOf1 do
21
+ let(:instance) { Zyphr::ConvertAnonymousUserRequestOneOf1.new }
22
+
23
+ describe 'test an instance of ConvertAnonymousUserRequestOneOf1' do
24
+ it 'should create an instance of ConvertAnonymousUserRequestOneOf1' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::ConvertAnonymousUserRequestOneOf1)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "method"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["oauth"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.method = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "code"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "state"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "apple_user"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
+ end
56
+ end
57
+
58
+ end
@@ -0,0 +1,58 @@
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::ConvertAnonymousUserRequestOneOf
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::ConvertAnonymousUserRequestOneOf do
21
+ let(:instance) { Zyphr::ConvertAnonymousUserRequestOneOf.new }
22
+
23
+ describe 'test an instance of ConvertAnonymousUserRequestOneOf' do
24
+ it 'should create an instance of ConvertAnonymousUserRequestOneOf' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::ConvertAnonymousUserRequestOneOf)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "method"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["password"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.method = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "email"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "password"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "name"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
+ end
56
+ end
57
+
58
+ end
@@ -0,0 +1,32 @@
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::ConvertAnonymousUserRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::ConvertAnonymousUserRequest do
21
+ describe '.openapi_one_of' do
22
+ it 'lists the items referenced in the oneOf array' do
23
+ expect(described_class.openapi_one_of).to_not be_empty
24
+ end
25
+ end
26
+
27
+ describe '.build' do
28
+ it 'returns the correct model' do
29
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
30
+ end
31
+ end
32
+ 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::PayloadTooLargeErrorErrorDetails
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::PayloadTooLargeErrorErrorDetails do
21
+ let(:instance) { Zyphr::PayloadTooLargeErrorErrorDetails.new }
22
+
23
+ describe 'test an instance of PayloadTooLargeErrorErrorDetails' do
24
+ it 'should create an instance of PayloadTooLargeErrorErrorDetails' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::PayloadTooLargeErrorErrorDetails)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "limit_bytes"' 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 "received_bytes"' 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