zyphr 0.1.0 → 0.1.2

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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -0
  3. data/docs/BatchPublishWaaSEvents201Response.md +18 -0
  4. data/docs/CreateWaaSApplication201Response.md +18 -0
  5. data/docs/CreateWaaSApplicationRequest.md +22 -0
  6. data/docs/CreateWaaSEndpoint201Response.md +18 -0
  7. data/docs/CreateWaaSEndpointRequest.md +22 -0
  8. data/docs/CreateWaaSEndpointResponse.md +30 -0
  9. data/docs/CreateWaaSEventType201Response.md +18 -0
  10. data/docs/CreateWaaSEventTypeRequest.md +26 -0
  11. data/docs/GenerateWaaSPortalToken201Response.md +18 -0
  12. data/docs/GetWaaSEndpoint200Response.md +18 -0
  13. data/docs/GetWaaSUsage200Response.md +18 -0
  14. data/docs/ListWaaSApplications200Response.md +18 -0
  15. data/docs/ListWaaSEndpointDeliveries200Response.md +18 -0
  16. data/docs/ListWaaSEndpoints200Response.md +18 -0
  17. data/docs/ListWaaSEventTypes200Response.md +18 -0
  18. data/docs/PublishWaaSEvent201Response.md +18 -0
  19. data/docs/UpdateWaaSApplicationRequest.md +22 -0
  20. data/docs/UpdateWaaSEndpointRequest.md +22 -0
  21. data/docs/UpdateWaaSEventTypeRequest.md +24 -0
  22. data/docs/WaaSApplication.md +32 -0
  23. data/docs/WaaSApplicationsApi.md +446 -0
  24. data/docs/WaaSBatchPublishRequest.md +18 -0
  25. data/docs/WaaSBatchPublishResponse.md +22 -0
  26. data/docs/WaaSDeliveriesApi.md +319 -0
  27. data/docs/WaaSDelivery.md +38 -0
  28. data/docs/WaaSEndpoint.md +32 -0
  29. data/docs/WaaSEndpointsApi.md +673 -0
  30. data/docs/WaaSEventType.md +36 -0
  31. data/docs/WaaSEventTypesApi.md +454 -0
  32. data/docs/WaaSEventsApi.md +155 -0
  33. data/docs/WaaSPortalApi.md +81 -0
  34. data/docs/WaaSPortalTokenRequest.md +24 -0
  35. data/docs/WaaSPortalTokenRequestTheme.md +20 -0
  36. data/docs/WaaSPortalTokenResponse.md +20 -0
  37. data/docs/WaaSPublishEventRequest.md +24 -0
  38. data/docs/WaaSPublishEventResponse.md +26 -0
  39. data/docs/WaaSUsageResponse.md +28 -0
  40. data/lib/zyphr/api/waa_s_applications_api.rb +425 -0
  41. data/lib/zyphr/api/waa_s_deliveries_api.rb +316 -0
  42. data/lib/zyphr/api/waa_s_endpoints_api.rb +653 -0
  43. data/lib/zyphr/api/waa_s_event_types_api.rb +452 -0
  44. data/lib/zyphr/api/waa_s_events_api.rb +170 -0
  45. data/lib/zyphr/api/waa_s_portal_api.rb +96 -0
  46. data/lib/zyphr/models/batch_publish_waa_s_events201_response.rb +220 -0
  47. data/lib/zyphr/models/create_waa_s_application201_response.rb +220 -0
  48. data/lib/zyphr/models/create_waa_s_application_request.rb +275 -0
  49. data/lib/zyphr/models/create_waa_s_endpoint201_response.rb +220 -0
  50. data/lib/zyphr/models/create_waa_s_endpoint_request.rb +294 -0
  51. data/lib/zyphr/models/create_waa_s_endpoint_response.rb +277 -0
  52. data/lib/zyphr/models/create_waa_s_event_type201_response.rb +220 -0
  53. data/lib/zyphr/models/create_waa_s_event_type_request.rb +292 -0
  54. data/lib/zyphr/models/generate_waa_s_portal_token201_response.rb +220 -0
  55. data/lib/zyphr/models/get_waa_s_endpoint200_response.rb +220 -0
  56. data/lib/zyphr/models/get_waa_s_usage200_response.rb +220 -0
  57. data/lib/zyphr/models/list_waa_s_applications200_response.rb +222 -0
  58. data/lib/zyphr/models/list_waa_s_endpoint_deliveries200_response.rb +222 -0
  59. data/lib/zyphr/models/list_waa_s_endpoints200_response.rb +222 -0
  60. data/lib/zyphr/models/list_waa_s_event_types200_response.rb +222 -0
  61. data/lib/zyphr/models/publish_waa_s_event201_response.rb +220 -0
  62. data/lib/zyphr/models/update_waa_s_application_request.rb +272 -0
  63. data/lib/zyphr/models/update_waa_s_endpoint_request.rb +274 -0
  64. data/lib/zyphr/models/update_waa_s_event_type_request.rb +247 -0
  65. data/lib/zyphr/models/waa_s_application.rb +317 -0
  66. data/lib/zyphr/models/waa_s_batch_publish_request.rb +248 -0
  67. data/lib/zyphr/models/waa_s_batch_publish_response.rb +240 -0
  68. data/lib/zyphr/models/waa_s_delivery.rb +344 -0
  69. data/lib/zyphr/models/waa_s_endpoint.rb +319 -0
  70. data/lib/zyphr/models/waa_s_event_type.rb +335 -0
  71. data/lib/zyphr/models/waa_s_portal_token_request.rb +267 -0
  72. data/lib/zyphr/models/waa_s_portal_token_request_theme.rb +263 -0
  73. data/lib/zyphr/models/waa_s_portal_token_response.rb +229 -0
  74. data/lib/zyphr/models/waa_s_publish_event_request.rb +302 -0
  75. data/lib/zyphr/models/waa_s_publish_event_response.rb +256 -0
  76. data/lib/zyphr/models/waa_s_usage_response.rb +265 -0
  77. data/lib/zyphr.rb +37 -0
  78. data/spec/api/waa_s_applications_api_spec.rb +110 -0
  79. data/spec/api/waa_s_deliveries_api_spec.rb +94 -0
  80. data/spec/api/waa_s_endpoints_api_spec.rb +154 -0
  81. data/spec/api/waa_s_event_types_api_spec.rb +115 -0
  82. data/spec/api/waa_s_events_api_spec.rb +61 -0
  83. data/spec/api/waa_s_portal_api_spec.rb +48 -0
  84. data/spec/models/batch_publish_waa_s_events201_response_spec.rb +36 -0
  85. data/spec/models/create_waa_s_application201_response_spec.rb +36 -0
  86. data/spec/models/create_waa_s_application_request_spec.rb +48 -0
  87. data/spec/models/create_waa_s_endpoint201_response_spec.rb +36 -0
  88. data/spec/models/create_waa_s_endpoint_request_spec.rb +48 -0
  89. data/spec/models/create_waa_s_endpoint_response_spec.rb +72 -0
  90. data/spec/models/create_waa_s_event_type201_response_spec.rb +36 -0
  91. data/spec/models/create_waa_s_event_type_request_spec.rb +60 -0
  92. data/spec/models/generate_waa_s_portal_token201_response_spec.rb +36 -0
  93. data/spec/models/get_waa_s_endpoint200_response_spec.rb +36 -0
  94. data/spec/models/get_waa_s_usage200_response_spec.rb +36 -0
  95. data/spec/models/list_waa_s_applications200_response_spec.rb +36 -0
  96. data/spec/models/list_waa_s_endpoint_deliveries200_response_spec.rb +36 -0
  97. data/spec/models/list_waa_s_endpoints200_response_spec.rb +36 -0
  98. data/spec/models/list_waa_s_event_types200_response_spec.rb +36 -0
  99. data/spec/models/publish_waa_s_event201_response_spec.rb +36 -0
  100. data/spec/models/update_waa_s_application_request_spec.rb +52 -0
  101. data/spec/models/update_waa_s_endpoint_request_spec.rb +52 -0
  102. data/spec/models/update_waa_s_event_type_request_spec.rb +54 -0
  103. data/spec/models/waa_s_application_spec.rb +82 -0
  104. data/spec/models/waa_s_batch_publish_request_spec.rb +36 -0
  105. data/spec/models/waa_s_batch_publish_response_spec.rb +48 -0
  106. data/spec/models/waa_s_delivery_spec.rb +100 -0
  107. data/spec/models/waa_s_endpoint_spec.rb +82 -0
  108. data/spec/models/waa_s_event_type_spec.rb +94 -0
  109. data/spec/models/waa_s_portal_token_request_spec.rb +54 -0
  110. data/spec/models/waa_s_portal_token_request_theme_spec.rb +46 -0
  111. data/spec/models/waa_s_portal_token_response_spec.rb +42 -0
  112. data/spec/models/waa_s_publish_event_request_spec.rb +54 -0
  113. data/spec/models/waa_s_publish_event_response_spec.rb +60 -0
  114. data/spec/models/waa_s_usage_response_spec.rb +66 -0
  115. data/zyphr.gemspec +1 -1
  116. metadata +150 -2
