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.
- checksums.yaml +4 -4
- data/README.md +59 -0
- data/docs/BatchPublishWaaSEvents201Response.md +18 -0
- data/docs/CreateWaaSApplication201Response.md +18 -0
- data/docs/CreateWaaSApplicationRequest.md +22 -0
- data/docs/CreateWaaSEndpoint201Response.md +18 -0
- data/docs/CreateWaaSEndpointRequest.md +22 -0
- data/docs/CreateWaaSEndpointResponse.md +30 -0
- data/docs/CreateWaaSEventType201Response.md +18 -0
- data/docs/CreateWaaSEventTypeRequest.md +26 -0
- data/docs/GenerateWaaSPortalToken201Response.md +18 -0
- data/docs/GetWaaSEndpoint200Response.md +18 -0
- data/docs/GetWaaSUsage200Response.md +18 -0
- data/docs/ListWaaSApplications200Response.md +18 -0
- data/docs/ListWaaSEndpointDeliveries200Response.md +18 -0
- data/docs/ListWaaSEndpoints200Response.md +18 -0
- data/docs/ListWaaSEventTypes200Response.md +18 -0
- data/docs/PublishWaaSEvent201Response.md +18 -0
- data/docs/UpdateWaaSApplicationRequest.md +22 -0
- data/docs/UpdateWaaSEndpointRequest.md +22 -0
- data/docs/UpdateWaaSEventTypeRequest.md +24 -0
- data/docs/WaaSApplication.md +32 -0
- data/docs/WaaSApplicationsApi.md +446 -0
- data/docs/WaaSBatchPublishRequest.md +18 -0
- data/docs/WaaSBatchPublishResponse.md +22 -0
- data/docs/WaaSDeliveriesApi.md +319 -0
- data/docs/WaaSDelivery.md +38 -0
- data/docs/WaaSEndpoint.md +32 -0
- data/docs/WaaSEndpointsApi.md +673 -0
- data/docs/WaaSEventType.md +36 -0
- data/docs/WaaSEventTypesApi.md +454 -0
- data/docs/WaaSEventsApi.md +155 -0
- data/docs/WaaSPortalApi.md +81 -0
- data/docs/WaaSPortalTokenRequest.md +24 -0
- data/docs/WaaSPortalTokenRequestTheme.md +20 -0
- data/docs/WaaSPortalTokenResponse.md +20 -0
- data/docs/WaaSPublishEventRequest.md +24 -0
- data/docs/WaaSPublishEventResponse.md +26 -0
- data/docs/WaaSUsageResponse.md +28 -0
- data/lib/zyphr/api/waa_s_applications_api.rb +425 -0
- data/lib/zyphr/api/waa_s_deliveries_api.rb +316 -0
- data/lib/zyphr/api/waa_s_endpoints_api.rb +653 -0
- data/lib/zyphr/api/waa_s_event_types_api.rb +452 -0
- data/lib/zyphr/api/waa_s_events_api.rb +170 -0
- data/lib/zyphr/api/waa_s_portal_api.rb +96 -0
- data/lib/zyphr/models/batch_publish_waa_s_events201_response.rb +220 -0
- data/lib/zyphr/models/create_waa_s_application201_response.rb +220 -0
- data/lib/zyphr/models/create_waa_s_application_request.rb +275 -0
- data/lib/zyphr/models/create_waa_s_endpoint201_response.rb +220 -0
- data/lib/zyphr/models/create_waa_s_endpoint_request.rb +294 -0
- data/lib/zyphr/models/create_waa_s_endpoint_response.rb +277 -0
- data/lib/zyphr/models/create_waa_s_event_type201_response.rb +220 -0
- data/lib/zyphr/models/create_waa_s_event_type_request.rb +292 -0
- data/lib/zyphr/models/generate_waa_s_portal_token201_response.rb +220 -0
- data/lib/zyphr/models/get_waa_s_endpoint200_response.rb +220 -0
- data/lib/zyphr/models/get_waa_s_usage200_response.rb +220 -0
- data/lib/zyphr/models/list_waa_s_applications200_response.rb +222 -0
- data/lib/zyphr/models/list_waa_s_endpoint_deliveries200_response.rb +222 -0
- data/lib/zyphr/models/list_waa_s_endpoints200_response.rb +222 -0
- data/lib/zyphr/models/list_waa_s_event_types200_response.rb +222 -0
- data/lib/zyphr/models/publish_waa_s_event201_response.rb +220 -0
- data/lib/zyphr/models/update_waa_s_application_request.rb +272 -0
- data/lib/zyphr/models/update_waa_s_endpoint_request.rb +274 -0
- data/lib/zyphr/models/update_waa_s_event_type_request.rb +247 -0
- data/lib/zyphr/models/waa_s_application.rb +317 -0
- data/lib/zyphr/models/waa_s_batch_publish_request.rb +248 -0
- data/lib/zyphr/models/waa_s_batch_publish_response.rb +240 -0
- data/lib/zyphr/models/waa_s_delivery.rb +344 -0
- data/lib/zyphr/models/waa_s_endpoint.rb +319 -0
- data/lib/zyphr/models/waa_s_event_type.rb +335 -0
- data/lib/zyphr/models/waa_s_portal_token_request.rb +267 -0
- data/lib/zyphr/models/waa_s_portal_token_request_theme.rb +263 -0
- data/lib/zyphr/models/waa_s_portal_token_response.rb +229 -0
- data/lib/zyphr/models/waa_s_publish_event_request.rb +302 -0
- data/lib/zyphr/models/waa_s_publish_event_response.rb +256 -0
- data/lib/zyphr/models/waa_s_usage_response.rb +265 -0
- data/lib/zyphr.rb +37 -0
- data/spec/api/waa_s_applications_api_spec.rb +110 -0
- data/spec/api/waa_s_deliveries_api_spec.rb +94 -0
- data/spec/api/waa_s_endpoints_api_spec.rb +154 -0
- data/spec/api/waa_s_event_types_api_spec.rb +115 -0
- data/spec/api/waa_s_events_api_spec.rb +61 -0
- data/spec/api/waa_s_portal_api_spec.rb +48 -0
- data/spec/models/batch_publish_waa_s_events201_response_spec.rb +36 -0
- data/spec/models/create_waa_s_application201_response_spec.rb +36 -0
- data/spec/models/create_waa_s_application_request_spec.rb +48 -0
- data/spec/models/create_waa_s_endpoint201_response_spec.rb +36 -0
- data/spec/models/create_waa_s_endpoint_request_spec.rb +48 -0
- data/spec/models/create_waa_s_endpoint_response_spec.rb +72 -0
- data/spec/models/create_waa_s_event_type201_response_spec.rb +36 -0
- data/spec/models/create_waa_s_event_type_request_spec.rb +60 -0
- data/spec/models/generate_waa_s_portal_token201_response_spec.rb +36 -0
- data/spec/models/get_waa_s_endpoint200_response_spec.rb +36 -0
- data/spec/models/get_waa_s_usage200_response_spec.rb +36 -0
- data/spec/models/list_waa_s_applications200_response_spec.rb +36 -0
- data/spec/models/list_waa_s_endpoint_deliveries200_response_spec.rb +36 -0
- data/spec/models/list_waa_s_endpoints200_response_spec.rb +36 -0
- data/spec/models/list_waa_s_event_types200_response_spec.rb +36 -0
- data/spec/models/publish_waa_s_event201_response_spec.rb +36 -0
- data/spec/models/update_waa_s_application_request_spec.rb +52 -0
- data/spec/models/update_waa_s_endpoint_request_spec.rb +52 -0
- data/spec/models/update_waa_s_event_type_request_spec.rb +54 -0
- data/spec/models/waa_s_application_spec.rb +82 -0
- data/spec/models/waa_s_batch_publish_request_spec.rb +36 -0
- data/spec/models/waa_s_batch_publish_response_spec.rb +48 -0
- data/spec/models/waa_s_delivery_spec.rb +100 -0
- data/spec/models/waa_s_endpoint_spec.rb +82 -0
- data/spec/models/waa_s_event_type_spec.rb +94 -0
- data/spec/models/waa_s_portal_token_request_spec.rb +54 -0
- data/spec/models/waa_s_portal_token_request_theme_spec.rb +46 -0
- data/spec/models/waa_s_portal_token_response_spec.rb +42 -0
- data/spec/models/waa_s_publish_event_request_spec.rb +54 -0
- data/spec/models/waa_s_publish_event_response_spec.rb +60 -0
- data/spec/models/waa_s_usage_response_spec.rb +66 -0
- data/zyphr.gemspec +1 -1
- metadata +150 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::WaaSPortalTokenRequestTheme
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **mode** | **String** | | [optional] |
|
|
8
|
+
| **accent** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::WaaSPortalTokenRequestTheme.new(
|
|
16
|
+
mode: null,
|
|
17
|
+
accent: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::WaaSPortalTokenResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **token** | **String** | | [optional] |
|
|
8
|
+
| **expires_at** | **Time** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::WaaSPortalTokenResponse.new(
|
|
16
|
+
token: null,
|
|
17
|
+
expires_at: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zyphr::WaaSPublishEventRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **event_type** | **String** | Event type to publish | |
|
|
8
|
+
| **tenant_id** | **String** | Target tenant | |
|
|
9
|
+
| **data** | **Object** | Event payload | |
|
|
10
|
+
| **idempotency_key** | **String** | Deduplication key | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zyphr'
|
|
16
|
+
|
|
17
|
+
instance = Zyphr::WaaSPublishEventRequest.new(
|
|
18
|
+
event_type: order.created,
|
|
19
|
+
tenant_id: tenant_abc,
|
|
20
|
+
data: null,
|
|
21
|
+
idempotency_key: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zyphr::WaaSPublishEventResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **event_id** | **String** | | [optional] |
|
|
8
|
+
| **event_type** | **String** | | [optional] |
|
|
9
|
+
| **tenant_id** | **String** | | [optional] |
|
|
10
|
+
| **endpoints_matched** | **Integer** | | [optional] |
|
|
11
|
+
| **deliveries_created** | **Integer** | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'zyphr'
|
|
17
|
+
|
|
18
|
+
instance = Zyphr::WaaSPublishEventResponse.new(
|
|
19
|
+
event_id: null,
|
|
20
|
+
event_type: null,
|
|
21
|
+
tenant_id: null,
|
|
22
|
+
endpoints_matched: null,
|
|
23
|
+
deliveries_created: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zyphr::WaaSUsageResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **applications_count** | **Integer** | | [optional] |
|
|
8
|
+
| **applications_limit** | **Integer** | | [optional] |
|
|
9
|
+
| **endpoints_count** | **Integer** | | [optional] |
|
|
10
|
+
| **endpoints_limit** | **Integer** | | [optional] |
|
|
11
|
+
| **events_this_month** | **Integer** | | [optional] |
|
|
12
|
+
| **events_limit** | **Integer** | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zyphr'
|
|
18
|
+
|
|
19
|
+
instance = Zyphr::WaaSUsageResponse.new(
|
|
20
|
+
applications_count: null,
|
|
21
|
+
applications_limit: null,
|
|
22
|
+
endpoints_count: null,
|
|
23
|
+
endpoints_limit: null,
|
|
24
|
+
events_this_month: null,
|
|
25
|
+
events_limit: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,425 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module Zyphr
|
|
16
|
+
class WaaSApplicationsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a WaaS application
|
|
23
|
+
# Create a new Webhooks-as-a-Service application.
|
|
24
|
+
# @param create_waa_s_application_request [CreateWaaSApplicationRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CreateWaaSApplication201Response]
|
|
27
|
+
def create_waa_s_application(create_waa_s_application_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_waa_s_application_with_http_info(create_waa_s_application_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a WaaS application
|
|
33
|
+
# Create a new Webhooks-as-a-Service application.
|
|
34
|
+
# @param create_waa_s_application_request [CreateWaaSApplicationRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CreateWaaSApplication201Response, Integer, Hash)>] CreateWaaSApplication201Response data, response status code and response headers
|
|
37
|
+
def create_waa_s_application_with_http_info(create_waa_s_application_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: WaaSApplicationsApi.create_waa_s_application ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_waa_s_application_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_waa_s_application_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_waa_s_application_request' when calling WaaSApplicationsApi.create_waa_s_application"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v1/waas/applications'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_waa_s_application_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CreateWaaSApplication201Response'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"WaaSApplicationsApi.create_waa_s_application",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: WaaSApplicationsApi#create_waa_s_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Delete a WaaS application
|
|
91
|
+
# Delete a WaaS application and all associated event types, endpoints, and delivery logs.
|
|
92
|
+
# @param app_id [String]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def delete_waa_s_application(app_id, opts = {})
|
|
96
|
+
delete_waa_s_application_with_http_info(app_id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete a WaaS application
|
|
101
|
+
# Delete a WaaS application and all associated event types, endpoints, and delivery logs.
|
|
102
|
+
# @param app_id [String]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def delete_waa_s_application_with_http_info(app_id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: WaaSApplicationsApi.delete_waa_s_application ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'app_id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling WaaSApplicationsApi.delete_waa_s_application"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/v1/waas/applications/{appId}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type]
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"WaaSApplicationsApi.delete_waa_s_application",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: WaaSApplicationsApi#delete_waa_s_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Get a WaaS application
|
|
152
|
+
# Get a specific Webhooks-as-a-Service application by ID.
|
|
153
|
+
# @param app_id [String]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [CreateWaaSApplication201Response]
|
|
156
|
+
def get_waa_s_application(app_id, opts = {})
|
|
157
|
+
data, _status_code, _headers = get_waa_s_application_with_http_info(app_id, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get a WaaS application
|
|
162
|
+
# Get a specific Webhooks-as-a-Service application by ID.
|
|
163
|
+
# @param app_id [String]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Array<(CreateWaaSApplication201Response, Integer, Hash)>] CreateWaaSApplication201Response data, response status code and response headers
|
|
166
|
+
def get_waa_s_application_with_http_info(app_id, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: WaaSApplicationsApi.get_waa_s_application ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'app_id' is set
|
|
171
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling WaaSApplicationsApi.get_waa_s_application"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/v1/waas/applications/{appId}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
184
|
+
|
|
185
|
+
# form parameters
|
|
186
|
+
form_params = opts[:form_params] || {}
|
|
187
|
+
|
|
188
|
+
# http body (model)
|
|
189
|
+
post_body = opts[:debug_body]
|
|
190
|
+
|
|
191
|
+
# return_type
|
|
192
|
+
return_type = opts[:debug_return_type] || 'CreateWaaSApplication201Response'
|
|
193
|
+
|
|
194
|
+
# auth_names
|
|
195
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
196
|
+
|
|
197
|
+
new_options = opts.merge(
|
|
198
|
+
:operation => :"WaaSApplicationsApi.get_waa_s_application",
|
|
199
|
+
:header_params => header_params,
|
|
200
|
+
:query_params => query_params,
|
|
201
|
+
:form_params => form_params,
|
|
202
|
+
:body => post_body,
|
|
203
|
+
:auth_names => auth_names,
|
|
204
|
+
:return_type => return_type
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug "API called: WaaSApplicationsApi#get_waa_s_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
210
|
+
end
|
|
211
|
+
return data, status_code, headers
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Get WaaS usage
|
|
215
|
+
# Get current usage counts and plan limits for WaaS resources.
|
|
216
|
+
# @param app_id [String]
|
|
217
|
+
# @param [Hash] opts the optional parameters
|
|
218
|
+
# @return [GetWaaSUsage200Response]
|
|
219
|
+
def get_waa_s_usage(app_id, opts = {})
|
|
220
|
+
data, _status_code, _headers = get_waa_s_usage_with_http_info(app_id, opts)
|
|
221
|
+
data
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Get WaaS usage
|
|
225
|
+
# Get current usage counts and plan limits for WaaS resources.
|
|
226
|
+
# @param app_id [String]
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @return [Array<(GetWaaSUsage200Response, Integer, Hash)>] GetWaaSUsage200Response data, response status code and response headers
|
|
229
|
+
def get_waa_s_usage_with_http_info(app_id, opts = {})
|
|
230
|
+
if @api_client.config.debugging
|
|
231
|
+
@api_client.config.logger.debug 'Calling API: WaaSApplicationsApi.get_waa_s_usage ...'
|
|
232
|
+
end
|
|
233
|
+
# verify the required parameter 'app_id' is set
|
|
234
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
235
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling WaaSApplicationsApi.get_waa_s_usage"
|
|
236
|
+
end
|
|
237
|
+
# resource path
|
|
238
|
+
local_var_path = '/v1/waas/applications/{appId}/usage'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
|
239
|
+
|
|
240
|
+
# query parameters
|
|
241
|
+
query_params = opts[:query_params] || {}
|
|
242
|
+
|
|
243
|
+
# header parameters
|
|
244
|
+
header_params = opts[:header_params] || {}
|
|
245
|
+
# HTTP header 'Accept' (if needed)
|
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
247
|
+
|
|
248
|
+
# form parameters
|
|
249
|
+
form_params = opts[:form_params] || {}
|
|
250
|
+
|
|
251
|
+
# http body (model)
|
|
252
|
+
post_body = opts[:debug_body]
|
|
253
|
+
|
|
254
|
+
# return_type
|
|
255
|
+
return_type = opts[:debug_return_type] || 'GetWaaSUsage200Response'
|
|
256
|
+
|
|
257
|
+
# auth_names
|
|
258
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
259
|
+
|
|
260
|
+
new_options = opts.merge(
|
|
261
|
+
:operation => :"WaaSApplicationsApi.get_waa_s_usage",
|
|
262
|
+
:header_params => header_params,
|
|
263
|
+
:query_params => query_params,
|
|
264
|
+
:form_params => form_params,
|
|
265
|
+
:body => post_body,
|
|
266
|
+
:auth_names => auth_names,
|
|
267
|
+
:return_type => return_type
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
271
|
+
if @api_client.config.debugging
|
|
272
|
+
@api_client.config.logger.debug "API called: WaaSApplicationsApi#get_waa_s_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
273
|
+
end
|
|
274
|
+
return data, status_code, headers
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# List WaaS applications
|
|
278
|
+
# List all Webhooks-as-a-Service applications in the workspace.
|
|
279
|
+
# @param [Hash] opts the optional parameters
|
|
280
|
+
# @option opts [Integer] :limit (default to 50)
|
|
281
|
+
# @option opts [Integer] :offset (default to 0)
|
|
282
|
+
# @option opts [String] :status
|
|
283
|
+
# @return [ListWaaSApplications200Response]
|
|
284
|
+
def list_waa_s_applications(opts = {})
|
|
285
|
+
data, _status_code, _headers = list_waa_s_applications_with_http_info(opts)
|
|
286
|
+
data
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# List WaaS applications
|
|
290
|
+
# List all Webhooks-as-a-Service applications in the workspace.
|
|
291
|
+
# @param [Hash] opts the optional parameters
|
|
292
|
+
# @option opts [Integer] :limit (default to 50)
|
|
293
|
+
# @option opts [Integer] :offset (default to 0)
|
|
294
|
+
# @option opts [String] :status
|
|
295
|
+
# @return [Array<(ListWaaSApplications200Response, Integer, Hash)>] ListWaaSApplications200Response data, response status code and response headers
|
|
296
|
+
def list_waa_s_applications_with_http_info(opts = {})
|
|
297
|
+
if @api_client.config.debugging
|
|
298
|
+
@api_client.config.logger.debug 'Calling API: WaaSApplicationsApi.list_waa_s_applications ...'
|
|
299
|
+
end
|
|
300
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
301
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WaaSApplicationsApi.list_waa_s_applications, must be smaller than or equal to 100.'
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
allowable_values = ["active", "paused", "disabled"]
|
|
305
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
306
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
307
|
+
end
|
|
308
|
+
# resource path
|
|
309
|
+
local_var_path = '/v1/waas/applications'
|
|
310
|
+
|
|
311
|
+
# query parameters
|
|
312
|
+
query_params = opts[:query_params] || {}
|
|
313
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
314
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
315
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
316
|
+
|
|
317
|
+
# header parameters
|
|
318
|
+
header_params = opts[:header_params] || {}
|
|
319
|
+
# HTTP header 'Accept' (if needed)
|
|
320
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
321
|
+
|
|
322
|
+
# form parameters
|
|
323
|
+
form_params = opts[:form_params] || {}
|
|
324
|
+
|
|
325
|
+
# http body (model)
|
|
326
|
+
post_body = opts[:debug_body]
|
|
327
|
+
|
|
328
|
+
# return_type
|
|
329
|
+
return_type = opts[:debug_return_type] || 'ListWaaSApplications200Response'
|
|
330
|
+
|
|
331
|
+
# auth_names
|
|
332
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
333
|
+
|
|
334
|
+
new_options = opts.merge(
|
|
335
|
+
:operation => :"WaaSApplicationsApi.list_waa_s_applications",
|
|
336
|
+
:header_params => header_params,
|
|
337
|
+
:query_params => query_params,
|
|
338
|
+
:form_params => form_params,
|
|
339
|
+
:body => post_body,
|
|
340
|
+
:auth_names => auth_names,
|
|
341
|
+
:return_type => return_type
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
345
|
+
if @api_client.config.debugging
|
|
346
|
+
@api_client.config.logger.debug "API called: WaaSApplicationsApi#list_waa_s_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
347
|
+
end
|
|
348
|
+
return data, status_code, headers
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Update a WaaS application
|
|
352
|
+
# Update the name, description, or status of a WaaS application.
|
|
353
|
+
# @param app_id [String]
|
|
354
|
+
# @param update_waa_s_application_request [UpdateWaaSApplicationRequest]
|
|
355
|
+
# @param [Hash] opts the optional parameters
|
|
356
|
+
# @return [CreateWaaSApplication201Response]
|
|
357
|
+
def update_waa_s_application(app_id, update_waa_s_application_request, opts = {})
|
|
358
|
+
data, _status_code, _headers = update_waa_s_application_with_http_info(app_id, update_waa_s_application_request, opts)
|
|
359
|
+
data
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Update a WaaS application
|
|
363
|
+
# Update the name, description, or status of a WaaS application.
|
|
364
|
+
# @param app_id [String]
|
|
365
|
+
# @param update_waa_s_application_request [UpdateWaaSApplicationRequest]
|
|
366
|
+
# @param [Hash] opts the optional parameters
|
|
367
|
+
# @return [Array<(CreateWaaSApplication201Response, Integer, Hash)>] CreateWaaSApplication201Response data, response status code and response headers
|
|
368
|
+
def update_waa_s_application_with_http_info(app_id, update_waa_s_application_request, opts = {})
|
|
369
|
+
if @api_client.config.debugging
|
|
370
|
+
@api_client.config.logger.debug 'Calling API: WaaSApplicationsApi.update_waa_s_application ...'
|
|
371
|
+
end
|
|
372
|
+
# verify the required parameter 'app_id' is set
|
|
373
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
374
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling WaaSApplicationsApi.update_waa_s_application"
|
|
375
|
+
end
|
|
376
|
+
# verify the required parameter 'update_waa_s_application_request' is set
|
|
377
|
+
if @api_client.config.client_side_validation && update_waa_s_application_request.nil?
|
|
378
|
+
fail ArgumentError, "Missing the required parameter 'update_waa_s_application_request' when calling WaaSApplicationsApi.update_waa_s_application"
|
|
379
|
+
end
|
|
380
|
+
# resource path
|
|
381
|
+
local_var_path = '/v1/waas/applications/{appId}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
|
382
|
+
|
|
383
|
+
# query parameters
|
|
384
|
+
query_params = opts[:query_params] || {}
|
|
385
|
+
|
|
386
|
+
# header parameters
|
|
387
|
+
header_params = opts[:header_params] || {}
|
|
388
|
+
# HTTP header 'Accept' (if needed)
|
|
389
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
390
|
+
# HTTP header 'Content-Type'
|
|
391
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
392
|
+
if !content_type.nil?
|
|
393
|
+
header_params['Content-Type'] = content_type
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# form parameters
|
|
397
|
+
form_params = opts[:form_params] || {}
|
|
398
|
+
|
|
399
|
+
# http body (model)
|
|
400
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_waa_s_application_request)
|
|
401
|
+
|
|
402
|
+
# return_type
|
|
403
|
+
return_type = opts[:debug_return_type] || 'CreateWaaSApplication201Response'
|
|
404
|
+
|
|
405
|
+
# auth_names
|
|
406
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
407
|
+
|
|
408
|
+
new_options = opts.merge(
|
|
409
|
+
:operation => :"WaaSApplicationsApi.update_waa_s_application",
|
|
410
|
+
:header_params => header_params,
|
|
411
|
+
:query_params => query_params,
|
|
412
|
+
:form_params => form_params,
|
|
413
|
+
:body => post_body,
|
|
414
|
+
:auth_names => auth_names,
|
|
415
|
+
:return_type => return_type
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
419
|
+
if @api_client.config.debugging
|
|
420
|
+
@api_client.config.logger.debug "API called: WaaSApplicationsApi#update_waa_s_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
421
|
+
end
|
|
422
|
+
return data, status_code, headers
|
|
423
|
+
end
|
|
424
|
+
end
|
|
425
|
+
end
|