sib-api-v3-sdk 7.5.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +59 -4
- data/docs/Body.md +18 -0
- data/docs/Body1.md +18 -0
- data/docs/CRMApi.md +710 -0
- data/docs/Contact.md +15 -0
- data/docs/ContactsApi.md +61 -2
- data/docs/CreateSmsCampaign.md +1 -0
- data/docs/CreateSubAccount.md +10 -0
- data/docs/CreateWebhook.md +2 -1
- data/docs/FileData.md +17 -0
- data/docs/GetCampaignStats.md +1 -0
- data/docs/GetContactCampaignStats.md +1 -0
- data/docs/GetExtendedContactDetailsStatistics.md +1 -0
- data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
- data/docs/GetInboundEmailEvents.md +8 -0
- data/docs/GetInboundEmailEventsByUuid.md +15 -0
- data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
- data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
- data/docs/GetInboundEmailEventsEvents.md +11 -0
- data/docs/InboundParsingApi.md +139 -0
- data/docs/MasterAccountApi.md +367 -0
- data/docs/MasterDetailsResponse.md +14 -0
- data/docs/MasterDetailsResponseBillingInfo.md +11 -0
- data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
- data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
- data/docs/MasterDetailsResponsePlanInfo.md +13 -0
- data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
- data/docs/Note.md +14 -0
- data/docs/NoteData.md +10 -0
- data/docs/RequestContactExport.md +1 -2
- data/docs/SendSmtpEmail.md +3 -3
- data/docs/SendTransacSms.md +1 -0
- data/docs/SsoTokenRequest.md +9 -0
- data/docs/SubAccountDetailsResponse.md +11 -0
- data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
- data/docs/SubAccountUpdatePlanRequest.md +9 -0
- data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
- data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
- data/docs/SubAccountsResponse.md +9 -0
- data/docs/SubAccountsResponseSubAccounts.md +11 -0
- data/docs/Task.md +24 -0
- data/docs/TaskReminder.md +10 -0
- data/docs/TransactionalEmailsApi.md +4 -63
- data/docs/UpdateBatchContacts.md +8 -0
- data/docs/UpdateBatchContactsContacts.md +16 -0
- data/docs/UpdateBatchContactsModel.md +9 -0
- data/docs/UpdateSmsCampaign.md +1 -0
- data/docs/UpdateWebhook.md +2 -1
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +55 -2
- data/lib/sib-api-v3-sdk/api/crm_api.rb +670 -0
- data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +161 -0
- data/lib/sib-api-v3-sdk/api/master_account_api.rb +365 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +4 -60
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
- data/lib/sib-api-v3-sdk/models/body.rb +305 -0
- data/lib/sib-api-v3-sdk/models/body_1.rb +305 -0
- data/lib/sib-api-v3-sdk/models/{send_email.rb → contact.rb} +64 -78
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
- data/lib/sib-api-v3-sdk/models/create_sub_account.rb +244 -0
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
- data/lib/sib-api-v3-sdk/models/file_data.rb +278 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +16 -1
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
- data/lib/sib-api-v3-sdk/models/{send_template_email.rb → get_inbound_email_events.rb} +10 -14
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
- data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
- data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → master_details_response_plan_info_features.rb} +45 -44
- data/lib/sib-api-v3-sdk/models/note.rb +283 -0
- data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
- data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +3 -3
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
- data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
- data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
- data/lib/sib-api-v3-sdk/models/task.rb +367 -0
- data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/lib/sib-api-v3-sdk.rb +41 -3
- data/sib-api-v3-sdk.gemspec +2 -1
- data/spec/api/contacts_api_spec.rb +13 -1
- data/spec/api/crm_api_spec.rb +170 -0
- data/spec/api/inbound_parsing_api_spec.rb +64 -0
- data/spec/api/master_account_api_spec.rb +108 -0
- data/spec/api/transactional_emails_api_spec.rb +2 -13
- data/spec/models/body_1_spec.rb +101 -0
- data/spec/models/body_spec.rb +101 -0
- data/spec/models/contact_spec.rb +83 -0
- data/spec/models/create_sms_campaign_spec.rb +6 -0
- data/spec/models/create_sub_account_spec.rb +57 -0
- data/spec/models/create_webhook_spec.rb +8 -2
- data/spec/models/file_data_spec.rb +95 -0
- data/spec/models/get_campaign_stats_spec.rb +6 -0
- data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
- data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
- data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
- data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
- data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
- data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
- data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
- data/spec/models/get_inbound_email_events_spec.rb +41 -0
- data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
- data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
- data/spec/models/master_details_response_billing_info_spec.rb +59 -0
- data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
- data/spec/models/master_details_response_plan_info_spec.rb +75 -0
- data/spec/models/master_details_response_spec.rb +77 -0
- data/spec/models/note_data_spec.rb +53 -0
- data/spec/models/note_spec.rb +77 -0
- data/spec/models/request_contact_export_spec.rb +0 -6
- data/spec/models/send_transac_sms_spec.rb +6 -0
- data/spec/models/{send_email_attachment_spec.rb → sso_token_request_spec.rb} +8 -8
- data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
- data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
- data/spec/models/sub_account_details_response_spec.rb +59 -0
- data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
- data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
- data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
- data/spec/models/sub_accounts_response_spec.rb +47 -0
- data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
- data/spec/models/task_reminder_spec.rb +57 -0
- data/spec/models/task_spec.rb +137 -0
- data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
- data/spec/models/update_batch_contacts_model_spec.rb +47 -0
- data/spec/models/{send_template_email_spec.rb → update_batch_contacts_spec.rb} +7 -7
- data/spec/models/update_sms_campaign_spec.rb +6 -0
- data/spec/models/update_webhook_spec.rb +7 -1
- metadata +186 -14
- data/docs/SendEmail.md +0 -16
- data/docs/SendEmailAttachment.md +0 -9
- data/docs/SendTemplateEmail.md +0 -8
@@ -0,0 +1,161 @@
|
|
1
|
+
=begin
|
2
|
+
#SendinBlue API
|
3
|
+
|
4
|
+
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.0
|
7
|
+
Contact: contact@sendinblue.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
class InboundParsingApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
# Get the list of all the events for the received emails.
|
34
|
+
# This endpoint will show the list of all the events for the received emails.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [String] :sender Email address of the sender.
|
37
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
|
38
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
39
|
+
# @option opts [Integer] :limit Number of documents returned per page (default to 100)
|
40
|
+
# @option opts [Integer] :offset Index of the first document on the page (default to 0)
|
41
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
42
|
+
# @return [GetInboundEmailEvents]
|
43
|
+
def get_inbound_email_events(opts = {})
|
44
|
+
data, _status_code, _headers = get_inbound_email_events_with_http_info(opts)
|
45
|
+
data
|
46
|
+
end
|
47
|
+
|
48
|
+
# Get the list of all the events for the received emails.
|
49
|
+
# This endpoint will show the list of all the events for the received emails.
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @option opts [String] :sender Email address of the sender.
|
52
|
+
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
|
53
|
+
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
54
|
+
# @option opts [Integer] :limit Number of documents returned per page
|
55
|
+
# @option opts [Integer] :offset Index of the first document on the page
|
56
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
57
|
+
# @return [Array<(GetInboundEmailEvents, Fixnum, Hash)>] GetInboundEmailEvents data, response status code and response headers
|
58
|
+
def get_inbound_email_events_with_http_info(opts = {})
|
59
|
+
if @api_client.config.debugging
|
60
|
+
@api_client.config.logger.debug 'Calling API: InboundParsingApi.get_inbound_email_events ...'
|
61
|
+
end
|
62
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
63
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboundParsingApi.get_inbound_email_events, must be smaller than or equal to 500.'
|
64
|
+
end
|
65
|
+
|
66
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
67
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
68
|
+
end
|
69
|
+
# resource path
|
70
|
+
local_var_path = '/inbound/events'
|
71
|
+
|
72
|
+
# query parameters
|
73
|
+
query_params = {}
|
74
|
+
query_params[:'sender'] = opts[:'sender'] if !opts[:'sender'].nil?
|
75
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
76
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
77
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
78
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
79
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
80
|
+
|
81
|
+
# header parameters
|
82
|
+
header_params = {}
|
83
|
+
# HTTP header 'Accept' (if needed)
|
84
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
85
|
+
# HTTP header 'Content-Type'
|
86
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
87
|
+
|
88
|
+
# form parameters
|
89
|
+
form_params = {}
|
90
|
+
|
91
|
+
# http body (model)
|
92
|
+
post_body = nil
|
93
|
+
auth_names = ['api-key', 'partner-key']
|
94
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
95
|
+
:header_params => header_params,
|
96
|
+
:query_params => query_params,
|
97
|
+
:form_params => form_params,
|
98
|
+
:body => post_body,
|
99
|
+
:auth_names => auth_names,
|
100
|
+
:return_type => 'GetInboundEmailEvents')
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug "API called: InboundParsingApi#get_inbound_email_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
103
|
+
end
|
104
|
+
return data, status_code, headers
|
105
|
+
end
|
106
|
+
# Fetch all events history for one particular received email.
|
107
|
+
# This endpoint will show the list of all events history for one particular received email.
|
108
|
+
# @param uuid UUID to fetch events specific to recieved email
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @return [GetInboundEmailEventsByUuid]
|
111
|
+
def get_inbound_email_events_by_uuid(uuid, opts = {})
|
112
|
+
data, _status_code, _headers = get_inbound_email_events_by_uuid_with_http_info(uuid, opts)
|
113
|
+
data
|
114
|
+
end
|
115
|
+
|
116
|
+
# Fetch all events history for one particular received email.
|
117
|
+
# This endpoint will show the list of all events history for one particular received email.
|
118
|
+
# @param uuid UUID to fetch events specific to recieved email
|
119
|
+
# @param [Hash] opts the optional parameters
|
120
|
+
# @return [Array<(GetInboundEmailEventsByUuid, Fixnum, Hash)>] GetInboundEmailEventsByUuid data, response status code and response headers
|
121
|
+
def get_inbound_email_events_by_uuid_with_http_info(uuid, opts = {})
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug 'Calling API: InboundParsingApi.get_inbound_email_events_by_uuid ...'
|
124
|
+
end
|
125
|
+
# verify the required parameter 'uuid' is set
|
126
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling InboundParsingApi.get_inbound_email_events_by_uuid"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/inbound/events/{uuid}'.sub('{' + 'uuid' + '}', uuid.to_s)
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = {}
|
134
|
+
|
135
|
+
# header parameters
|
136
|
+
header_params = {}
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
139
|
+
# HTTP header 'Content-Type'
|
140
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
141
|
+
|
142
|
+
# form parameters
|
143
|
+
form_params = {}
|
144
|
+
|
145
|
+
# http body (model)
|
146
|
+
post_body = nil
|
147
|
+
auth_names = ['api-key', 'partner-key']
|
148
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
149
|
+
:header_params => header_params,
|
150
|
+
:query_params => query_params,
|
151
|
+
:form_params => form_params,
|
152
|
+
:body => post_body,
|
153
|
+
:auth_names => auth_names,
|
154
|
+
:return_type => 'GetInboundEmailEventsByUuid')
|
155
|
+
if @api_client.config.debugging
|
156
|
+
@api_client.config.logger.debug "API called: InboundParsingApi#get_inbound_email_events_by_uuid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
157
|
+
end
|
158
|
+
return data, status_code, headers
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
@@ -0,0 +1,365 @@
|
|
1
|
+
=begin
|
2
|
+
#SendinBlue API
|
3
|
+
|
4
|
+
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.0
|
7
|
+
Contact: contact@sendinblue.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
class MasterAccountApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
# Get the details of requested master account
|
34
|
+
# This endpoint will provide the details of the master account.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [MasterDetailsResponse]
|
37
|
+
def corporate_master_account_get(opts = {})
|
38
|
+
data, _status_code, _headers = corporate_master_account_get_with_http_info(opts)
|
39
|
+
data
|
40
|
+
end
|
41
|
+
|
42
|
+
# Get the details of requested master account
|
43
|
+
# This endpoint will provide the details of the master account.
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @return [Array<(MasterDetailsResponse, Fixnum, Hash)>] MasterDetailsResponse data, response status code and response headers
|
46
|
+
def corporate_master_account_get_with_http_info(opts = {})
|
47
|
+
if @api_client.config.debugging
|
48
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_master_account_get ...'
|
49
|
+
end
|
50
|
+
# resource path
|
51
|
+
local_var_path = '/corporate/masterAccount'
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = {}
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = {}
|
58
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
# HTTP header 'Content-Type'
|
61
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = nil
|
68
|
+
auth_names = ['api-key', 'partner-key']
|
69
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => 'MasterDetailsResponse')
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_master_account_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
81
|
+
# Get the list of all the sub-accounts of the master account.
|
82
|
+
# This endpoint will provide the list all the sub-accounts of the master account.
|
83
|
+
# @param offset Page number of sub-accounts listing
|
84
|
+
# @param limit Number of sub-accounts to be displayed on each page
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [SubAccountsResponse]
|
87
|
+
def corporate_sub_account_get(offset, limit, opts = {})
|
88
|
+
data, _status_code, _headers = corporate_sub_account_get_with_http_info(offset, limit, opts)
|
89
|
+
data
|
90
|
+
end
|
91
|
+
|
92
|
+
# Get the list of all the sub-accounts of the master account.
|
93
|
+
# This endpoint will provide the list all the sub-accounts of the master account.
|
94
|
+
# @param offset Page number of sub-accounts listing
|
95
|
+
# @param limit Number of sub-accounts to be displayed on each page
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Array<(SubAccountsResponse, Fixnum, Hash)>] SubAccountsResponse data, response status code and response headers
|
98
|
+
def corporate_sub_account_get_with_http_info(offset, limit, opts = {})
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_get ...'
|
101
|
+
end
|
102
|
+
# verify the required parameter 'offset' is set
|
103
|
+
if @api_client.config.client_side_validation && offset.nil?
|
104
|
+
fail ArgumentError, "Missing the required parameter 'offset' when calling MasterAccountApi.corporate_sub_account_get"
|
105
|
+
end
|
106
|
+
# verify the required parameter 'limit' is set
|
107
|
+
if @api_client.config.client_side_validation && limit.nil?
|
108
|
+
fail ArgumentError, "Missing the required parameter 'limit' when calling MasterAccountApi.corporate_sub_account_get"
|
109
|
+
end
|
110
|
+
# resource path
|
111
|
+
local_var_path = '/corporate/subAccount'
|
112
|
+
|
113
|
+
# query parameters
|
114
|
+
query_params = {}
|
115
|
+
query_params[:'offset'] = offset
|
116
|
+
query_params[:'limit'] = limit
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
+
# HTTP header 'Content-Type'
|
123
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
124
|
+
|
125
|
+
# form parameters
|
126
|
+
form_params = {}
|
127
|
+
|
128
|
+
# http body (model)
|
129
|
+
post_body = nil
|
130
|
+
auth_names = ['api-key', 'partner-key']
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
132
|
+
:header_params => header_params,
|
133
|
+
:query_params => query_params,
|
134
|
+
:form_params => form_params,
|
135
|
+
:body => post_body,
|
136
|
+
:auth_names => auth_names,
|
137
|
+
:return_type => 'SubAccountsResponse')
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
# Get sub-account details
|
144
|
+
# This endpoint will provide the details of specified sub-account organization
|
145
|
+
# @param id Id of the sub-account organization
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [SubAccountDetailsResponse]
|
148
|
+
def corporate_sub_account_id_get(id, opts = {})
|
149
|
+
data, _status_code, _headers = corporate_sub_account_id_get_with_http_info(id, opts)
|
150
|
+
data
|
151
|
+
end
|
152
|
+
|
153
|
+
# Get sub-account details
|
154
|
+
# This endpoint will provide the details of specified sub-account organization
|
155
|
+
# @param id Id of the sub-account organization
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [Array<(SubAccountDetailsResponse, Fixnum, Hash)>] SubAccountDetailsResponse data, response status code and response headers
|
158
|
+
def corporate_sub_account_id_get_with_http_info(id, opts = {})
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_id_get ...'
|
161
|
+
end
|
162
|
+
# verify the required parameter 'id' is set
|
163
|
+
if @api_client.config.client_side_validation && id.nil?
|
164
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MasterAccountApi.corporate_sub_account_id_get"
|
165
|
+
end
|
166
|
+
# resource path
|
167
|
+
local_var_path = '/corporate/subAccount/{id}'.sub('{' + 'id' + '}', id.to_s)
|
168
|
+
|
169
|
+
# query parameters
|
170
|
+
query_params = {}
|
171
|
+
|
172
|
+
# header parameters
|
173
|
+
header_params = {}
|
174
|
+
# HTTP header 'Accept' (if needed)
|
175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
176
|
+
# HTTP header 'Content-Type'
|
177
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = nil
|
184
|
+
auth_names = ['api-key', 'partner-key']
|
185
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
186
|
+
:header_params => header_params,
|
187
|
+
:query_params => query_params,
|
188
|
+
:form_params => form_params,
|
189
|
+
:body => post_body,
|
190
|
+
:auth_names => auth_names,
|
191
|
+
:return_type => 'SubAccountDetailsResponse')
|
192
|
+
if @api_client.config.debugging
|
193
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
194
|
+
end
|
195
|
+
return data, status_code, headers
|
196
|
+
end
|
197
|
+
# Update sub-account plan
|
198
|
+
# This endpoint will update the sub-account plan
|
199
|
+
# @param id Id of the sub-account organization
|
200
|
+
# @param update_plan_details Values to update a sub-account plan
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [nil]
|
203
|
+
def corporate_sub_account_id_plan_put(id, update_plan_details, opts = {})
|
204
|
+
corporate_sub_account_id_plan_put_with_http_info(id, update_plan_details, opts)
|
205
|
+
nil
|
206
|
+
end
|
207
|
+
|
208
|
+
# Update sub-account plan
|
209
|
+
# This endpoint will update the sub-account plan
|
210
|
+
# @param id Id of the sub-account organization
|
211
|
+
# @param update_plan_details Values to update a sub-account plan
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
214
|
+
def corporate_sub_account_id_plan_put_with_http_info(id, update_plan_details, opts = {})
|
215
|
+
if @api_client.config.debugging
|
216
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_id_plan_put ...'
|
217
|
+
end
|
218
|
+
# verify the required parameter 'id' is set
|
219
|
+
if @api_client.config.client_side_validation && id.nil?
|
220
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MasterAccountApi.corporate_sub_account_id_plan_put"
|
221
|
+
end
|
222
|
+
# verify the required parameter 'update_plan_details' is set
|
223
|
+
if @api_client.config.client_side_validation && update_plan_details.nil?
|
224
|
+
fail ArgumentError, "Missing the required parameter 'update_plan_details' when calling MasterAccountApi.corporate_sub_account_id_plan_put"
|
225
|
+
end
|
226
|
+
# resource path
|
227
|
+
local_var_path = '/corporate/subAccount/{id}/plan'.sub('{' + 'id' + '}', id.to_s)
|
228
|
+
|
229
|
+
# query parameters
|
230
|
+
query_params = {}
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = {}
|
234
|
+
# HTTP header 'Accept' (if needed)
|
235
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
236
|
+
# HTTP header 'Content-Type'
|
237
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
238
|
+
|
239
|
+
# form parameters
|
240
|
+
form_params = {}
|
241
|
+
|
242
|
+
# http body (model)
|
243
|
+
post_body = @api_client.object_to_http_body(update_plan_details)
|
244
|
+
auth_names = ['api-key', 'partner-key']
|
245
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
246
|
+
:header_params => header_params,
|
247
|
+
:query_params => query_params,
|
248
|
+
:form_params => form_params,
|
249
|
+
:body => post_body,
|
250
|
+
:auth_names => auth_names)
|
251
|
+
if @api_client.config.debugging
|
252
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_id_plan_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
253
|
+
end
|
254
|
+
return data, status_code, headers
|
255
|
+
end
|
256
|
+
# Create a new sub-account under a master account.
|
257
|
+
# This endpoint will create a new sub-account under a master account
|
258
|
+
# @param sub_account_create values to create new sub-account
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [CreateModel]
|
261
|
+
def corporate_sub_account_post(sub_account_create, opts = {})
|
262
|
+
data, _status_code, _headers = corporate_sub_account_post_with_http_info(sub_account_create, opts)
|
263
|
+
data
|
264
|
+
end
|
265
|
+
|
266
|
+
# Create a new sub-account under a master account.
|
267
|
+
# This endpoint will create a new sub-account under a master account
|
268
|
+
# @param sub_account_create values to create new sub-account
|
269
|
+
# @param [Hash] opts the optional parameters
|
270
|
+
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
271
|
+
def corporate_sub_account_post_with_http_info(sub_account_create, opts = {})
|
272
|
+
if @api_client.config.debugging
|
273
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_post ...'
|
274
|
+
end
|
275
|
+
# verify the required parameter 'sub_account_create' is set
|
276
|
+
if @api_client.config.client_side_validation && sub_account_create.nil?
|
277
|
+
fail ArgumentError, "Missing the required parameter 'sub_account_create' when calling MasterAccountApi.corporate_sub_account_post"
|
278
|
+
end
|
279
|
+
# resource path
|
280
|
+
local_var_path = '/corporate/subAccount'
|
281
|
+
|
282
|
+
# query parameters
|
283
|
+
query_params = {}
|
284
|
+
|
285
|
+
# header parameters
|
286
|
+
header_params = {}
|
287
|
+
# HTTP header 'Accept' (if needed)
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
289
|
+
# HTTP header 'Content-Type'
|
290
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
291
|
+
|
292
|
+
# form parameters
|
293
|
+
form_params = {}
|
294
|
+
|
295
|
+
# http body (model)
|
296
|
+
post_body = @api_client.object_to_http_body(sub_account_create)
|
297
|
+
auth_names = ['api-key', 'partner-key']
|
298
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
299
|
+
:header_params => header_params,
|
300
|
+
:query_params => query_params,
|
301
|
+
:form_params => form_params,
|
302
|
+
:body => post_body,
|
303
|
+
:auth_names => auth_names,
|
304
|
+
:return_type => 'CreateModel')
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
307
|
+
end
|
308
|
+
return data, status_code, headers
|
309
|
+
end
|
310
|
+
# Generate SSO token to access Sendinblue
|
311
|
+
# This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token.
|
312
|
+
# @param sso_token_request Values to generate SSO token for sub-account
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [GetSsoToken]
|
315
|
+
def corporate_sub_account_sso_token_post(sso_token_request, opts = {})
|
316
|
+
data, _status_code, _headers = corporate_sub_account_sso_token_post_with_http_info(sso_token_request, opts)
|
317
|
+
data
|
318
|
+
end
|
319
|
+
|
320
|
+
# Generate SSO token to access Sendinblue
|
321
|
+
# This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token.
|
322
|
+
# @param sso_token_request Values to generate SSO token for sub-account
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @return [Array<(GetSsoToken, Fixnum, Hash)>] GetSsoToken data, response status code and response headers
|
325
|
+
def corporate_sub_account_sso_token_post_with_http_info(sso_token_request, opts = {})
|
326
|
+
if @api_client.config.debugging
|
327
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sub_account_sso_token_post ...'
|
328
|
+
end
|
329
|
+
# verify the required parameter 'sso_token_request' is set
|
330
|
+
if @api_client.config.client_side_validation && sso_token_request.nil?
|
331
|
+
fail ArgumentError, "Missing the required parameter 'sso_token_request' when calling MasterAccountApi.corporate_sub_account_sso_token_post"
|
332
|
+
end
|
333
|
+
# resource path
|
334
|
+
local_var_path = '/corporate/subAccount/ssoToken'
|
335
|
+
|
336
|
+
# query parameters
|
337
|
+
query_params = {}
|
338
|
+
|
339
|
+
# header parameters
|
340
|
+
header_params = {}
|
341
|
+
# HTTP header 'Accept' (if needed)
|
342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
343
|
+
# HTTP header 'Content-Type'
|
344
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
345
|
+
|
346
|
+
# form parameters
|
347
|
+
form_params = {}
|
348
|
+
|
349
|
+
# http body (model)
|
350
|
+
post_body = @api_client.object_to_http_body(sso_token_request)
|
351
|
+
auth_names = ['api-key', 'partner-key']
|
352
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
353
|
+
:header_params => header_params,
|
354
|
+
:query_params => query_params,
|
355
|
+
:form_params => form_params,
|
356
|
+
:body => post_body,
|
357
|
+
:auth_names => auth_names,
|
358
|
+
:return_type => 'GetSsoToken')
|
359
|
+
if @api_client.config.debugging
|
360
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_sub_account_sso_token_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
361
|
+
end
|
362
|
+
return data, status_code, headers
|
363
|
+
end
|
364
|
+
end
|
365
|
+
end
|
@@ -288,6 +288,7 @@ module SibApiV3Sdk
|
|
288
288
|
return data, status_code, headers
|
289
289
|
end
|
290
290
|
# Get your transactional email activity aggregated over a period of time
|
291
|
+
# This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
291
292
|
# @param [Hash] opts the optional parameters
|
292
293
|
# @option opts [String] :start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
|
293
294
|
# @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
|
@@ -300,6 +301,7 @@ module SibApiV3Sdk
|
|
300
301
|
end
|
301
302
|
|
302
303
|
# Get your transactional email activity aggregated over a period of time
|
304
|
+
# This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
303
305
|
# @param [Hash] opts the optional parameters
|
304
306
|
# @option opts [String] :start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
|
305
307
|
# @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
|
@@ -394,6 +396,7 @@ module SibApiV3Sdk
|
|
394
396
|
return data, status_code, headers
|
395
397
|
end
|
396
398
|
# Get all your transactional email activity (unaggregated events)
|
399
|
+
# This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
397
400
|
# @param [Hash] opts the optional parameters
|
398
401
|
# @option opts [Integer] :limit Number limitation for the result returned (default to 50)
|
399
402
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from. (default to 0)
|
@@ -413,6 +416,7 @@ module SibApiV3Sdk
|
|
413
416
|
end
|
414
417
|
|
415
418
|
# Get all your transactional email activity (unaggregated events)
|
419
|
+
# This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
|
416
420
|
# @param [Hash] opts the optional parameters
|
417
421
|
# @option opts [Integer] :limit Number limitation for the result returned
|
418
422
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from.
|
@@ -875,66 +879,6 @@ module SibApiV3Sdk
|
|
875
879
|
end
|
876
880
|
return data, status_code, headers
|
877
881
|
end
|
878
|
-
# Send a template
|
879
|
-
# This endpoint is deprecated. Prefer v3/smtp/email instead.
|
880
|
-
# @param template_id Id of the template
|
881
|
-
# @param send_email
|
882
|
-
# @param [Hash] opts the optional parameters
|
883
|
-
# @return [SendTemplateEmail]
|
884
|
-
def send_template(template_id, send_email, opts = {})
|
885
|
-
data, _status_code, _headers = send_template_with_http_info(template_id, send_email, opts)
|
886
|
-
data
|
887
|
-
end
|
888
|
-
|
889
|
-
# Send a template
|
890
|
-
# This endpoint is deprecated. Prefer v3/smtp/email instead.
|
891
|
-
# @param template_id Id of the template
|
892
|
-
# @param send_email
|
893
|
-
# @param [Hash] opts the optional parameters
|
894
|
-
# @return [Array<(SendTemplateEmail, Fixnum, Hash)>] SendTemplateEmail data, response status code and response headers
|
895
|
-
def send_template_with_http_info(template_id, send_email, opts = {})
|
896
|
-
if @api_client.config.debugging
|
897
|
-
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.send_template ...'
|
898
|
-
end
|
899
|
-
# verify the required parameter 'template_id' is set
|
900
|
-
if @api_client.config.client_side_validation && template_id.nil?
|
901
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling TransactionalEmailsApi.send_template"
|
902
|
-
end
|
903
|
-
# verify the required parameter 'send_email' is set
|
904
|
-
if @api_client.config.client_side_validation && send_email.nil?
|
905
|
-
fail ArgumentError, "Missing the required parameter 'send_email' when calling TransactionalEmailsApi.send_template"
|
906
|
-
end
|
907
|
-
# resource path
|
908
|
-
local_var_path = '/smtp/templates/{templateId}/send'.sub('{' + 'templateId' + '}', template_id.to_s)
|
909
|
-
|
910
|
-
# query parameters
|
911
|
-
query_params = {}
|
912
|
-
|
913
|
-
# header parameters
|
914
|
-
header_params = {}
|
915
|
-
# HTTP header 'Accept' (if needed)
|
916
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
917
|
-
# HTTP header 'Content-Type'
|
918
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
919
|
-
|
920
|
-
# form parameters
|
921
|
-
form_params = {}
|
922
|
-
|
923
|
-
# http body (model)
|
924
|
-
post_body = @api_client.object_to_http_body(send_email)
|
925
|
-
auth_names = ['api-key', 'partner-key']
|
926
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
927
|
-
:header_params => header_params,
|
928
|
-
:query_params => query_params,
|
929
|
-
:form_params => form_params,
|
930
|
-
:body => post_body,
|
931
|
-
:auth_names => auth_names,
|
932
|
-
:return_type => 'SendTemplateEmail')
|
933
|
-
if @api_client.config.debugging
|
934
|
-
@api_client.config.logger.debug "API called: TransactionalEmailsApi#send_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
935
|
-
end
|
936
|
-
return data, status_code, headers
|
937
|
-
end
|
938
882
|
# Send a template to your test list
|
939
883
|
# @param template_id Id of the template
|
940
884
|
# @param send_test_email
|
@@ -203,8 +203,8 @@ module SibApiV3Sdk
|
|
203
203
|
if @api_client.config.debugging
|
204
204
|
@api_client.config.logger.debug 'Calling API: WebhooksApi.get_webhooks ...'
|
205
205
|
end
|
206
|
-
if @api_client.config.client_side_validation && opts[:'type'] && !['marketing', 'transactional'].include?(opts[:'type'])
|
207
|
-
fail ArgumentError, 'invalid value for "type", must be one of marketing, transactional'
|
206
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !['marketing', 'transactional', 'inbound'].include?(opts[:'type'])
|
207
|
+
fail ArgumentError, 'invalid value for "type", must be one of marketing, transactional, inbound'
|
208
208
|
end
|
209
209
|
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
210
210
|
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|