mimepost 1.0.0
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 +7 -0
- data/Gemfile +7 -0
- data/README.md +144 -0
- data/Rakefile +8 -0
- data/docs/AccountProfile.md +23 -0
- data/docs/AccountProfileResponse.md +10 -0
- data/docs/AccountSettings.md +9 -0
- data/docs/AccountsApi.md +216 -0
- data/docs/ApiResponse.md +10 -0
- data/docs/ApiResponseAllWebhooks.md +10 -0
- data/docs/ApiResponseAllWebhooksData.md +13 -0
- data/docs/ApiResponseDomainsList.md +10 -0
- data/docs/ApiResponseDomainsListData.md +20 -0
- data/docs/ApiResponseEmaillogs.md +10 -0
- data/docs/ApiResponseEmaillogsData.md +12 -0
- data/docs/ApiResponseSingleWebhooks.md +10 -0
- data/docs/ApiResponseStats.md +10 -0
- data/docs/ApiResponseStatsData.md +10 -0
- data/docs/ApiResponseStatsDataDatewiseSummary.md +8 -0
- data/docs/ApiResponseStatsDataGraphSummary.md +9 -0
- data/docs/ApiResponseStatsDataTotalSummary.md +8 -0
- data/docs/ApiResponseStatsDataTotalSummaryStatus.md +9 -0
- data/docs/ApiResponseWebhooks.md +10 -0
- data/docs/ApiResponseWebhooksData.md +8 -0
- data/docs/Domain.md +8 -0
- data/docs/DomainsApi.md +427 -0
- data/docs/Email.md +17 -0
- data/docs/EmailAttachments.md +10 -0
- data/docs/EmailGlobalMergeVars.md +9 -0
- data/docs/EmailMergeVars.md +9 -0
- data/docs/EmailTo.md +9 -0
- data/docs/EmailsApi.md +63 -0
- data/docs/StatsApi.md +130 -0
- data/docs/Webhook.md +11 -0
- data/docs/Webhook1.md +11 -0
- data/docs/WebhooksApi.md +272 -0
- data/example.accounts.rb +22 -0
- data/git_push.sh +55 -0
- data/lib/mimepost.rb +71 -0
- data/lib/mimepost/api/accounts_api.rb +227 -0
- data/lib/mimepost/api/domains_api.rb +429 -0
- data/lib/mimepost/api/emails_api.rb +77 -0
- data/lib/mimepost/api/stats_api.rb +158 -0
- data/lib/mimepost/api/webhooks_api.rb +275 -0
- data/lib/mimepost/api_client.rb +391 -0
- data/lib/mimepost/api_error.rb +38 -0
- data/lib/mimepost/configuration.rb +209 -0
- data/lib/mimepost/models/account_profile.rb +325 -0
- data/lib/mimepost/models/account_profile_response.rb +203 -0
- data/lib/mimepost/models/account_settings.rb +194 -0
- data/lib/mimepost/models/api_response.rb +203 -0
- data/lib/mimepost/models/api_response_all_webhooks.rb +205 -0
- data/lib/mimepost/models/api_response_all_webhooks_data.rb +231 -0
- data/lib/mimepost/models/api_response_domains_list.rb +205 -0
- data/lib/mimepost/models/api_response_domains_list_data.rb +326 -0
- data/lib/mimepost/models/api_response_emaillogs.rb +205 -0
- data/lib/mimepost/models/api_response_emaillogs_data.rb +220 -0
- data/lib/mimepost/models/api_response_single_webhooks.rb +203 -0
- data/lib/mimepost/models/api_response_stats.rb +203 -0
- data/lib/mimepost/models/api_response_stats_data.rb +202 -0
- data/lib/mimepost/models/api_response_stats_data_datewise_summary.rb +184 -0
- data/lib/mimepost/models/api_response_stats_data_graph_summary.rb +197 -0
- data/lib/mimepost/models/api_response_stats_data_total_summary.rb +184 -0
- data/lib/mimepost/models/api_response_stats_data_total_summary_status.rb +193 -0
- data/lib/mimepost/models/api_response_webhooks.rb +203 -0
- data/lib/mimepost/models/api_response_webhooks_data.rb +184 -0
- data/lib/mimepost/models/domain.rb +189 -0
- data/lib/mimepost/models/email.rb +297 -0
- data/lib/mimepost/models/email_attachments.rb +202 -0
- data/lib/mimepost/models/email_global_merge_vars.rb +193 -0
- data/lib/mimepost/models/email_merge_vars.rb +193 -0
- data/lib/mimepost/models/email_to.rb +195 -0
- data/lib/mimepost/models/webhook.rb +223 -0
- data/lib/mimepost/models/webhook_1.rb +223 -0
- data/lib/mimepost/version.rb +15 -0
- data/mimepost.gemspec +46 -0
- data/spec/api/accounts_api_spec.rb +81 -0
- data/spec/api/domains_api_spec.rb +122 -0
- data/spec/api/emails_api_spec.rb +47 -0
- data/spec/api/stats_api_spec.rb +63 -0
- data/spec/api/webhooks_api_spec.rb +90 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_profile_response_spec.rb +53 -0
- data/spec/models/account_profile_spec.rb +131 -0
- data/spec/models/account_settings_spec.rb +47 -0
- data/spec/models/api_response_all_webhooks_data_spec.rb +71 -0
- data/spec/models/api_response_all_webhooks_spec.rb +53 -0
- data/spec/models/api_response_domains_list_data_spec.rb +117 -0
- data/spec/models/api_response_domains_list_spec.rb +53 -0
- data/spec/models/api_response_emaillogs_data_spec.rb +65 -0
- data/spec/models/api_response_emaillogs_spec.rb +53 -0
- data/spec/models/api_response_single_webhooks_spec.rb +53 -0
- data/spec/models/api_response_spec.rb +53 -0
- data/spec/models/api_response_stats_data_datewise_summary_spec.rb +41 -0
- data/spec/models/api_response_stats_data_graph_summary_spec.rb +47 -0
- data/spec/models/api_response_stats_data_spec.rb +53 -0
- data/spec/models/api_response_stats_data_total_summary_spec.rb +41 -0
- data/spec/models/api_response_stats_data_total_summary_status_spec.rb +47 -0
- data/spec/models/api_response_stats_spec.rb +53 -0
- data/spec/models/api_response_webhooks_data_spec.rb +41 -0
- data/spec/models/api_response_webhooks_spec.rb +53 -0
- data/spec/models/domain_spec.rb +41 -0
- data/spec/models/email_attachments_spec.rb +53 -0
- data/spec/models/email_global_merge_vars_spec.rb +47 -0
- data/spec/models/email_merge_vars_spec.rb +47 -0
- data/spec/models/email_spec.rb +95 -0
- data/spec/models/email_to_spec.rb +47 -0
- data/spec/models/webhook_1_spec.rb +59 -0
- data/spec/models/webhook_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- metadata +390 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#mimepost
|
|
3
|
+
|
|
4
|
+
#MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 0.1.0
|
|
7
|
+
Contact: support@mimepost.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.18
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module Mimepost
|
|
16
|
+
class EmailsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Send email
|
|
23
|
+
#
|
|
24
|
+
# @param body Single Email object
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [ApiResponse]
|
|
27
|
+
def send_email(body, opts = {})
|
|
28
|
+
data, _status_code, _headers = send_email_with_http_info(body, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Send email
|
|
33
|
+
#
|
|
34
|
+
# @param body Single Email object
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
|
|
37
|
+
def send_email_with_http_info(body, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.send_email ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'body' is set
|
|
42
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling EmailsApi.send_email"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/emails/'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = @api_client.object_to_http_body(body)
|
|
63
|
+
auth_names = ['api_key']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => 'ApiResponse')
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: EmailsApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#mimepost
|
|
3
|
+
|
|
4
|
+
#MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 0.1.0
|
|
7
|
+
Contact: support@mimepost.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.18
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module Mimepost
|
|
16
|
+
class StatsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get the logs of a particular date
|
|
23
|
+
# @param start_date Start Date in yyyymmdd format example 20190801
|
|
24
|
+
# @param end_date End Date in yyyymmdd format example 20190803
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :status
|
|
27
|
+
# @option opts [String] :to
|
|
28
|
+
# @option opts [Integer] :page
|
|
29
|
+
# @option opts [Integer] :limit
|
|
30
|
+
# @return [ApiResponseEmaillogs]
|
|
31
|
+
def emaillogs_get(start_date, end_date, opts = {})
|
|
32
|
+
data, _status_code, _headers = emaillogs_get_with_http_info(start_date, end_date, opts)
|
|
33
|
+
data
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Get the logs of a particular date
|
|
37
|
+
# @param start_date Start Date in yyyymmdd format example 20190801
|
|
38
|
+
# @param end_date End Date in yyyymmdd format example 20190803
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :status
|
|
41
|
+
# @option opts [String] :to
|
|
42
|
+
# @option opts [Integer] :page
|
|
43
|
+
# @option opts [Integer] :limit
|
|
44
|
+
# @return [Array<(ApiResponseEmaillogs, Fixnum, Hash)>] ApiResponseEmaillogs data, response status code and response headers
|
|
45
|
+
def emaillogs_get_with_http_info(start_date, end_date, opts = {})
|
|
46
|
+
if @api_client.config.debugging
|
|
47
|
+
@api_client.config.logger.debug 'Calling API: StatsApi.emaillogs_get ...'
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'start_date' is set
|
|
50
|
+
if @api_client.config.client_side_validation && start_date.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'start_date' when calling StatsApi.emaillogs_get"
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'end_date' is set
|
|
54
|
+
if @api_client.config.client_side_validation && end_date.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'end_date' when calling StatsApi.emaillogs_get"
|
|
56
|
+
end
|
|
57
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !['request', 'delivered', 'open', 'click', 'unsubscribe', 'bounce_soft', 'bounce_hard', 'block_soft', 'block_hard', 'spam'].include?(opts[:'status'])
|
|
58
|
+
fail ArgumentError, 'invalid value for "status", must be one of request, delivered, open, click, unsubscribe, bounce_soft, bounce_hard, block_soft, block_hard, spam'
|
|
59
|
+
end
|
|
60
|
+
# resource path
|
|
61
|
+
local_var_path = '/emaillogs/'
|
|
62
|
+
|
|
63
|
+
# query parameters
|
|
64
|
+
query_params = {}
|
|
65
|
+
query_params[:'start_date'] = start_date
|
|
66
|
+
query_params[:'end_date'] = end_date
|
|
67
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
68
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
69
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
70
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
71
|
+
|
|
72
|
+
# header parameters
|
|
73
|
+
header_params = {}
|
|
74
|
+
# HTTP header 'Accept' (if needed)
|
|
75
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
76
|
+
# HTTP header 'Content-Type'
|
|
77
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
78
|
+
|
|
79
|
+
# form parameters
|
|
80
|
+
form_params = {}
|
|
81
|
+
|
|
82
|
+
# http body (model)
|
|
83
|
+
post_body = nil
|
|
84
|
+
auth_names = ['api_key']
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
86
|
+
:header_params => header_params,
|
|
87
|
+
:query_params => query_params,
|
|
88
|
+
:form_params => form_params,
|
|
89
|
+
:body => post_body,
|
|
90
|
+
:auth_names => auth_names,
|
|
91
|
+
:return_type => 'ApiResponseEmaillogs')
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug "API called: StatsApi#emaillogs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
94
|
+
end
|
|
95
|
+
return data, status_code, headers
|
|
96
|
+
end
|
|
97
|
+
# Get the summary of stats for a range of dates
|
|
98
|
+
# @param start_date Start Date in yyyymmdd format example 20190801
|
|
99
|
+
# @param end_date End Date in yyyymmdd format example 20190803
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [ApiResponseStats]
|
|
102
|
+
def stats_get(start_date, end_date, opts = {})
|
|
103
|
+
data, _status_code, _headers = stats_get_with_http_info(start_date, end_date, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Get the summary of stats for a range of dates
|
|
108
|
+
# @param start_date Start Date in yyyymmdd format example 20190801
|
|
109
|
+
# @param end_date End Date in yyyymmdd format example 20190803
|
|
110
|
+
# @param [Hash] opts the optional parameters
|
|
111
|
+
# @return [Array<(ApiResponseStats, Fixnum, Hash)>] ApiResponseStats data, response status code and response headers
|
|
112
|
+
def stats_get_with_http_info(start_date, end_date, opts = {})
|
|
113
|
+
if @api_client.config.debugging
|
|
114
|
+
@api_client.config.logger.debug 'Calling API: StatsApi.stats_get ...'
|
|
115
|
+
end
|
|
116
|
+
# verify the required parameter 'start_date' is set
|
|
117
|
+
if @api_client.config.client_side_validation && start_date.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'start_date' when calling StatsApi.stats_get"
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'end_date' is set
|
|
121
|
+
if @api_client.config.client_side_validation && end_date.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'end_date' when calling StatsApi.stats_get"
|
|
123
|
+
end
|
|
124
|
+
# resource path
|
|
125
|
+
local_var_path = '/stats/'
|
|
126
|
+
|
|
127
|
+
# query parameters
|
|
128
|
+
query_params = {}
|
|
129
|
+
query_params[:'start_date'] = start_date
|
|
130
|
+
query_params[:'end_date'] = end_date
|
|
131
|
+
|
|
132
|
+
# header parameters
|
|
133
|
+
header_params = {}
|
|
134
|
+
# HTTP header 'Accept' (if needed)
|
|
135
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
136
|
+
# HTTP header 'Content-Type'
|
|
137
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
138
|
+
|
|
139
|
+
# form parameters
|
|
140
|
+
form_params = {}
|
|
141
|
+
|
|
142
|
+
# http body (model)
|
|
143
|
+
post_body = nil
|
|
144
|
+
auth_names = ['api_key']
|
|
145
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
146
|
+
:header_params => header_params,
|
|
147
|
+
:query_params => query_params,
|
|
148
|
+
:form_params => form_params,
|
|
149
|
+
:body => post_body,
|
|
150
|
+
:auth_names => auth_names,
|
|
151
|
+
:return_type => 'ApiResponseStats')
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: StatsApi#stats_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#mimepost
|
|
3
|
+
|
|
4
|
+
#MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 0.1.0
|
|
7
|
+
Contact: support@mimepost.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.18
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module Mimepost
|
|
16
|
+
class WebhooksApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get the list of all the webhooks
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [ApiResponseAllWebhooks]
|
|
25
|
+
def webhooks_get(opts = {})
|
|
26
|
+
data, _status_code, _headers = webhooks_get_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Get the list of all the webhooks
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(ApiResponseAllWebhooks, Fixnum, Hash)>] ApiResponseAllWebhooks data, response status code and response headers
|
|
33
|
+
def webhooks_get_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_get ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/webhooks/'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = {}
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
47
|
+
# HTTP header 'Content-Type'
|
|
48
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = nil
|
|
55
|
+
auth_names = ['api_key']
|
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
57
|
+
:header_params => header_params,
|
|
58
|
+
:query_params => query_params,
|
|
59
|
+
:form_params => form_params,
|
|
60
|
+
:body => post_body,
|
|
61
|
+
:auth_names => auth_names,
|
|
62
|
+
:return_type => 'ApiResponseAllWebhooks')
|
|
63
|
+
if @api_client.config.debugging
|
|
64
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
65
|
+
end
|
|
66
|
+
return data, status_code, headers
|
|
67
|
+
end
|
|
68
|
+
# Remove a single webhook
|
|
69
|
+
# @param id
|
|
70
|
+
# @param [Hash] opts the optional parameters
|
|
71
|
+
# @return [ApiResponse]
|
|
72
|
+
def webhooks_id_delete(id, opts = {})
|
|
73
|
+
data, _status_code, _headers = webhooks_id_delete_with_http_info(id, opts)
|
|
74
|
+
data
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Remove a single webhook
|
|
78
|
+
# @param id
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
|
|
81
|
+
def webhooks_id_delete_with_http_info(id, opts = {})
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_id_delete ...'
|
|
84
|
+
end
|
|
85
|
+
# verify the required parameter 'id' is set
|
|
86
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
87
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_id_delete"
|
|
88
|
+
end
|
|
89
|
+
# resource path
|
|
90
|
+
local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
91
|
+
|
|
92
|
+
# query parameters
|
|
93
|
+
query_params = {}
|
|
94
|
+
|
|
95
|
+
# header parameters
|
|
96
|
+
header_params = {}
|
|
97
|
+
# HTTP header 'Accept' (if needed)
|
|
98
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
99
|
+
# HTTP header 'Content-Type'
|
|
100
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
101
|
+
|
|
102
|
+
# form parameters
|
|
103
|
+
form_params = {}
|
|
104
|
+
|
|
105
|
+
# http body (model)
|
|
106
|
+
post_body = nil
|
|
107
|
+
auth_names = ['api_key']
|
|
108
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
109
|
+
:header_params => header_params,
|
|
110
|
+
:query_params => query_params,
|
|
111
|
+
:form_params => form_params,
|
|
112
|
+
:body => post_body,
|
|
113
|
+
:auth_names => auth_names,
|
|
114
|
+
:return_type => 'ApiResponse')
|
|
115
|
+
if @api_client.config.debugging
|
|
116
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
117
|
+
end
|
|
118
|
+
return data, status_code, headers
|
|
119
|
+
end
|
|
120
|
+
# Get the details of a single webhook
|
|
121
|
+
# @param id
|
|
122
|
+
# @param [Hash] opts the optional parameters
|
|
123
|
+
# @return [ApiResponseSingleWebhooks]
|
|
124
|
+
def webhooks_id_get(id, opts = {})
|
|
125
|
+
data, _status_code, _headers = webhooks_id_get_with_http_info(id, opts)
|
|
126
|
+
data
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Get the details of a single webhook
|
|
130
|
+
# @param id
|
|
131
|
+
# @param [Hash] opts the optional parameters
|
|
132
|
+
# @return [Array<(ApiResponseSingleWebhooks, Fixnum, Hash)>] ApiResponseSingleWebhooks data, response status code and response headers
|
|
133
|
+
def webhooks_id_get_with_http_info(id, opts = {})
|
|
134
|
+
if @api_client.config.debugging
|
|
135
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_id_get ...'
|
|
136
|
+
end
|
|
137
|
+
# verify the required parameter 'id' is set
|
|
138
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
139
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_id_get"
|
|
140
|
+
end
|
|
141
|
+
# resource path
|
|
142
|
+
local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
143
|
+
|
|
144
|
+
# query parameters
|
|
145
|
+
query_params = {}
|
|
146
|
+
|
|
147
|
+
# header parameters
|
|
148
|
+
header_params = {}
|
|
149
|
+
# HTTP header 'Accept' (if needed)
|
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
151
|
+
# HTTP header 'Content-Type'
|
|
152
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
153
|
+
|
|
154
|
+
# form parameters
|
|
155
|
+
form_params = {}
|
|
156
|
+
|
|
157
|
+
# http body (model)
|
|
158
|
+
post_body = nil
|
|
159
|
+
auth_names = ['api_key']
|
|
160
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
161
|
+
:header_params => header_params,
|
|
162
|
+
:query_params => query_params,
|
|
163
|
+
:form_params => form_params,
|
|
164
|
+
:body => post_body,
|
|
165
|
+
:auth_names => auth_names,
|
|
166
|
+
:return_type => 'ApiResponseSingleWebhooks')
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
169
|
+
end
|
|
170
|
+
return data, status_code, headers
|
|
171
|
+
end
|
|
172
|
+
# Update the details of a single webhook
|
|
173
|
+
# @param id
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @option opts [Webhook1] :webhook
|
|
176
|
+
# @return [ApiResponseSingleWebhooks]
|
|
177
|
+
def webhooks_id_put(id, opts = {})
|
|
178
|
+
data, _status_code, _headers = webhooks_id_put_with_http_info(id, opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Update the details of a single webhook
|
|
183
|
+
# @param id
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @option opts [Webhook1] :webhook
|
|
186
|
+
# @return [Array<(ApiResponseSingleWebhooks, Fixnum, Hash)>] ApiResponseSingleWebhooks data, response status code and response headers
|
|
187
|
+
def webhooks_id_put_with_http_info(id, opts = {})
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_id_put ...'
|
|
190
|
+
end
|
|
191
|
+
# verify the required parameter 'id' is set
|
|
192
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
193
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_id_put"
|
|
194
|
+
end
|
|
195
|
+
# resource path
|
|
196
|
+
local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
197
|
+
|
|
198
|
+
# query parameters
|
|
199
|
+
query_params = {}
|
|
200
|
+
|
|
201
|
+
# header parameters
|
|
202
|
+
header_params = {}
|
|
203
|
+
# HTTP header 'Accept' (if needed)
|
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
205
|
+
# HTTP header 'Content-Type'
|
|
206
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
207
|
+
|
|
208
|
+
# form parameters
|
|
209
|
+
form_params = {}
|
|
210
|
+
|
|
211
|
+
# http body (model)
|
|
212
|
+
post_body = @api_client.object_to_http_body(opts[:'webhook'])
|
|
213
|
+
auth_names = ['api_key']
|
|
214
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
215
|
+
:header_params => header_params,
|
|
216
|
+
:query_params => query_params,
|
|
217
|
+
:form_params => form_params,
|
|
218
|
+
:body => post_body,
|
|
219
|
+
:auth_names => auth_names,
|
|
220
|
+
:return_type => 'ApiResponseSingleWebhooks')
|
|
221
|
+
if @api_client.config.debugging
|
|
222
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
223
|
+
end
|
|
224
|
+
return data, status_code, headers
|
|
225
|
+
end
|
|
226
|
+
# Add single webhook
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @option opts [Webhook] :webhook
|
|
229
|
+
# @return [ApiResponseWebhooks]
|
|
230
|
+
def webhooks_post(opts = {})
|
|
231
|
+
data, _status_code, _headers = webhooks_post_with_http_info(opts)
|
|
232
|
+
data
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Add single webhook
|
|
236
|
+
# @param [Hash] opts the optional parameters
|
|
237
|
+
# @option opts [Webhook] :webhook
|
|
238
|
+
# @return [Array<(ApiResponseWebhooks, Fixnum, Hash)>] ApiResponseWebhooks data, response status code and response headers
|
|
239
|
+
def webhooks_post_with_http_info(opts = {})
|
|
240
|
+
if @api_client.config.debugging
|
|
241
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_post ...'
|
|
242
|
+
end
|
|
243
|
+
# resource path
|
|
244
|
+
local_var_path = '/webhooks/'
|
|
245
|
+
|
|
246
|
+
# query parameters
|
|
247
|
+
query_params = {}
|
|
248
|
+
|
|
249
|
+
# header parameters
|
|
250
|
+
header_params = {}
|
|
251
|
+
# HTTP header 'Accept' (if needed)
|
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
253
|
+
# HTTP header 'Content-Type'
|
|
254
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = {}
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = @api_client.object_to_http_body(opts[:'webhook'])
|
|
261
|
+
auth_names = ['api_key']
|
|
262
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
263
|
+
:header_params => header_params,
|
|
264
|
+
:query_params => query_params,
|
|
265
|
+
:form_params => form_params,
|
|
266
|
+
:body => post_body,
|
|
267
|
+
:auth_names => auth_names,
|
|
268
|
+
:return_type => 'ApiResponseWebhooks')
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
|
+
end
|
|
272
|
+
return data, status_code, headers
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
end
|