clicksend_client 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,307 @@
|
|
|
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 UserEmailTemplatesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Delete user email template
|
|
23
|
+
# Delete user email template
|
|
24
|
+
# @param template_id Email template id
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [String]
|
|
27
|
+
def email_template_delete(template_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = email_template_delete_with_http_info(template_id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Delete user email template
|
|
33
|
+
# Delete user email template
|
|
34
|
+
# @param template_id Email template id
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
37
|
+
def email_template_delete_with_http_info(template_id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: UserEmailTemplatesApi.email_template_delete ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'template_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling UserEmailTemplatesApi.email_template_delete"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/email/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = nil
|
|
63
|
+
auth_names = ['BasicAuth']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => 'String')
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: UserEmailTemplatesApi#email_template_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
# Get specific user email template
|
|
77
|
+
# Get specific user email templates
|
|
78
|
+
# @param template_id Email template id
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [String]
|
|
81
|
+
def email_template_get(template_id, opts = {})
|
|
82
|
+
data, _status_code, _headers = email_template_get_with_http_info(template_id, opts)
|
|
83
|
+
data
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Get specific user email template
|
|
87
|
+
# Get specific user email templates
|
|
88
|
+
# @param template_id Email template id
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
91
|
+
def email_template_get_with_http_info(template_id, opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: UserEmailTemplatesApi.email_template_get ...'
|
|
94
|
+
end
|
|
95
|
+
# verify the required parameter 'template_id' is set
|
|
96
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
97
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling UserEmailTemplatesApi.email_template_get"
|
|
98
|
+
end
|
|
99
|
+
# resource path
|
|
100
|
+
local_var_path = '/email/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
|
|
101
|
+
|
|
102
|
+
# query parameters
|
|
103
|
+
query_params = {}
|
|
104
|
+
|
|
105
|
+
# header parameters
|
|
106
|
+
header_params = {}
|
|
107
|
+
# HTTP header 'Accept' (if needed)
|
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
109
|
+
# HTTP header 'Content-Type'
|
|
110
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
111
|
+
|
|
112
|
+
# form parameters
|
|
113
|
+
form_params = {}
|
|
114
|
+
|
|
115
|
+
# http body (model)
|
|
116
|
+
post_body = nil
|
|
117
|
+
auth_names = ['BasicAuth']
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => 'String')
|
|
125
|
+
if @api_client.config.debugging
|
|
126
|
+
@api_client.config.logger.debug "API called: UserEmailTemplatesApi#email_template_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
127
|
+
end
|
|
128
|
+
return data, status_code, headers
|
|
129
|
+
end
|
|
130
|
+
# Create email template
|
|
131
|
+
# Create email template
|
|
132
|
+
# @param email_template Email template model
|
|
133
|
+
# @param [Hash] opts the optional parameters
|
|
134
|
+
# @return [String]
|
|
135
|
+
def email_template_post(email_template, opts = {})
|
|
136
|
+
data, _status_code, _headers = email_template_post_with_http_info(email_template, opts)
|
|
137
|
+
data
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Create email template
|
|
141
|
+
# Create email template
|
|
142
|
+
# @param email_template Email template model
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
145
|
+
def email_template_post_with_http_info(email_template, opts = {})
|
|
146
|
+
if @api_client.config.debugging
|
|
147
|
+
@api_client.config.logger.debug 'Calling API: UserEmailTemplatesApi.email_template_post ...'
|
|
148
|
+
end
|
|
149
|
+
# verify the required parameter 'email_template' is set
|
|
150
|
+
if @api_client.config.client_side_validation && email_template.nil?
|
|
151
|
+
fail ArgumentError, "Missing the required parameter 'email_template' when calling UserEmailTemplatesApi.email_template_post"
|
|
152
|
+
end
|
|
153
|
+
# resource path
|
|
154
|
+
local_var_path = '/email/templates'
|
|
155
|
+
|
|
156
|
+
# query parameters
|
|
157
|
+
query_params = {}
|
|
158
|
+
|
|
159
|
+
# header parameters
|
|
160
|
+
header_params = {}
|
|
161
|
+
# HTTP header 'Accept' (if needed)
|
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
163
|
+
# HTTP header 'Content-Type'
|
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
165
|
+
|
|
166
|
+
# form parameters
|
|
167
|
+
form_params = {}
|
|
168
|
+
|
|
169
|
+
# http body (model)
|
|
170
|
+
post_body = @api_client.object_to_http_body(email_template)
|
|
171
|
+
auth_names = ['BasicAuth']
|
|
172
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
173
|
+
:header_params => header_params,
|
|
174
|
+
:query_params => query_params,
|
|
175
|
+
:form_params => form_params,
|
|
176
|
+
:body => post_body,
|
|
177
|
+
:auth_names => auth_names,
|
|
178
|
+
:return_type => 'String')
|
|
179
|
+
if @api_client.config.debugging
|
|
180
|
+
@api_client.config.logger.debug "API called: UserEmailTemplatesApi#email_template_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
181
|
+
end
|
|
182
|
+
return data, status_code, headers
|
|
183
|
+
end
|
|
184
|
+
# Update email template
|
|
185
|
+
# Update email template
|
|
186
|
+
# @param template_id Email template id
|
|
187
|
+
# @param email_template Email template model
|
|
188
|
+
# @param [Hash] opts the optional parameters
|
|
189
|
+
# @return [String]
|
|
190
|
+
def email_template_put(template_id, email_template, opts = {})
|
|
191
|
+
data, _status_code, _headers = email_template_put_with_http_info(template_id, email_template, opts)
|
|
192
|
+
data
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Update email template
|
|
196
|
+
# Update email template
|
|
197
|
+
# @param template_id Email template id
|
|
198
|
+
# @param email_template Email template model
|
|
199
|
+
# @param [Hash] opts the optional parameters
|
|
200
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
201
|
+
def email_template_put_with_http_info(template_id, email_template, opts = {})
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug 'Calling API: UserEmailTemplatesApi.email_template_put ...'
|
|
204
|
+
end
|
|
205
|
+
# verify the required parameter 'template_id' is set
|
|
206
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
207
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling UserEmailTemplatesApi.email_template_put"
|
|
208
|
+
end
|
|
209
|
+
# verify the required parameter 'email_template' is set
|
|
210
|
+
if @api_client.config.client_side_validation && email_template.nil?
|
|
211
|
+
fail ArgumentError, "Missing the required parameter 'email_template' when calling UserEmailTemplatesApi.email_template_put"
|
|
212
|
+
end
|
|
213
|
+
# resource path
|
|
214
|
+
local_var_path = '/email/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
|
|
215
|
+
|
|
216
|
+
# query parameters
|
|
217
|
+
query_params = {}
|
|
218
|
+
|
|
219
|
+
# header parameters
|
|
220
|
+
header_params = {}
|
|
221
|
+
# HTTP header 'Accept' (if needed)
|
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
223
|
+
# HTTP header 'Content-Type'
|
|
224
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
225
|
+
|
|
226
|
+
# form parameters
|
|
227
|
+
form_params = {}
|
|
228
|
+
|
|
229
|
+
# http body (model)
|
|
230
|
+
post_body = @api_client.object_to_http_body(email_template)
|
|
231
|
+
auth_names = ['BasicAuth']
|
|
232
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
233
|
+
:header_params => header_params,
|
|
234
|
+
:query_params => query_params,
|
|
235
|
+
:form_params => form_params,
|
|
236
|
+
:body => post_body,
|
|
237
|
+
:auth_names => auth_names,
|
|
238
|
+
:return_type => 'String')
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug "API called: UserEmailTemplatesApi#email_template_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
241
|
+
end
|
|
242
|
+
return data, status_code, headers
|
|
243
|
+
end
|
|
244
|
+
# Get all user email templates
|
|
245
|
+
# Get all user email templates
|
|
246
|
+
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @option opts [Integer] :page Page number (default to 1)
|
|
248
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
|
249
|
+
# @return [String]
|
|
250
|
+
def email_templates_get(opts = {})
|
|
251
|
+
data, _status_code, _headers = email_templates_get_with_http_info(opts)
|
|
252
|
+
data
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Get all user email templates
|
|
256
|
+
# Get all user email templates
|
|
257
|
+
# @param [Hash] opts the optional parameters
|
|
258
|
+
# @option opts [Integer] :page Page number
|
|
259
|
+
# @option opts [Integer] :limit Number of records per page
|
|
260
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
261
|
+
def email_templates_get_with_http_info(opts = {})
|
|
262
|
+
if @api_client.config.debugging
|
|
263
|
+
@api_client.config.logger.debug 'Calling API: UserEmailTemplatesApi.email_templates_get ...'
|
|
264
|
+
end
|
|
265
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
266
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UserEmailTemplatesApi.email_templates_get, must be greater than or equal to 1.'
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
270
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserEmailTemplatesApi.email_templates_get, must be greater than or equal to 1.'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# resource path
|
|
274
|
+
local_var_path = '/email/templates'
|
|
275
|
+
|
|
276
|
+
# query parameters
|
|
277
|
+
query_params = {}
|
|
278
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
279
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
280
|
+
|
|
281
|
+
# header parameters
|
|
282
|
+
header_params = {}
|
|
283
|
+
# HTTP header 'Accept' (if needed)
|
|
284
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
285
|
+
# HTTP header 'Content-Type'
|
|
286
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
287
|
+
|
|
288
|
+
# form parameters
|
|
289
|
+
form_params = {}
|
|
290
|
+
|
|
291
|
+
# http body (model)
|
|
292
|
+
post_body = nil
|
|
293
|
+
auth_names = ['BasicAuth']
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
295
|
+
:header_params => header_params,
|
|
296
|
+
:query_params => query_params,
|
|
297
|
+
:form_params => form_params,
|
|
298
|
+
:body => post_body,
|
|
299
|
+
:auth_names => auth_names,
|
|
300
|
+
:return_type => 'String')
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug "API called: UserEmailTemplatesApi#email_templates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
303
|
+
end
|
|
304
|
+
return data, status_code, headers
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
end
|
|
@@ -0,0 +1,570 @@
|
|
|
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 VoiceApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Update all voice messages as cancelled
|
|
23
|
+
# Update all voice messages as cancelled
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [String]
|
|
26
|
+
def voice_cancel_all_put(opts = {})
|
|
27
|
+
data, _status_code, _headers = voice_cancel_all_put_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Update all voice messages as cancelled
|
|
32
|
+
# Update all voice messages as cancelled
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
35
|
+
def voice_cancel_all_put_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_cancel_all_put ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/voice/cancel-all'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
|
+
# HTTP header 'Content-Type'
|
|
50
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
|
+
|
|
52
|
+
# form parameters
|
|
53
|
+
form_params = {}
|
|
54
|
+
|
|
55
|
+
# http body (model)
|
|
56
|
+
post_body = nil
|
|
57
|
+
auth_names = ['BasicAuth']
|
|
58
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
59
|
+
:header_params => header_params,
|
|
60
|
+
:query_params => query_params,
|
|
61
|
+
:form_params => form_params,
|
|
62
|
+
:body => post_body,
|
|
63
|
+
:auth_names => auth_names,
|
|
64
|
+
:return_type => 'String')
|
|
65
|
+
if @api_client.config.debugging
|
|
66
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_cancel_all_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
67
|
+
end
|
|
68
|
+
return data, status_code, headers
|
|
69
|
+
end
|
|
70
|
+
# Update voice message status as cancelled
|
|
71
|
+
# Update voice message status as cancelled
|
|
72
|
+
# @param message_id Your voice message id
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @return [String]
|
|
75
|
+
def voice_cancel_by_message_id_put(message_id, opts = {})
|
|
76
|
+
data, _status_code, _headers = voice_cancel_by_message_id_put_with_http_info(message_id, opts)
|
|
77
|
+
data
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Update voice message status as cancelled
|
|
81
|
+
# Update voice message status as cancelled
|
|
82
|
+
# @param message_id Your voice message id
|
|
83
|
+
# @param [Hash] opts the optional parameters
|
|
84
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
85
|
+
def voice_cancel_by_message_id_put_with_http_info(message_id, opts = {})
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_cancel_by_message_id_put ...'
|
|
88
|
+
end
|
|
89
|
+
# verify the required parameter 'message_id' is set
|
|
90
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
91
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling VoiceApi.voice_cancel_by_message_id_put"
|
|
92
|
+
end
|
|
93
|
+
# resource path
|
|
94
|
+
local_var_path = '/voice/{message_id}/cancel'.sub('{' + 'message_id' + '}', message_id.to_s)
|
|
95
|
+
|
|
96
|
+
# query parameters
|
|
97
|
+
query_params = {}
|
|
98
|
+
|
|
99
|
+
# header parameters
|
|
100
|
+
header_params = {}
|
|
101
|
+
# HTTP header 'Accept' (if needed)
|
|
102
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
103
|
+
# HTTP header 'Content-Type'
|
|
104
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
105
|
+
|
|
106
|
+
# form parameters
|
|
107
|
+
form_params = {}
|
|
108
|
+
|
|
109
|
+
# http body (model)
|
|
110
|
+
post_body = nil
|
|
111
|
+
auth_names = ['BasicAuth']
|
|
112
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
113
|
+
:header_params => header_params,
|
|
114
|
+
:query_params => query_params,
|
|
115
|
+
:form_params => form_params,
|
|
116
|
+
:body => post_body,
|
|
117
|
+
:auth_names => auth_names,
|
|
118
|
+
:return_type => 'String')
|
|
119
|
+
if @api_client.config.debugging
|
|
120
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_cancel_by_message_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
121
|
+
end
|
|
122
|
+
return data, status_code, headers
|
|
123
|
+
end
|
|
124
|
+
# Export voice history
|
|
125
|
+
# Export voice history
|
|
126
|
+
# @param filename Filename to export to
|
|
127
|
+
# @param [Hash] opts the optional parameters
|
|
128
|
+
# @return [String]
|
|
129
|
+
def voice_history_export_get(filename, opts = {})
|
|
130
|
+
data, _status_code, _headers = voice_history_export_get_with_http_info(filename, opts)
|
|
131
|
+
data
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Export voice history
|
|
135
|
+
# Export voice history
|
|
136
|
+
# @param filename Filename to export to
|
|
137
|
+
# @param [Hash] opts the optional parameters
|
|
138
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
139
|
+
def voice_history_export_get_with_http_info(filename, opts = {})
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_history_export_get ...'
|
|
142
|
+
end
|
|
143
|
+
# verify the required parameter 'filename' is set
|
|
144
|
+
if @api_client.config.client_side_validation && filename.nil?
|
|
145
|
+
fail ArgumentError, "Missing the required parameter 'filename' when calling VoiceApi.voice_history_export_get"
|
|
146
|
+
end
|
|
147
|
+
# resource path
|
|
148
|
+
local_var_path = '/voice/history/export'
|
|
149
|
+
|
|
150
|
+
# query parameters
|
|
151
|
+
query_params = {}
|
|
152
|
+
query_params[:'filename'] = filename
|
|
153
|
+
|
|
154
|
+
# header parameters
|
|
155
|
+
header_params = {}
|
|
156
|
+
# HTTP header 'Accept' (if needed)
|
|
157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
158
|
+
# HTTP header 'Content-Type'
|
|
159
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
160
|
+
|
|
161
|
+
# form parameters
|
|
162
|
+
form_params = {}
|
|
163
|
+
|
|
164
|
+
# http body (model)
|
|
165
|
+
post_body = nil
|
|
166
|
+
auth_names = ['BasicAuth']
|
|
167
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
168
|
+
:header_params => header_params,
|
|
169
|
+
:query_params => query_params,
|
|
170
|
+
:form_params => form_params,
|
|
171
|
+
:body => post_body,
|
|
172
|
+
:auth_names => auth_names,
|
|
173
|
+
:return_type => 'String')
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
176
|
+
end
|
|
177
|
+
return data, status_code, headers
|
|
178
|
+
end
|
|
179
|
+
# Get all voice history
|
|
180
|
+
# Get all voice history
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @option opts [Integer] :date_from Timestamp (from) used to show records by date.
|
|
183
|
+
# @option opts [Integer] :date_to Timestamp (to) used to show records by date
|
|
184
|
+
# @option opts [Integer] :page Page number (default to 1)
|
|
185
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
|
186
|
+
# @return [String]
|
|
187
|
+
def voice_history_get(opts = {})
|
|
188
|
+
data, _status_code, _headers = voice_history_get_with_http_info(opts)
|
|
189
|
+
data
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Get all voice history
|
|
193
|
+
# Get all voice history
|
|
194
|
+
# @param [Hash] opts the optional parameters
|
|
195
|
+
# @option opts [Integer] :date_from Timestamp (from) used to show records by date.
|
|
196
|
+
# @option opts [Integer] :date_to Timestamp (to) used to show records by date
|
|
197
|
+
# @option opts [Integer] :page Page number
|
|
198
|
+
# @option opts [Integer] :limit Number of records per page
|
|
199
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
200
|
+
def voice_history_get_with_http_info(opts = {})
|
|
201
|
+
if @api_client.config.debugging
|
|
202
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_history_get ...'
|
|
203
|
+
end
|
|
204
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
205
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VoiceApi.voice_history_get, must be greater than or equal to 1.'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
209
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VoiceApi.voice_history_get, must be greater than or equal to 1.'
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# resource path
|
|
213
|
+
local_var_path = '/voice/history'
|
|
214
|
+
|
|
215
|
+
# query parameters
|
|
216
|
+
query_params = {}
|
|
217
|
+
query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
|
218
|
+
query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
|
219
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
220
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
221
|
+
|
|
222
|
+
# header parameters
|
|
223
|
+
header_params = {}
|
|
224
|
+
# HTTP header 'Accept' (if needed)
|
|
225
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
226
|
+
# HTTP header 'Content-Type'
|
|
227
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
228
|
+
|
|
229
|
+
# form parameters
|
|
230
|
+
form_params = {}
|
|
231
|
+
|
|
232
|
+
# http body (model)
|
|
233
|
+
post_body = nil
|
|
234
|
+
auth_names = ['BasicAuth']
|
|
235
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
236
|
+
:header_params => header_params,
|
|
237
|
+
:query_params => query_params,
|
|
238
|
+
:form_params => form_params,
|
|
239
|
+
:body => post_body,
|
|
240
|
+
:auth_names => auth_names,
|
|
241
|
+
:return_type => 'String')
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
244
|
+
end
|
|
245
|
+
return data, status_code, headers
|
|
246
|
+
end
|
|
247
|
+
# Get all voice languages
|
|
248
|
+
# Get all voice languages
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [String]
|
|
251
|
+
def voice_lang_get(opts = {})
|
|
252
|
+
data, _status_code, _headers = voice_lang_get_with_http_info(opts)
|
|
253
|
+
data
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Get all voice languages
|
|
257
|
+
# Get all voice languages
|
|
258
|
+
# @param [Hash] opts the optional parameters
|
|
259
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
260
|
+
def voice_lang_get_with_http_info(opts = {})
|
|
261
|
+
if @api_client.config.debugging
|
|
262
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_lang_get ...'
|
|
263
|
+
end
|
|
264
|
+
# resource path
|
|
265
|
+
local_var_path = '/voice/lang'
|
|
266
|
+
|
|
267
|
+
# query parameters
|
|
268
|
+
query_params = {}
|
|
269
|
+
|
|
270
|
+
# header parameters
|
|
271
|
+
header_params = {}
|
|
272
|
+
# HTTP header 'Accept' (if needed)
|
|
273
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
274
|
+
# HTTP header 'Content-Type'
|
|
275
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
276
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = nil
|
|
282
|
+
auth_names = ['BasicAuth']
|
|
283
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
284
|
+
:header_params => header_params,
|
|
285
|
+
:query_params => query_params,
|
|
286
|
+
:form_params => form_params,
|
|
287
|
+
:body => post_body,
|
|
288
|
+
:auth_names => auth_names,
|
|
289
|
+
:return_type => 'String')
|
|
290
|
+
if @api_client.config.debugging
|
|
291
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_lang_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
292
|
+
end
|
|
293
|
+
return data, status_code, headers
|
|
294
|
+
end
|
|
295
|
+
# Calculate voice price
|
|
296
|
+
# Calculate voice price
|
|
297
|
+
# @param voice_messages VoiceMessageCollection model
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @return [String]
|
|
300
|
+
def voice_price_post(voice_messages, opts = {})
|
|
301
|
+
data, _status_code, _headers = voice_price_post_with_http_info(voice_messages, opts)
|
|
302
|
+
data
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Calculate voice price
|
|
306
|
+
# Calculate voice price
|
|
307
|
+
# @param voice_messages VoiceMessageCollection model
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
310
|
+
def voice_price_post_with_http_info(voice_messages, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_price_post ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'voice_messages' is set
|
|
315
|
+
if @api_client.config.client_side_validation && voice_messages.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'voice_messages' when calling VoiceApi.voice_price_post"
|
|
317
|
+
end
|
|
318
|
+
# resource path
|
|
319
|
+
local_var_path = '/voice/price'
|
|
320
|
+
|
|
321
|
+
# query parameters
|
|
322
|
+
query_params = {}
|
|
323
|
+
|
|
324
|
+
# header parameters
|
|
325
|
+
header_params = {}
|
|
326
|
+
# HTTP header 'Accept' (if needed)
|
|
327
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
328
|
+
# HTTP header 'Content-Type'
|
|
329
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
330
|
+
|
|
331
|
+
# form parameters
|
|
332
|
+
form_params = {}
|
|
333
|
+
|
|
334
|
+
# http body (model)
|
|
335
|
+
post_body = @api_client.object_to_http_body(voice_messages)
|
|
336
|
+
auth_names = ['BasicAuth']
|
|
337
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
338
|
+
:header_params => header_params,
|
|
339
|
+
:query_params => query_params,
|
|
340
|
+
:form_params => form_params,
|
|
341
|
+
:body => post_body,
|
|
342
|
+
:auth_names => auth_names,
|
|
343
|
+
:return_type => 'String')
|
|
344
|
+
if @api_client.config.debugging
|
|
345
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
+
end
|
|
347
|
+
return data, status_code, headers
|
|
348
|
+
end
|
|
349
|
+
# Get all delivery receipts
|
|
350
|
+
# Get all delivery receipts
|
|
351
|
+
# @param [Hash] opts the optional parameters
|
|
352
|
+
# @option opts [Integer] :page Page number (default to 1)
|
|
353
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
|
354
|
+
# @return [String]
|
|
355
|
+
def voice_receipts_get(opts = {})
|
|
356
|
+
data, _status_code, _headers = voice_receipts_get_with_http_info(opts)
|
|
357
|
+
data
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Get all delivery receipts
|
|
361
|
+
# Get all delivery receipts
|
|
362
|
+
# @param [Hash] opts the optional parameters
|
|
363
|
+
# @option opts [Integer] :page Page number
|
|
364
|
+
# @option opts [Integer] :limit Number of records per page
|
|
365
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
366
|
+
def voice_receipts_get_with_http_info(opts = {})
|
|
367
|
+
if @api_client.config.debugging
|
|
368
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_receipts_get ...'
|
|
369
|
+
end
|
|
370
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
371
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VoiceApi.voice_receipts_get, must be greater than or equal to 1.'
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
375
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VoiceApi.voice_receipts_get, must be greater than or equal to 1.'
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# resource path
|
|
379
|
+
local_var_path = '/voice/receipts'
|
|
380
|
+
|
|
381
|
+
# query parameters
|
|
382
|
+
query_params = {}
|
|
383
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
384
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
385
|
+
|
|
386
|
+
# header parameters
|
|
387
|
+
header_params = {}
|
|
388
|
+
# HTTP header 'Accept' (if needed)
|
|
389
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
390
|
+
# HTTP header 'Content-Type'
|
|
391
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
392
|
+
|
|
393
|
+
# form parameters
|
|
394
|
+
form_params = {}
|
|
395
|
+
|
|
396
|
+
# http body (model)
|
|
397
|
+
post_body = nil
|
|
398
|
+
auth_names = ['BasicAuth']
|
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
400
|
+
:header_params => header_params,
|
|
401
|
+
:query_params => query_params,
|
|
402
|
+
:form_params => form_params,
|
|
403
|
+
:body => post_body,
|
|
404
|
+
:auth_names => auth_names,
|
|
405
|
+
:return_type => 'String')
|
|
406
|
+
if @api_client.config.debugging
|
|
407
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_receipts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
408
|
+
end
|
|
409
|
+
return data, status_code, headers
|
|
410
|
+
end
|
|
411
|
+
# Add a delivery receipt
|
|
412
|
+
# Add a delivery receipt
|
|
413
|
+
# @param url Url model
|
|
414
|
+
# @param [Hash] opts the optional parameters
|
|
415
|
+
# @return [String]
|
|
416
|
+
def voice_receipts_post(url, opts = {})
|
|
417
|
+
data, _status_code, _headers = voice_receipts_post_with_http_info(url, opts)
|
|
418
|
+
data
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# Add a delivery receipt
|
|
422
|
+
# Add a delivery receipt
|
|
423
|
+
# @param url Url model
|
|
424
|
+
# @param [Hash] opts the optional parameters
|
|
425
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
426
|
+
def voice_receipts_post_with_http_info(url, opts = {})
|
|
427
|
+
if @api_client.config.debugging
|
|
428
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_receipts_post ...'
|
|
429
|
+
end
|
|
430
|
+
# verify the required parameter 'url' is set
|
|
431
|
+
if @api_client.config.client_side_validation && url.nil?
|
|
432
|
+
fail ArgumentError, "Missing the required parameter 'url' when calling VoiceApi.voice_receipts_post"
|
|
433
|
+
end
|
|
434
|
+
# resource path
|
|
435
|
+
local_var_path = '/voice/receipts'
|
|
436
|
+
|
|
437
|
+
# query parameters
|
|
438
|
+
query_params = {}
|
|
439
|
+
|
|
440
|
+
# header parameters
|
|
441
|
+
header_params = {}
|
|
442
|
+
# HTTP header 'Accept' (if needed)
|
|
443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
444
|
+
# HTTP header 'Content-Type'
|
|
445
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
446
|
+
|
|
447
|
+
# form parameters
|
|
448
|
+
form_params = {}
|
|
449
|
+
|
|
450
|
+
# http body (model)
|
|
451
|
+
post_body = @api_client.object_to_http_body(url)
|
|
452
|
+
auth_names = ['BasicAuth']
|
|
453
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
454
|
+
:header_params => header_params,
|
|
455
|
+
:query_params => query_params,
|
|
456
|
+
:form_params => form_params,
|
|
457
|
+
:body => post_body,
|
|
458
|
+
:auth_names => auth_names,
|
|
459
|
+
:return_type => 'String')
|
|
460
|
+
if @api_client.config.debugging
|
|
461
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_receipts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
462
|
+
end
|
|
463
|
+
return data, status_code, headers
|
|
464
|
+
end
|
|
465
|
+
# Mark delivery receipts as read
|
|
466
|
+
# Mark delivery receipts as read
|
|
467
|
+
# @param [Hash] opts the optional parameters
|
|
468
|
+
# @option opts [DateBefore] :date_before DateBefore model
|
|
469
|
+
# @return [String]
|
|
470
|
+
def voice_receipts_read_put(opts = {})
|
|
471
|
+
data, _status_code, _headers = voice_receipts_read_put_with_http_info(opts)
|
|
472
|
+
data
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
# Mark delivery receipts as read
|
|
476
|
+
# Mark delivery receipts as read
|
|
477
|
+
# @param [Hash] opts the optional parameters
|
|
478
|
+
# @option opts [DateBefore] :date_before DateBefore model
|
|
479
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
480
|
+
def voice_receipts_read_put_with_http_info(opts = {})
|
|
481
|
+
if @api_client.config.debugging
|
|
482
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_receipts_read_put ...'
|
|
483
|
+
end
|
|
484
|
+
# resource path
|
|
485
|
+
local_var_path = '/voice/receipts-read'
|
|
486
|
+
|
|
487
|
+
# query parameters
|
|
488
|
+
query_params = {}
|
|
489
|
+
|
|
490
|
+
# header parameters
|
|
491
|
+
header_params = {}
|
|
492
|
+
# HTTP header 'Accept' (if needed)
|
|
493
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
494
|
+
# HTTP header 'Content-Type'
|
|
495
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
496
|
+
|
|
497
|
+
# form parameters
|
|
498
|
+
form_params = {}
|
|
499
|
+
|
|
500
|
+
# http body (model)
|
|
501
|
+
post_body = @api_client.object_to_http_body(opts[:'date_before'])
|
|
502
|
+
auth_names = ['BasicAuth']
|
|
503
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
504
|
+
:header_params => header_params,
|
|
505
|
+
:query_params => query_params,
|
|
506
|
+
:form_params => form_params,
|
|
507
|
+
:body => post_body,
|
|
508
|
+
:auth_names => auth_names,
|
|
509
|
+
:return_type => 'String')
|
|
510
|
+
if @api_client.config.debugging
|
|
511
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_receipts_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
512
|
+
end
|
|
513
|
+
return data, status_code, headers
|
|
514
|
+
end
|
|
515
|
+
# Send voice message(s)
|
|
516
|
+
# Send a voice call
|
|
517
|
+
# @param voice_messages VoiceMessageCollection model
|
|
518
|
+
# @param [Hash] opts the optional parameters
|
|
519
|
+
# @return [String]
|
|
520
|
+
def voice_send_post(voice_messages, opts = {})
|
|
521
|
+
data, _status_code, _headers = voice_send_post_with_http_info(voice_messages, opts)
|
|
522
|
+
data
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
# Send voice message(s)
|
|
526
|
+
# Send a voice call
|
|
527
|
+
# @param voice_messages VoiceMessageCollection model
|
|
528
|
+
# @param [Hash] opts the optional parameters
|
|
529
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
530
|
+
def voice_send_post_with_http_info(voice_messages, opts = {})
|
|
531
|
+
if @api_client.config.debugging
|
|
532
|
+
@api_client.config.logger.debug 'Calling API: VoiceApi.voice_send_post ...'
|
|
533
|
+
end
|
|
534
|
+
# verify the required parameter 'voice_messages' is set
|
|
535
|
+
if @api_client.config.client_side_validation && voice_messages.nil?
|
|
536
|
+
fail ArgumentError, "Missing the required parameter 'voice_messages' when calling VoiceApi.voice_send_post"
|
|
537
|
+
end
|
|
538
|
+
# resource path
|
|
539
|
+
local_var_path = '/voice/send'
|
|
540
|
+
|
|
541
|
+
# query parameters
|
|
542
|
+
query_params = {}
|
|
543
|
+
|
|
544
|
+
# header parameters
|
|
545
|
+
header_params = {}
|
|
546
|
+
# HTTP header 'Accept' (if needed)
|
|
547
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
548
|
+
# HTTP header 'Content-Type'
|
|
549
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
550
|
+
|
|
551
|
+
# form parameters
|
|
552
|
+
form_params = {}
|
|
553
|
+
|
|
554
|
+
# http body (model)
|
|
555
|
+
post_body = @api_client.object_to_http_body(voice_messages)
|
|
556
|
+
auth_names = ['BasicAuth']
|
|
557
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
558
|
+
:header_params => header_params,
|
|
559
|
+
:query_params => query_params,
|
|
560
|
+
:form_params => form_params,
|
|
561
|
+
:body => post_body,
|
|
562
|
+
:auth_names => auth_names,
|
|
563
|
+
:return_type => 'String')
|
|
564
|
+
if @api_client.config.debugging
|
|
565
|
+
@api_client.config.logger.debug "API called: VoiceApi#voice_send_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
566
|
+
end
|
|
567
|
+
return data, status_code, headers
|
|
568
|
+
end
|
|
569
|
+
end
|
|
570
|
+
end
|