@@ -0,0 +1,265 @@
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 WaaSUsageResponse
18
+ attr_accessor :applications_count
19
+
20
+ attr_accessor :applications_limit
21
+
22
+ attr_accessor :endpoints_count
23
+
24
+ attr_accessor :endpoints_limit
25
+
26
+ attr_accessor :events_this_month
27
+
28
+ attr_accessor :events_limit
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'applications_count' => :'applications_count',
34
+ :'applications_limit' => :'applications_limit',
35
+ :'endpoints_count' => :'endpoints_count',
36
+ :'endpoints_limit' => :'endpoints_limit',
37
+ :'events_this_month' => :'events_this_month',
38
+ :'events_limit' => :'events_limit'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'applications_count' => :'Integer',
56
+ :'applications_limit' => :'Integer',
57
+ :'endpoints_count' => :'Integer',
58
+ :'endpoints_limit' => :'Integer',
59
+ :'events_this_month' => :'Integer',
60
+ :'events_limit' => :'Integer'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::WaaSUsageResponse` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::WaaSUsageResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'applications_count')
87
+ self.applications_count = attributes[:'applications_count']
88
+ end
89
+
90
+ if attributes.key?(:'applications_limit')
91
+ self.applications_limit = attributes[:'applications_limit']
92
+ end
93
+
94
+ if attributes.key?(:'endpoints_count')
95
+ self.endpoints_count = attributes[:'endpoints_count']
96
+ end
97
+
98
+ if attributes.key?(:'endpoints_limit')
99
+ self.endpoints_limit = attributes[:'endpoints_limit']
100
+ end
101
+
102
+ if attributes.key?(:'events_this_month')
103
+ self.events_this_month = attributes[:'events_this_month']
104
+ end
105
+
106
+ if attributes.key?(:'events_limit')
107
+ self.events_limit = attributes[:'events_limit']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
+ true
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(o)
129
+ return true if self.equal?(o)
130
+ self.class == o.class &&
131
+ applications_count == o.applications_count &&
132
+ applications_limit == o.applications_limit &&
133
+ endpoints_count == o.endpoints_count &&
134
+ endpoints_limit == o.endpoints_limit &&
135
+ events_this_month == o.events_this_month &&
136
+ events_limit == o.events_limit
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [applications_count, applications_limit, endpoints_count, endpoints_limit, events_this_month, events_limit].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def self._deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = Zyphr.const_get(type)
213
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end
data/lib/zyphr.rb CHANGED
@@ -31,6 +31,7 @@ require 'zyphr/models/auth_tokens'
31
31
  require 'zyphr/models/auth_user'
32
32
  require 'zyphr/models/auth_user_response'
33
33
  require 'zyphr/models/auth_user_response_data'
34
+ require 'zyphr/models/batch_publish_waa_s_events201_response'
34
35
  require 'zyphr/models/bulk_retry_webhook_deliveries_request'
35
36
  require 'zyphr/models/category'
36
37
  require 'zyphr/models/category_list_response'
@@ -49,6 +50,13 @@ require 'zyphr/models/create_category_request'
49
50
  require 'zyphr/models/create_subscriber_request'
50
51
  require 'zyphr/models/create_template_request'
51
52
  require 'zyphr/models/create_topic_request'
53
+ require 'zyphr/models/create_waa_s_application201_response'
54
+ require 'zyphr/models/create_waa_s_application_request'
55
+ require 'zyphr/models/create_waa_s_endpoint201_response'
56
+ require 'zyphr/models/create_waa_s_endpoint_request'
57
+ require 'zyphr/models/create_waa_s_endpoint_response'
58
+ require 'zyphr/models/create_waa_s_event_type201_response'
59
+ require 'zyphr/models/create_waa_s_event_type_request'
52
60
  require 'zyphr/models/create_webhook_request'
53
61
  require 'zyphr/models/delete_result'
54
62
  require 'zyphr/models/delete_result_data'
@@ -75,10 +83,17 @@ require 'zyphr/models/email_tracking_response'
75
83
  require 'zyphr/models/end_user_delete_response'
76
84
  require 'zyphr/models/end_user_delete_response_data'
77
85
  require 'zyphr/models/forgot_password_request'
86
+ require 'zyphr/models/generate_waa_s_portal_token201_response'
87
+ require 'zyphr/models/get_waa_s_endpoint200_response'
88
+ require 'zyphr/models/get_waa_s_usage200_response'
78
89
  require 'zyphr/models/in_app_notification'
79
90
  require 'zyphr/models/inbox_list_meta'
80
91
  require 'zyphr/models/inbox_list_response'
81
92
  require 'zyphr/models/inbox_notification_response'
93
+ require 'zyphr/models/list_waa_s_applications200_response'
94
+ require 'zyphr/models/list_waa_s_endpoint_deliveries200_response'
95
+ require 'zyphr/models/list_waa_s_endpoints200_response'
96
+ require 'zyphr/models/list_waa_s_event_types200_response'
82
97
  require 'zyphr/models/login_request'
83
98
  require 'zyphr/models/magic_link_send_request'
84
99
  require 'zyphr/models/magic_link_verify_request'
@@ -136,6 +151,7 @@ require 'zyphr/models/phone_otp_sent_response'
136
151
  require 'zyphr/models/phone_otp_sent_response_data'
137
152
  require 'zyphr/models/phone_register_verify_request'
138
153
  require 'zyphr/models/preference_list_response'
154
+ require 'zyphr/models/publish_waa_s_event201_response'
139
155
  require 'zyphr/models/push_detail_response'
140
156
  require 'zyphr/models/push_event'
141
157
  require 'zyphr/models/push_list_response'
@@ -253,6 +269,9 @@ require 'zyphr/models/update_end_user_request'
253
269
  require 'zyphr/models/update_subscriber_request'
254
270
  require 'zyphr/models/update_template_request'
255
271
  require 'zyphr/models/update_topic_request'
272
+ require 'zyphr/models/update_waa_s_application_request'
273
+ require 'zyphr/models/update_waa_s_endpoint_request'
274
+ require 'zyphr/models/update_waa_s_event_type_request'
256
275
  require 'zyphr/models/update_webhook_request'
257
276
  require 'zyphr/models/upsert_sms_config_request'
258
277
  require 'zyphr/models/user_devices_delete_response'
@@ -262,6 +281,18 @@ require 'zyphr/models/validate_reset_token_response'
262
281
  require 'zyphr/models/validate_reset_token_response_data'
263
282
  require 'zyphr/models/verify_sms_config_data'
264
283
  require 'zyphr/models/verify_sms_config_response'
284
+ require 'zyphr/models/waa_s_application'
285
+ require 'zyphr/models/waa_s_batch_publish_request'
286
+ require 'zyphr/models/waa_s_batch_publish_response'
287
+ require 'zyphr/models/waa_s_delivery'
288
+ require 'zyphr/models/waa_s_endpoint'
289
+ require 'zyphr/models/waa_s_event_type'
290
+ require 'zyphr/models/waa_s_portal_token_request'
291
+ require 'zyphr/models/waa_s_portal_token_request_theme'
292
+ require 'zyphr/models/waa_s_portal_token_response'
293
+ require 'zyphr/models/waa_s_publish_event_request'
294
+ require 'zyphr/models/waa_s_publish_event_response'
295
+ require 'zyphr/models/waa_s_usage_response'
265
296
  require 'zyphr/models/web_authn_challenge_options'
266
297
  require 'zyphr/models/web_authn_credential'
267
298
  require 'zyphr/models/web_authn_credential_list_response'
@@ -336,6 +367,12 @@ require 'zyphr/api/subscribers_api'
336
367
  require 'zyphr/api/templates_api'
337
368
  require 'zyphr/api/topics_api'
338
369
  require 'zyphr/api/utility_api'
370
+ require 'zyphr/api/waa_s_applications_api'
371
+ require 'zyphr/api/waa_s_deliveries_api'
372
+ require 'zyphr/api/waa_s_endpoints_api'
373
+ require 'zyphr/api/waa_s_event_types_api'
374
+ require 'zyphr/api/waa_s_events_api'
375
+ require 'zyphr/api/waa_s_portal_api'
339
376
  require 'zyphr/api/webhooks_api'
340
377
 
341
378
  module Zyphr
@@ -0,0 +1,110 @@
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::WaaSApplicationsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'WaaSApplicationsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = Zyphr::WaaSApplicationsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of WaaSApplicationsApi' do
30
+ it 'should create an instance of WaaSApplicationsApi' do
31
+ expect(@api_instance).to be_instance_of(Zyphr::WaaSApplicationsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_waa_s_application
36
+ # Create a WaaS application
37
+ # Create a new Webhooks-as-a-Service application.
38
+ # @param create_waa_s_application_request
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [CreateWaaSApplication201Response]
41
+ describe 'create_waa_s_application 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_waa_s_application
48
+ # Delete a WaaS application
49
+ # Delete a WaaS application and all associated event types, endpoints, and delivery logs.
50
+ # @param app_id
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [nil]
53
+ describe 'delete_waa_s_application 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_waa_s_application
60
+ # Get a WaaS application
61
+ # Get a specific Webhooks-as-a-Service application by ID.
62
+ # @param app_id
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [CreateWaaSApplication201Response]
65
+ describe 'get_waa_s_application 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_waa_s_usage
72
+ # Get WaaS usage
73
+ # Get current usage counts and plan limits for WaaS resources.
74
+ # @param app_id
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [GetWaaSUsage200Response]
77
+ describe 'get_waa_s_usage 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_waa_s_applications
84
+ # List WaaS applications
85
+ # List all Webhooks-as-a-Service applications in the workspace.
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [Integer] :limit
88
+ # @option opts [Integer] :offset
89
+ # @option opts [String] :status
90
+ # @return [ListWaaSApplications200Response]
91
+ describe 'list_waa_s_applications test' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
94
+ end
95
+ end
96
+
97
+ # unit tests for update_waa_s_application
98
+ # Update a WaaS application
99
+ # Update the name, description, or status of a WaaS application.
100
+ # @param app_id
101
+ # @param update_waa_s_application_request
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [CreateWaaSApplication201Response]
104
+ describe 'update_waa_s_application test' do
105
+ it 'should work' do
106
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
107
+ end
108
+ end
109
+
110
+ end
@@ -0,0 +1,94 @@
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::WaaSDeliveriesApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'WaaSDeliveriesApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = Zyphr::WaaSDeliveriesApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of WaaSDeliveriesApi' do
30
+ it 'should create an instance of WaaSDeliveriesApi' do
31
+ expect(@api_instance).to be_instance_of(Zyphr::WaaSDeliveriesApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_waa_s_delivery
36
+ # Get delivery detail
37
+ # Get full delivery details including request/response data.
38
+ # @param app_id
39
+ # @param delivery_id
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [nil]
42
+ describe 'get_waa_s_delivery test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ # unit tests for list_waa_s_deliveries
49
+ # List deliveries
50
+ # List delivery records for a WaaS application. Filter by tenant, event type, or status.
51
+ # @param app_id
52
+ # @param [Hash] opts the optional parameters
53
+ # @option opts [Integer] :limit
54
+ # @option opts [Integer] :offset
55
+ # @option opts [String] :tenant_id
56
+ # @option opts [String] :event_type
57
+ # @option opts [String] :status
58
+ # @return [ListWaaSEndpointDeliveries200Response]
59
+ describe 'list_waa_s_deliveries test' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
62
+ end
63
+ end
64
+
65
+ # unit tests for list_waa_s_endpoint_deliveries
66
+ # List endpoint deliveries
67
+ # List deliveries for a specific endpoint.
68
+ # @param app_id
69
+ # @param endpoint_id
70
+ # @param [Hash] opts the optional parameters
71
+ # @option opts [Integer] :limit
72
+ # @option opts [Integer] :offset
73
+ # @option opts [String] :status
74
+ # @return [ListWaaSEndpointDeliveries200Response]
75
+ describe 'list_waa_s_endpoint_deliveries test' do
76
+ it 'should work' do
77
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
78
+ end
79
+ end
80
+
81
+ # unit tests for retry_waa_s_delivery
82
+ # Retry a delivery
83
+ # Retry a failed or exhausted delivery. Resets the delivery status and re-queues it.
84
+ # @param app_id
85
+ # @param delivery_id
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [nil]
88
+ describe 'retry_waa_s_delivery 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
+ end