clicksend_client 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +78 -0
- data/Rakefile +8 -0
- data/clicksend_client-1.0.1.gem +0 -0
- data/clicksend_client.gemspec +45 -0
- data/docs/Account.md +15 -0
- data/docs/AccountApi.md +433 -0
- data/docs/AccountForgotPasswordVerify.md +10 -0
- data/docs/AccountRechargeApi.md +330 -0
- data/docs/AccountVerify.md +10 -0
- data/docs/Address.md +14 -0
- data/docs/Attachment.md +12 -0
- data/docs/Contact.md +23 -0
- data/docs/ContactApi.md +416 -0
- data/docs/ContactList.md +8 -0
- data/docs/ContactListApi.md +398 -0
- data/docs/ContactListImport.md +9 -0
- data/docs/CountriesApi.md +50 -0
- data/docs/CreditCard.md +13 -0
- data/docs/DateBefore.md +8 -0
- data/docs/DeliveryIssue.md +12 -0
- data/docs/DeliveryIssuesApi.md +119 -0
- data/docs/DeliveryReceiptRule.md +12 -0
- data/docs/DetectAddressApi.md +62 -0
- data/docs/Email.md +15 -0
- data/docs/EmailAddress.md +8 -0
- data/docs/EmailCampaign.md +15 -0
- data/docs/EmailDeliveryReceiptRulesApi.md +286 -0
- data/docs/EmailFrom.md +9 -0
- data/docs/EmailMarketingApi.md +793 -0
- data/docs/EmailRecipient.md +9 -0
- data/docs/EmailSMSAddress.md +10 -0
- data/docs/EmailTemplateNew.md +9 -0
- data/docs/EmailTemplateUpdate.md +9 -0
- data/docs/EmailToSmsApi.md +395 -0
- data/docs/FAXApi.md +401 -0
- data/docs/FAXDeliveryReceiptRulesApi.md +286 -0
- data/docs/FaxMessage.md +15 -0
- data/docs/FaxMessageCollection.md +9 -0
- data/docs/Fields.md +8 -0
- data/docs/FieldsFields.md +23 -0
- data/docs/ForgotPassword.md +8 -0
- data/docs/ForgotUsername.md +9 -0
- data/docs/InboundFAXRulesApi.md +286 -0
- data/docs/InboundFaxRule.md +12 -0
- data/docs/InboundSMSRule.md +14 -0
- data/docs/InboundSMSRulesApi.md +286 -0
- data/docs/MMSApi.md +228 -0
- data/docs/MasterEmailTemplatesApi.md +290 -0
- data/docs/MmsCampaign.md +14 -0
- data/docs/MmsCampaignApi.md +338 -0
- data/docs/MmsMessage.md +17 -0
- data/docs/MmsMessageCollection.md +9 -0
- data/docs/NumberApi.md +183 -0
- data/docs/PostLetter.md +14 -0
- data/docs/PostLetterApi.md +227 -0
- data/docs/PostPostcard.md +9 -0
- data/docs/PostPostcardApi.md +227 -0
- data/docs/PostRecipient.md +16 -0
- data/docs/PostReturnAddressApi.md +284 -0
- data/docs/ReferralAccountApi.md +65 -0
- data/docs/ResellerAccount.md +15 -0
- data/docs/ResellerAccountApi.md +230 -0
- data/docs/ResellerAccountTransferCredit.md +10 -0
- data/docs/SMSApi.md +999 -0
- data/docs/SMSDeliveryReceiptRulesApi.md +286 -0
- data/docs/SearchApi.md +68 -0
- data/docs/SmsCampaign.md +12 -0
- data/docs/SmsCampaignApi.md +338 -0
- data/docs/SmsMessage.md +16 -0
- data/docs/SmsMessageCollection.md +8 -0
- data/docs/SmsTemplate.md +9 -0
- data/docs/StatisticsApi.md +104 -0
- data/docs/StrippedString.md +8 -0
- data/docs/Subaccount.md +18 -0
- data/docs/SubaccountApi.md +338 -0
- data/docs/TimezonesApi.md +65 -0
- data/docs/TransactionalEmailApi.md +237 -0
- data/docs/TransferCreditApi.md +62 -0
- data/docs/UploadApi.md +65 -0
- data/docs/UploadFile.md +8 -0
- data/docs/Url.md +8 -0
- data/docs/UserEmailTemplatesApi.md +284 -0
- data/docs/VoiceApi.md +547 -0
- data/docs/VoiceDeliveryReceiptRulesApi.md +286 -0
- data/docs/VoiceMessage.md +18 -0
- data/docs/VoiceMessageCollection.md +8 -0
- data/lib/clicksend_client.rb +121 -0
- data/lib/clicksend_client/api/account_api.rb +447 -0
- data/lib/clicksend_client/api/account_recharge_api.rb +346 -0
- data/lib/clicksend_client/api/contact_api.rb +463 -0
- data/lib/clicksend_client/api/contact_list_api.rb +427 -0
- data/lib/clicksend_client/api/countries_api.rb +71 -0
- data/lib/clicksend_client/api/delivery_issues_api.rb +139 -0
- data/lib/clicksend_client/api/detect_address_api.rb +77 -0
- data/lib/clicksend_client/api/email_delivery_receipt_rules_api.rb +310 -0
- data/lib/clicksend_client/api/email_marketing_api.rb +829 -0
- data/lib/clicksend_client/api/email_to_sms_api.rb +423 -0
- data/lib/clicksend_client/api/fax_api.rb +425 -0
- data/lib/clicksend_client/api/fax_delivery_receipt_rules_api.rb +310 -0
- data/lib/clicksend_client/api/inbound_fax_rules_api.rb +310 -0
- data/lib/clicksend_client/api/inbound_sms_rules_api.rb +310 -0
- data/lib/clicksend_client/api/master_email_templates_api.rb +323 -0
- data/lib/clicksend_client/api/mms_api.rb +243 -0
- data/lib/clicksend_client/api/mms_campaign_api.rb +361 -0
- data/lib/clicksend_client/api/number_api.rb +213 -0
- data/lib/clicksend_client/api/post_letter_api.rb +248 -0
- data/lib/clicksend_client/api/post_postcard_api.rb +248 -0
- data/lib/clicksend_client/api/post_return_address_api.rb +307 -0
- data/lib/clicksend_client/api/referral_account_api.rb +85 -0
- data/lib/clicksend_client/api/reseller_account_api.rb +253 -0
- data/lib/clicksend_client/api/search_api.rb +92 -0
- data/lib/clicksend_client/api/sms_api.rb +1032 -0
- data/lib/clicksend_client/api/sms_campaign_api.rb +361 -0
- data/lib/clicksend_client/api/sms_delivery_receipt_rules_api.rb +310 -0
- data/lib/clicksend_client/api/statistics_api.rb +119 -0
- data/lib/clicksend_client/api/subaccount_api.rb +361 -0
- data/lib/clicksend_client/api/timezones_api.rb +85 -0
- data/lib/clicksend_client/api/transactional_email_api.rb +260 -0
- data/lib/clicksend_client/api/transfer_credit_api.rb +77 -0
- data/lib/clicksend_client/api/upload_api.rb +84 -0
- data/lib/clicksend_client/api/user_email_templates_api.rb +307 -0
- data/lib/clicksend_client/api/voice_api.rb +570 -0
- data/lib/clicksend_client/api/voice_delivery_receipt_rules_api.rb +310 -0
- data/lib/clicksend_client/api_client.rb +389 -0
- data/lib/clicksend_client/api_error.rb +38 -0
- data/lib/clicksend_client/configuration.rb +209 -0
- data/lib/clicksend_client/models/account.rb +295 -0
- data/lib/clicksend_client/models/account_forgot_password_verify.rb +219 -0
- data/lib/clicksend_client/models/account_verify.rb +220 -0
- data/lib/clicksend_client/models/address.rb +270 -0
- data/lib/clicksend_client/models/attachment.rb +250 -0
- data/lib/clicksend_client/models/contact.rb +345 -0
- data/lib/clicksend_client/models/contact_list.rb +190 -0
- data/lib/clicksend_client/models/contact_list_import.rb +207 -0
- data/lib/clicksend_client/models/credit_card.rb +265 -0
- data/lib/clicksend_client/models/date_before.rb +185 -0
- data/lib/clicksend_client/models/delivery_issue.rb +240 -0
- data/lib/clicksend_client/models/delivery_receipt_rule.rb +250 -0
- data/lib/clicksend_client/models/email.rb +277 -0
- data/lib/clicksend_client/models/email_address.rb +189 -0
- data/lib/clicksend_client/models/email_campaign.rb +287 -0
- data/lib/clicksend_client/models/email_from.rb +200 -0
- data/lib/clicksend_client/models/email_recipient.rb +200 -0
- data/lib/clicksend_client/models/email_sms_address.rb +215 -0
- data/lib/clicksend_client/models/email_template_new.rb +205 -0
- data/lib/clicksend_client/models/email_template_update.rb +200 -0
- data/lib/clicksend_client/models/fax_message.rb +262 -0
- data/lib/clicksend_client/models/fax_message_collection.rb +207 -0
- data/lib/clicksend_client/models/fields.rb +184 -0
- data/lib/clicksend_client/models/fields_fields.rb +335 -0
- data/lib/clicksend_client/models/forgot_password.rb +189 -0
- data/lib/clicksend_client/models/forgot_username.rb +194 -0
- data/lib/clicksend_client/models/inbound_fax_rule.rb +250 -0
- data/lib/clicksend_client/models/inbound_sms_rule.rb +280 -0
- data/lib/clicksend_client/models/mms_campaign.rb +272 -0
- data/lib/clicksend_client/models/mms_message.rb +294 -0
- data/lib/clicksend_client/models/mms_message_collection.rb +207 -0
- data/lib/clicksend_client/models/post_letter.rb +267 -0
- data/lib/clicksend_client/models/post_postcard.rb +209 -0
- data/lib/clicksend_client/models/post_recipient.rb +302 -0
- data/lib/clicksend_client/models/reseller_account.rb +295 -0
- data/lib/clicksend_client/models/reseller_account_transfer_credit.rb +220 -0
- data/lib/clicksend_client/models/sms_campaign.rb +242 -0
- data/lib/clicksend_client/models/sms_message.rb +279 -0
- data/lib/clicksend_client/models/sms_message_collection.rb +192 -0
- data/lib/clicksend_client/models/sms_template.rb +205 -0
- data/lib/clicksend_client/models/stripped_string.rb +190 -0
- data/lib/clicksend_client/models/subaccount.rb +325 -0
- data/lib/clicksend_client/models/upload_file.rb +190 -0
- data/lib/clicksend_client/models/url.rb +190 -0
- data/lib/clicksend_client/models/voice_message.rb +316 -0
- data/lib/clicksend_client/models/voice_message_collection.rb +192 -0
- data/lib/clicksend_client/version.rb +15 -0
- data/spec/api/account_api_spec.rb +131 -0
- data/spec/api/account_recharge_api_spec.rb +107 -0
- data/spec/api/contact_api_spec.rb +129 -0
- data/spec/api/contact_list_api_spec.rb +123 -0
- data/spec/api/countries_api_spec.rb +46 -0
- data/spec/api/delivery_issues_api_spec.rb +60 -0
- data/spec/api/detect_address_api_spec.rb +47 -0
- data/spec/api/email_delivery_receipt_rules_api_spec.rb +98 -0
- data/spec/api/email_marketing_api_spec.rb +213 -0
- data/spec/api/email_to_sms_api_spec.rb +122 -0
- data/spec/api/fax_api_spec.rb +125 -0
- data/spec/api/fax_delivery_receipt_rules_api_spec.rb +98 -0
- data/spec/api/inbound_fax_rules_api_spec.rb +98 -0
- data/spec/api/inbound_sms_rules_api_spec.rb +98 -0
- data/spec/api/master_email_templates_api_spec.rb +99 -0
- data/spec/api/mms_api_spec.rb +84 -0
- data/spec/api/mms_campaign_api_spec.rb +109 -0
- data/spec/api/number_api_spec.rb +76 -0
- data/spec/api/post_letter_api_spec.rb +84 -0
- data/spec/api/post_postcard_api_spec.rb +84 -0
- data/spec/api/post_return_address_api_spec.rb +97 -0
- data/spec/api/referral_account_api_spec.rb +48 -0
- data/spec/api/reseller_account_api_spec.rb +85 -0
- data/spec/api/search_api_spec.rb +49 -0
- data/spec/api/sms_api_spec.rb +259 -0
- data/spec/api/sms_campaign_api_spec.rb +109 -0
- data/spec/api/sms_delivery_receipt_rules_api_spec.rb +98 -0
- data/spec/api/statistics_api_spec.rb +57 -0
- data/spec/api/subaccount_api_spec.rb +109 -0
- data/spec/api/timezones_api_spec.rb +48 -0
- data/spec/api/transactional_email_api_spec.rb +88 -0
- data/spec/api/transfer_credit_api_spec.rb +47 -0
- data/spec/api/upload_api_spec.rb +48 -0
- data/spec/api/user_email_templates_api_spec.rb +97 -0
- data/spec/api/voice_api_spec.rb +157 -0
- data/spec/api/voice_delivery_receipt_rules_api_spec.rb +98 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_forgot_password_verify_spec.rb +53 -0
- data/spec/models/account_spec.rb +83 -0
- data/spec/models/account_verify_spec.rb +53 -0
- data/spec/models/address_spec.rb +77 -0
- data/spec/models/attachment_spec.rb +65 -0
- data/spec/models/contact_list_import_spec.rb +47 -0
- data/spec/models/contact_list_spec.rb +41 -0
- data/spec/models/contact_spec.rb +131 -0
- data/spec/models/credit_card_spec.rb +71 -0
- data/spec/models/date_before_spec.rb +41 -0
- data/spec/models/delivery_issue_spec.rb +65 -0
- data/spec/models/delivery_receipt_rule_spec.rb +65 -0
- data/spec/models/email_address_spec.rb +41 -0
- data/spec/models/email_campaign_spec.rb +83 -0
- data/spec/models/email_from_spec.rb +47 -0
- data/spec/models/email_recipient_spec.rb +47 -0
- data/spec/models/email_sms_address_spec.rb +53 -0
- data/spec/models/email_spec.rb +83 -0
- data/spec/models/email_template_new_spec.rb +47 -0
- data/spec/models/email_template_update_spec.rb +47 -0
- data/spec/models/fax_message_collection_spec.rb +47 -0
- data/spec/models/fax_message_spec.rb +83 -0
- data/spec/models/fields_fields_spec.rb +131 -0
- data/spec/models/fields_spec.rb +41 -0
- data/spec/models/forgot_password_spec.rb +41 -0
- data/spec/models/forgot_username_spec.rb +47 -0
- data/spec/models/inbound_fax_rule_spec.rb +65 -0
- data/spec/models/inbound_sms_rule_spec.rb +77 -0
- data/spec/models/mms_campaign_spec.rb +77 -0
- data/spec/models/mms_message_collection_spec.rb +47 -0
- data/spec/models/mms_message_spec.rb +95 -0
- data/spec/models/post_letter_spec.rb +77 -0
- data/spec/models/post_postcard_spec.rb +47 -0
- data/spec/models/post_recipient_spec.rb +89 -0
- data/spec/models/reseller_account_spec.rb +83 -0
- data/spec/models/reseller_account_transfer_credit_spec.rb +53 -0
- data/spec/models/sms_campaign_spec.rb +65 -0
- data/spec/models/sms_message_collection_spec.rb +41 -0
- data/spec/models/sms_message_spec.rb +89 -0
- data/spec/models/sms_template_spec.rb +47 -0
- data/spec/models/stripped_string_spec.rb +41 -0
- data/spec/models/subaccount_spec.rb +101 -0
- data/spec/models/upload_file_spec.rb +41 -0
- data/spec/models/url_spec.rb +41 -0
- data/spec/models/voice_message_collection_spec.rb +41 -0
- data/spec/models/voice_message_spec.rb +101 -0
- data/spec/spec_helper.rb +111 -0
- metadata +568 -0
@@ -0,0 +1,829 @@
|
|
1
|
+
=begin
|
2
|
+
#ClickSend v3 API
|
3
|
+
|
4
|
+
# This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..*
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.1
|
7
|
+
Contact: support@clicksend.com
|
8
|
+
Generated by: https://github.com/clicksend-api/clicksend-codegen.git
|
9
|
+
ClickSend Codegen version: 2.4.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module ClickSendClient
|
16
|
+
class EmailMarketingApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get all email addresses
|
23
|
+
# Get all email addresses
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Integer] :page Page number (default to 1)
|
26
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
27
|
+
# @return [String]
|
28
|
+
def allowed_email_address_get(opts = {})
|
29
|
+
data, _status_code, _headers = allowed_email_address_get_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get all email addresses
|
34
|
+
# Get all email addresses
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [Integer] :page Page number
|
37
|
+
# @option opts [Integer] :limit Number of records per page
|
38
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
39
|
+
def allowed_email_address_get_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.allowed_email_address_get ...'
|
42
|
+
end
|
43
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
44
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailMarketingApi.allowed_email_address_get, must be greater than or equal to 1.'
|
45
|
+
end
|
46
|
+
|
47
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
48
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailMarketingApi.allowed_email_address_get, must be greater than or equal to 1.'
|
49
|
+
end
|
50
|
+
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/email/addresses'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
57
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
63
|
+
# HTTP header 'Content-Type'
|
64
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = nil
|
71
|
+
auth_names = ['BasicAuth']
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => 'String')
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#allowed_email_address_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
# Create allowed Email Address
|
85
|
+
# Create allowed Email Address
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [EmailAddress] :email_address
|
88
|
+
# @return [String]
|
89
|
+
def allowed_email_address_post(opts = {})
|
90
|
+
data, _status_code, _headers = allowed_email_address_post_with_http_info(opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create allowed Email Address
|
95
|
+
# Create allowed Email Address
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [EmailAddress] :email_address
|
98
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
99
|
+
def allowed_email_address_post_with_http_info(opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.allowed_email_address_post ...'
|
102
|
+
end
|
103
|
+
# resource path
|
104
|
+
local_var_path = '/email/addresses'
|
105
|
+
|
106
|
+
# query parameters
|
107
|
+
query_params = {}
|
108
|
+
|
109
|
+
# header parameters
|
110
|
+
header_params = {}
|
111
|
+
# HTTP header 'Accept' (if needed)
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
113
|
+
# HTTP header 'Content-Type'
|
114
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = @api_client.object_to_http_body(opts[:'email_address'])
|
121
|
+
auth_names = ['BasicAuth']
|
122
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => 'String')
|
129
|
+
if @api_client.config.debugging
|
130
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#allowed_email_address_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
131
|
+
end
|
132
|
+
return data, status_code, headers
|
133
|
+
end
|
134
|
+
# Cancel email campaign
|
135
|
+
# Cancel email campaign
|
136
|
+
# @param email_campaign_id Allowed email campaign id
|
137
|
+
# @param [Hash] opts the optional parameters
|
138
|
+
# @return [String]
|
139
|
+
def cancel_email_campaign_put(email_campaign_id, opts = {})
|
140
|
+
data, _status_code, _headers = cancel_email_campaign_put_with_http_info(email_campaign_id, opts)
|
141
|
+
data
|
142
|
+
end
|
143
|
+
|
144
|
+
# Cancel email campaign
|
145
|
+
# Cancel email campaign
|
146
|
+
# @param email_campaign_id Allowed email campaign id
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
149
|
+
def cancel_email_campaign_put_with_http_info(email_campaign_id, opts = {})
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.cancel_email_campaign_put ...'
|
152
|
+
end
|
153
|
+
# verify the required parameter 'email_campaign_id' is set
|
154
|
+
if @api_client.config.client_side_validation && email_campaign_id.nil?
|
155
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.cancel_email_campaign_put"
|
156
|
+
end
|
157
|
+
# resource path
|
158
|
+
local_var_path = '/email-campaigns/{email_campaign_id}/cancel'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)
|
159
|
+
|
160
|
+
# query parameters
|
161
|
+
query_params = {}
|
162
|
+
|
163
|
+
# header parameters
|
164
|
+
header_params = {}
|
165
|
+
# HTTP header 'Accept' (if needed)
|
166
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
167
|
+
# HTTP header 'Content-Type'
|
168
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
169
|
+
|
170
|
+
# form parameters
|
171
|
+
form_params = {}
|
172
|
+
|
173
|
+
# http body (model)
|
174
|
+
post_body = nil
|
175
|
+
auth_names = ['BasicAuth']
|
176
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
177
|
+
:header_params => header_params,
|
178
|
+
:query_params => query_params,
|
179
|
+
:form_params => form_params,
|
180
|
+
:body => post_body,
|
181
|
+
:auth_names => auth_names,
|
182
|
+
:return_type => 'String')
|
183
|
+
if @api_client.config.debugging
|
184
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#cancel_email_campaign_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
185
|
+
end
|
186
|
+
return data, status_code, headers
|
187
|
+
end
|
188
|
+
# Get specific email campaign
|
189
|
+
# Get specific email campaign
|
190
|
+
# @param email_campaign_id Allowed email campaign id
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [String]
|
193
|
+
def email_campaign_get(email_campaign_id, opts = {})
|
194
|
+
data, _status_code, _headers = email_campaign_get_with_http_info(email_campaign_id, opts)
|
195
|
+
data
|
196
|
+
end
|
197
|
+
|
198
|
+
# Get specific email campaign
|
199
|
+
# Get specific email campaign
|
200
|
+
# @param email_campaign_id Allowed email campaign id
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
203
|
+
def email_campaign_get_with_http_info(email_campaign_id, opts = {})
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_get ...'
|
206
|
+
end
|
207
|
+
# verify the required parameter 'email_campaign_id' is set
|
208
|
+
if @api_client.config.client_side_validation && email_campaign_id.nil?
|
209
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_get"
|
210
|
+
end
|
211
|
+
# resource path
|
212
|
+
local_var_path = '/email-campaigns/{email_campaign_id}'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)
|
213
|
+
|
214
|
+
# query parameters
|
215
|
+
query_params = {}
|
216
|
+
|
217
|
+
# header parameters
|
218
|
+
header_params = {}
|
219
|
+
# HTTP header 'Accept' (if needed)
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
221
|
+
# HTTP header 'Content-Type'
|
222
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
223
|
+
|
224
|
+
# form parameters
|
225
|
+
form_params = {}
|
226
|
+
|
227
|
+
# http body (model)
|
228
|
+
post_body = nil
|
229
|
+
auth_names = ['BasicAuth']
|
230
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
231
|
+
:header_params => header_params,
|
232
|
+
:query_params => query_params,
|
233
|
+
:form_params => form_params,
|
234
|
+
:body => post_body,
|
235
|
+
:auth_names => auth_names,
|
236
|
+
:return_type => 'String')
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
+
end
|
240
|
+
return data, status_code, headers
|
241
|
+
end
|
242
|
+
# Export specific email campaign history
|
243
|
+
# Export specific email campaign history
|
244
|
+
# @param email_campaign_id Allowed email campaign id
|
245
|
+
# @param [Hash] opts the optional parameters
|
246
|
+
# @option opts [Integer] :date_from Start date
|
247
|
+
# @option opts [Integer] :date_to End date
|
248
|
+
# @return [String]
|
249
|
+
def email_campaign_history_export_get(email_campaign_id, opts = {})
|
250
|
+
data, _status_code, _headers = email_campaign_history_export_get_with_http_info(email_campaign_id, opts)
|
251
|
+
data
|
252
|
+
end
|
253
|
+
|
254
|
+
# Export specific email campaign history
|
255
|
+
# Export specific email campaign history
|
256
|
+
# @param email_campaign_id Allowed email campaign id
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @option opts [Integer] :date_from Start date
|
259
|
+
# @option opts [Integer] :date_to End date
|
260
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
261
|
+
def email_campaign_history_export_get_with_http_info(email_campaign_id, opts = {})
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_history_export_get ...'
|
264
|
+
end
|
265
|
+
# verify the required parameter 'email_campaign_id' is set
|
266
|
+
if @api_client.config.client_side_validation && email_campaign_id.nil?
|
267
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_history_export_get"
|
268
|
+
end
|
269
|
+
# resource path
|
270
|
+
local_var_path = '/email-campaigns/{email_campaign_id}/history/export'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)
|
271
|
+
|
272
|
+
# query parameters
|
273
|
+
query_params = {}
|
274
|
+
query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
275
|
+
query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
281
|
+
# HTTP header 'Content-Type'
|
282
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = nil
|
289
|
+
auth_names = ['BasicAuth']
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names,
|
296
|
+
:return_type => 'String')
|
297
|
+
if @api_client.config.debugging
|
298
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
299
|
+
end
|
300
|
+
return data, status_code, headers
|
301
|
+
end
|
302
|
+
# Get specific email campaign history
|
303
|
+
# Get specific email campaign history
|
304
|
+
# @param email_campaign_id Allowed email campaign id
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @option opts [Integer] :date_from Start date
|
307
|
+
# @option opts [Integer] :date_to End date
|
308
|
+
# @option opts [Integer] :page Page number (default to 1)
|
309
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
310
|
+
# @return [String]
|
311
|
+
def email_campaign_history_get(email_campaign_id, opts = {})
|
312
|
+
data, _status_code, _headers = email_campaign_history_get_with_http_info(email_campaign_id, opts)
|
313
|
+
data
|
314
|
+
end
|
315
|
+
|
316
|
+
# Get specific email campaign history
|
317
|
+
# Get specific email campaign history
|
318
|
+
# @param email_campaign_id Allowed email campaign id
|
319
|
+
# @param [Hash] opts the optional parameters
|
320
|
+
# @option opts [Integer] :date_from Start date
|
321
|
+
# @option opts [Integer] :date_to End date
|
322
|
+
# @option opts [Integer] :page Page number
|
323
|
+
# @option opts [Integer] :limit Number of records per page
|
324
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
325
|
+
def email_campaign_history_get_with_http_info(email_campaign_id, opts = {})
|
326
|
+
if @api_client.config.debugging
|
327
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_history_get ...'
|
328
|
+
end
|
329
|
+
# verify the required parameter 'email_campaign_id' is set
|
330
|
+
if @api_client.config.client_side_validation && email_campaign_id.nil?
|
331
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_history_get"
|
332
|
+
end
|
333
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
334
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailMarketingApi.email_campaign_history_get, must be greater than or equal to 1.'
|
335
|
+
end
|
336
|
+
|
337
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
338
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailMarketingApi.email_campaign_history_get, must be greater than or equal to 1.'
|
339
|
+
end
|
340
|
+
|
341
|
+
# resource path
|
342
|
+
local_var_path = '/email-campaigns/{email_campaign_id}/history'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)
|
343
|
+
|
344
|
+
# query parameters
|
345
|
+
query_params = {}
|
346
|
+
query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
347
|
+
query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
348
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
349
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
350
|
+
|
351
|
+
# header parameters
|
352
|
+
header_params = {}
|
353
|
+
# HTTP header 'Accept' (if needed)
|
354
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
355
|
+
# HTTP header 'Content-Type'
|
356
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
357
|
+
|
358
|
+
# form parameters
|
359
|
+
form_params = {}
|
360
|
+
|
361
|
+
# http body (model)
|
362
|
+
post_body = nil
|
363
|
+
auth_names = ['BasicAuth']
|
364
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
365
|
+
:header_params => header_params,
|
366
|
+
:query_params => query_params,
|
367
|
+
:form_params => form_params,
|
368
|
+
:body => post_body,
|
369
|
+
:auth_names => auth_names,
|
370
|
+
:return_type => 'String')
|
371
|
+
if @api_client.config.debugging
|
372
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
373
|
+
end
|
374
|
+
return data, status_code, headers
|
375
|
+
end
|
376
|
+
# Send email campaign
|
377
|
+
# Send email campaign
|
378
|
+
# @param email_campaign Email model
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @return [String]
|
381
|
+
def email_campaign_post(email_campaign, opts = {})
|
382
|
+
data, _status_code, _headers = email_campaign_post_with_http_info(email_campaign, opts)
|
383
|
+
data
|
384
|
+
end
|
385
|
+
|
386
|
+
# Send email campaign
|
387
|
+
# Send email campaign
|
388
|
+
# @param email_campaign Email model
|
389
|
+
# @param [Hash] opts the optional parameters
|
390
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
391
|
+
def email_campaign_post_with_http_info(email_campaign, opts = {})
|
392
|
+
if @api_client.config.debugging
|
393
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_post ...'
|
394
|
+
end
|
395
|
+
# verify the required parameter 'email_campaign' is set
|
396
|
+
if @api_client.config.client_side_validation && email_campaign.nil?
|
397
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign' when calling EmailMarketingApi.email_campaign_post"
|
398
|
+
end
|
399
|
+
# resource path
|
400
|
+
local_var_path = '/email-campaigns/send'
|
401
|
+
|
402
|
+
# query parameters
|
403
|
+
query_params = {}
|
404
|
+
|
405
|
+
# header parameters
|
406
|
+
header_params = {}
|
407
|
+
# HTTP header 'Accept' (if needed)
|
408
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
409
|
+
# HTTP header 'Content-Type'
|
410
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
411
|
+
|
412
|
+
# form parameters
|
413
|
+
form_params = {}
|
414
|
+
|
415
|
+
# http body (model)
|
416
|
+
post_body = @api_client.object_to_http_body(email_campaign)
|
417
|
+
auth_names = ['BasicAuth']
|
418
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
419
|
+
:header_params => header_params,
|
420
|
+
:query_params => query_params,
|
421
|
+
:form_params => form_params,
|
422
|
+
:body => post_body,
|
423
|
+
:auth_names => auth_names,
|
424
|
+
:return_type => 'String')
|
425
|
+
if @api_client.config.debugging
|
426
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
427
|
+
end
|
428
|
+
return data, status_code, headers
|
429
|
+
end
|
430
|
+
# Calculate email campaign price
|
431
|
+
# Calculate email campaign price
|
432
|
+
# @param email_campaign Email model
|
433
|
+
# @param [Hash] opts the optional parameters
|
434
|
+
# @return [String]
|
435
|
+
def email_campaign_price_post(email_campaign, opts = {})
|
436
|
+
data, _status_code, _headers = email_campaign_price_post_with_http_info(email_campaign, opts)
|
437
|
+
data
|
438
|
+
end
|
439
|
+
|
440
|
+
# Calculate email campaign price
|
441
|
+
# Calculate email campaign price
|
442
|
+
# @param email_campaign Email model
|
443
|
+
# @param [Hash] opts the optional parameters
|
444
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
445
|
+
def email_campaign_price_post_with_http_info(email_campaign, opts = {})
|
446
|
+
if @api_client.config.debugging
|
447
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_price_post ...'
|
448
|
+
end
|
449
|
+
# verify the required parameter 'email_campaign' is set
|
450
|
+
if @api_client.config.client_side_validation && email_campaign.nil?
|
451
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign' when calling EmailMarketingApi.email_campaign_price_post"
|
452
|
+
end
|
453
|
+
# resource path
|
454
|
+
local_var_path = '/email-campaigns/price'
|
455
|
+
|
456
|
+
# query parameters
|
457
|
+
query_params = {}
|
458
|
+
|
459
|
+
# header parameters
|
460
|
+
header_params = {}
|
461
|
+
# HTTP header 'Accept' (if needed)
|
462
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
463
|
+
# HTTP header 'Content-Type'
|
464
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
465
|
+
|
466
|
+
# form parameters
|
467
|
+
form_params = {}
|
468
|
+
|
469
|
+
# http body (model)
|
470
|
+
post_body = @api_client.object_to_http_body(email_campaign)
|
471
|
+
auth_names = ['BasicAuth']
|
472
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names,
|
478
|
+
:return_type => 'String')
|
479
|
+
if @api_client.config.debugging
|
480
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
481
|
+
end
|
482
|
+
return data, status_code, headers
|
483
|
+
end
|
484
|
+
# Edit email campaign
|
485
|
+
# Edit email campaign
|
486
|
+
# @param email_campaign_id Allowed email campaign id
|
487
|
+
# @param email_campaign Email model
|
488
|
+
# @param [Hash] opts the optional parameters
|
489
|
+
# @return [String]
|
490
|
+
def email_campaign_put(email_campaign_id, email_campaign, opts = {})
|
491
|
+
data, _status_code, _headers = email_campaign_put_with_http_info(email_campaign_id, email_campaign, opts)
|
492
|
+
data
|
493
|
+
end
|
494
|
+
|
495
|
+
# Edit email campaign
|
496
|
+
# Edit email campaign
|
497
|
+
# @param email_campaign_id Allowed email campaign id
|
498
|
+
# @param email_campaign Email model
|
499
|
+
# @param [Hash] opts the optional parameters
|
500
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
501
|
+
def email_campaign_put_with_http_info(email_campaign_id, email_campaign, opts = {})
|
502
|
+
if @api_client.config.debugging
|
503
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_put ...'
|
504
|
+
end
|
505
|
+
# verify the required parameter 'email_campaign_id' is set
|
506
|
+
if @api_client.config.client_side_validation && email_campaign_id.nil?
|
507
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_put"
|
508
|
+
end
|
509
|
+
# verify the required parameter 'email_campaign' is set
|
510
|
+
if @api_client.config.client_side_validation && email_campaign.nil?
|
511
|
+
fail ArgumentError, "Missing the required parameter 'email_campaign' when calling EmailMarketingApi.email_campaign_put"
|
512
|
+
end
|
513
|
+
# resource path
|
514
|
+
local_var_path = '/email-campaigns/{email_campaign_id}'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)
|
515
|
+
|
516
|
+
# query parameters
|
517
|
+
query_params = {}
|
518
|
+
|
519
|
+
# header parameters
|
520
|
+
header_params = {}
|
521
|
+
# HTTP header 'Accept' (if needed)
|
522
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
523
|
+
# HTTP header 'Content-Type'
|
524
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
525
|
+
|
526
|
+
# form parameters
|
527
|
+
form_params = {}
|
528
|
+
|
529
|
+
# http body (model)
|
530
|
+
post_body = @api_client.object_to_http_body(email_campaign)
|
531
|
+
auth_names = ['BasicAuth']
|
532
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
533
|
+
:header_params => header_params,
|
534
|
+
:query_params => query_params,
|
535
|
+
:form_params => form_params,
|
536
|
+
:body => post_body,
|
537
|
+
:auth_names => auth_names,
|
538
|
+
:return_type => 'String')
|
539
|
+
if @api_client.config.debugging
|
540
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
541
|
+
end
|
542
|
+
return data, status_code, headers
|
543
|
+
end
|
544
|
+
# Get all email campaigns
|
545
|
+
# Get all email campaigns
|
546
|
+
# @param [Hash] opts the optional parameters
|
547
|
+
# @option opts [Integer] :page Page number (default to 1)
|
548
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
549
|
+
# @return [String]
|
550
|
+
def email_campaigns_get(opts = {})
|
551
|
+
data, _status_code, _headers = email_campaigns_get_with_http_info(opts)
|
552
|
+
data
|
553
|
+
end
|
554
|
+
|
555
|
+
# Get all email campaigns
|
556
|
+
# Get all email campaigns
|
557
|
+
# @param [Hash] opts the optional parameters
|
558
|
+
# @option opts [Integer] :page Page number
|
559
|
+
# @option opts [Integer] :limit Number of records per page
|
560
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
561
|
+
def email_campaigns_get_with_http_info(opts = {})
|
562
|
+
if @api_client.config.debugging
|
563
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaigns_get ...'
|
564
|
+
end
|
565
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
566
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailMarketingApi.email_campaigns_get, must be greater than or equal to 1.'
|
567
|
+
end
|
568
|
+
|
569
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
570
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailMarketingApi.email_campaigns_get, must be greater than or equal to 1.'
|
571
|
+
end
|
572
|
+
|
573
|
+
# resource path
|
574
|
+
local_var_path = '/email-campaigns'
|
575
|
+
|
576
|
+
# query parameters
|
577
|
+
query_params = {}
|
578
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
579
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
580
|
+
|
581
|
+
# header parameters
|
582
|
+
header_params = {}
|
583
|
+
# HTTP header 'Accept' (if needed)
|
584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
585
|
+
# HTTP header 'Content-Type'
|
586
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
587
|
+
|
588
|
+
# form parameters
|
589
|
+
form_params = {}
|
590
|
+
|
591
|
+
# http body (model)
|
592
|
+
post_body = nil
|
593
|
+
auth_names = ['BasicAuth']
|
594
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
595
|
+
:header_params => header_params,
|
596
|
+
:query_params => query_params,
|
597
|
+
:form_params => form_params,
|
598
|
+
:body => post_body,
|
599
|
+
:auth_names => auth_names,
|
600
|
+
:return_type => 'String')
|
601
|
+
if @api_client.config.debugging
|
602
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#email_campaigns_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
603
|
+
end
|
604
|
+
return data, status_code, headers
|
605
|
+
end
|
606
|
+
# Send verification token
|
607
|
+
# Send verification token
|
608
|
+
# @param email_address_id Allowed email address id
|
609
|
+
# @param [Hash] opts the optional parameters
|
610
|
+
# @return [String]
|
611
|
+
def send_verification_token_get(email_address_id, opts = {})
|
612
|
+
data, _status_code, _headers = send_verification_token_get_with_http_info(email_address_id, opts)
|
613
|
+
data
|
614
|
+
end
|
615
|
+
|
616
|
+
# Send verification token
|
617
|
+
# Send verification token
|
618
|
+
# @param email_address_id Allowed email address id
|
619
|
+
# @param [Hash] opts the optional parameters
|
620
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
621
|
+
def send_verification_token_get_with_http_info(email_address_id, opts = {})
|
622
|
+
if @api_client.config.debugging
|
623
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.send_verification_token_get ...'
|
624
|
+
end
|
625
|
+
# verify the required parameter 'email_address_id' is set
|
626
|
+
if @api_client.config.client_side_validation && email_address_id.nil?
|
627
|
+
fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.send_verification_token_get"
|
628
|
+
end
|
629
|
+
# resource path
|
630
|
+
local_var_path = '/email/address-verify/{email_address_id}/send'.sub('{' + 'email_address_id' + '}', email_address_id.to_s)
|
631
|
+
|
632
|
+
# query parameters
|
633
|
+
query_params = {}
|
634
|
+
|
635
|
+
# header parameters
|
636
|
+
header_params = {}
|
637
|
+
# HTTP header 'Accept' (if needed)
|
638
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
639
|
+
# HTTP header 'Content-Type'
|
640
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
641
|
+
|
642
|
+
# form parameters
|
643
|
+
form_params = {}
|
644
|
+
|
645
|
+
# http body (model)
|
646
|
+
post_body = nil
|
647
|
+
auth_names = ['BasicAuth']
|
648
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
649
|
+
:header_params => header_params,
|
650
|
+
:query_params => query_params,
|
651
|
+
:form_params => form_params,
|
652
|
+
:body => post_body,
|
653
|
+
:auth_names => auth_names,
|
654
|
+
:return_type => 'String')
|
655
|
+
if @api_client.config.debugging
|
656
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#send_verification_token_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
657
|
+
end
|
658
|
+
return data, status_code, headers
|
659
|
+
end
|
660
|
+
# Delete specific email address
|
661
|
+
# Delete specific email address
|
662
|
+
# @param email_address_id Allowed email address id
|
663
|
+
# @param [Hash] opts the optional parameters
|
664
|
+
# @return [String]
|
665
|
+
def specific_allowed_email_address_delete(email_address_id, opts = {})
|
666
|
+
data, _status_code, _headers = specific_allowed_email_address_delete_with_http_info(email_address_id, opts)
|
667
|
+
data
|
668
|
+
end
|
669
|
+
|
670
|
+
# Delete specific email address
|
671
|
+
# Delete specific email address
|
672
|
+
# @param email_address_id Allowed email address id
|
673
|
+
# @param [Hash] opts the optional parameters
|
674
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
675
|
+
def specific_allowed_email_address_delete_with_http_info(email_address_id, opts = {})
|
676
|
+
if @api_client.config.debugging
|
677
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.specific_allowed_email_address_delete ...'
|
678
|
+
end
|
679
|
+
# verify the required parameter 'email_address_id' is set
|
680
|
+
if @api_client.config.client_side_validation && email_address_id.nil?
|
681
|
+
fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.specific_allowed_email_address_delete"
|
682
|
+
end
|
683
|
+
# resource path
|
684
|
+
local_var_path = '/email/addresses/{email_address_id}'.sub('{' + 'email_address_id' + '}', email_address_id.to_s)
|
685
|
+
|
686
|
+
# query parameters
|
687
|
+
query_params = {}
|
688
|
+
|
689
|
+
# header parameters
|
690
|
+
header_params = {}
|
691
|
+
# HTTP header 'Accept' (if needed)
|
692
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
693
|
+
# HTTP header 'Content-Type'
|
694
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
695
|
+
|
696
|
+
# form parameters
|
697
|
+
form_params = {}
|
698
|
+
|
699
|
+
# http body (model)
|
700
|
+
post_body = nil
|
701
|
+
auth_names = ['BasicAuth']
|
702
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
703
|
+
:header_params => header_params,
|
704
|
+
:query_params => query_params,
|
705
|
+
:form_params => form_params,
|
706
|
+
:body => post_body,
|
707
|
+
:auth_names => auth_names,
|
708
|
+
:return_type => 'String')
|
709
|
+
if @api_client.config.debugging
|
710
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#specific_allowed_email_address_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
711
|
+
end
|
712
|
+
return data, status_code, headers
|
713
|
+
end
|
714
|
+
# Get specific email address
|
715
|
+
# Get specific email address
|
716
|
+
# @param email_address_id Allowed email address id
|
717
|
+
# @param [Hash] opts the optional parameters
|
718
|
+
# @return [String]
|
719
|
+
def specific_allowed_email_address_get(email_address_id, opts = {})
|
720
|
+
data, _status_code, _headers = specific_allowed_email_address_get_with_http_info(email_address_id, opts)
|
721
|
+
data
|
722
|
+
end
|
723
|
+
|
724
|
+
# Get specific email address
|
725
|
+
# Get specific email address
|
726
|
+
# @param email_address_id Allowed email address id
|
727
|
+
# @param [Hash] opts the optional parameters
|
728
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
729
|
+
def specific_allowed_email_address_get_with_http_info(email_address_id, opts = {})
|
730
|
+
if @api_client.config.debugging
|
731
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.specific_allowed_email_address_get ...'
|
732
|
+
end
|
733
|
+
# verify the required parameter 'email_address_id' is set
|
734
|
+
if @api_client.config.client_side_validation && email_address_id.nil?
|
735
|
+
fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.specific_allowed_email_address_get"
|
736
|
+
end
|
737
|
+
# resource path
|
738
|
+
local_var_path = '/email/addresses/{email_address_id}'.sub('{' + 'email_address_id' + '}', email_address_id.to_s)
|
739
|
+
|
740
|
+
# query parameters
|
741
|
+
query_params = {}
|
742
|
+
|
743
|
+
# header parameters
|
744
|
+
header_params = {}
|
745
|
+
# HTTP header 'Accept' (if needed)
|
746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
747
|
+
# HTTP header 'Content-Type'
|
748
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
749
|
+
|
750
|
+
# form parameters
|
751
|
+
form_params = {}
|
752
|
+
|
753
|
+
# http body (model)
|
754
|
+
post_body = nil
|
755
|
+
auth_names = ['BasicAuth']
|
756
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
757
|
+
:header_params => header_params,
|
758
|
+
:query_params => query_params,
|
759
|
+
:form_params => form_params,
|
760
|
+
:body => post_body,
|
761
|
+
:auth_names => auth_names,
|
762
|
+
:return_type => 'String')
|
763
|
+
if @api_client.config.debugging
|
764
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#specific_allowed_email_address_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
765
|
+
end
|
766
|
+
return data, status_code, headers
|
767
|
+
end
|
768
|
+
# Verify email address using verification token
|
769
|
+
# Verify email address using verification token
|
770
|
+
# @param email_address_id Allowed email address id
|
771
|
+
# @param activation_token Your activation token.
|
772
|
+
# @param [Hash] opts the optional parameters
|
773
|
+
# @return [String]
|
774
|
+
def verify_allowed_email_address_get(email_address_id, activation_token, opts = {})
|
775
|
+
data, _status_code, _headers = verify_allowed_email_address_get_with_http_info(email_address_id, activation_token, opts)
|
776
|
+
data
|
777
|
+
end
|
778
|
+
|
779
|
+
# Verify email address using verification token
|
780
|
+
# Verify email address using verification token
|
781
|
+
# @param email_address_id Allowed email address id
|
782
|
+
# @param activation_token Your activation token.
|
783
|
+
# @param [Hash] opts the optional parameters
|
784
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
785
|
+
def verify_allowed_email_address_get_with_http_info(email_address_id, activation_token, opts = {})
|
786
|
+
if @api_client.config.debugging
|
787
|
+
@api_client.config.logger.debug 'Calling API: EmailMarketingApi.verify_allowed_email_address_get ...'
|
788
|
+
end
|
789
|
+
# verify the required parameter 'email_address_id' is set
|
790
|
+
if @api_client.config.client_side_validation && email_address_id.nil?
|
791
|
+
fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.verify_allowed_email_address_get"
|
792
|
+
end
|
793
|
+
# verify the required parameter 'activation_token' is set
|
794
|
+
if @api_client.config.client_side_validation && activation_token.nil?
|
795
|
+
fail ArgumentError, "Missing the required parameter 'activation_token' when calling EmailMarketingApi.verify_allowed_email_address_get"
|
796
|
+
end
|
797
|
+
# resource path
|
798
|
+
local_var_path = '/email/address-verify/{email_address_id}/verify/{activation_token}'.sub('{' + 'email_address_id' + '}', email_address_id.to_s).sub('{' + 'activation_token' + '}', activation_token.to_s)
|
799
|
+
|
800
|
+
# query parameters
|
801
|
+
query_params = {}
|
802
|
+
|
803
|
+
# header parameters
|
804
|
+
header_params = {}
|
805
|
+
# HTTP header 'Accept' (if needed)
|
806
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
807
|
+
# HTTP header 'Content-Type'
|
808
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
809
|
+
|
810
|
+
# form parameters
|
811
|
+
form_params = {}
|
812
|
+
|
813
|
+
# http body (model)
|
814
|
+
post_body = nil
|
815
|
+
auth_names = ['BasicAuth']
|
816
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
817
|
+
:header_params => header_params,
|
818
|
+
:query_params => query_params,
|
819
|
+
:form_params => form_params,
|
820
|
+
:body => post_body,
|
821
|
+
:auth_names => auth_names,
|
822
|
+
:return_type => 'String')
|
823
|
+
if @api_client.config.debugging
|
824
|
+
@api_client.config.logger.debug "API called: EmailMarketingApi#verify_allowed_email_address_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
825
|
+
end
|
826
|
+
return data, status_code, headers
|
827
|
+
end
|
828
|
+
end
|
829
|
+
end
|