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,423 @@
|
|
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 EmailToSmsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get list of email to sms allowed addresses
|
23
|
+
# Get list of email to sms allowed 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 sms_email_sms_get(opts = {})
|
29
|
+
data, _status_code, _headers = sms_email_sms_get_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get list of email to sms allowed addresses
|
34
|
+
# Get list of email to sms allowed 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 sms_email_sms_get_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_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 EmailToSmsApi.sms_email_sms_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 EmailToSmsApi.sms_email_sms_get, must be greater than or equal to 1.'
|
49
|
+
end
|
50
|
+
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/sms/email-sms'
|
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: EmailToSmsApi#sms_email_sms_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
# Create email to sms allowed address
|
85
|
+
# Create email to sms allowed address
|
86
|
+
# @param email_sms_address EmailSMSAddress model
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [String]
|
89
|
+
def sms_email_sms_post(email_sms_address, opts = {})
|
90
|
+
data, _status_code, _headers = sms_email_sms_post_with_http_info(email_sms_address, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create email to sms allowed address
|
95
|
+
# Create email to sms allowed address
|
96
|
+
# @param email_sms_address EmailSMSAddress model
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
99
|
+
def sms_email_sms_post_with_http_info(email_sms_address, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_post ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'email_sms_address' is set
|
104
|
+
if @api_client.config.client_side_validation && email_sms_address.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'email_sms_address' when calling EmailToSmsApi.sms_email_sms_post"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/sms/email-sms'
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
# HTTP header 'Content-Type'
|
118
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = @api_client.object_to_http_body(email_sms_address)
|
125
|
+
auth_names = ['BasicAuth']
|
126
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
127
|
+
:header_params => header_params,
|
128
|
+
:query_params => query_params,
|
129
|
+
:form_params => form_params,
|
130
|
+
:body => post_body,
|
131
|
+
:auth_names => auth_names,
|
132
|
+
:return_type => 'String')
|
133
|
+
if @api_client.config.debugging
|
134
|
+
@api_client.config.logger.debug "API called: EmailToSmsApi#sms_email_sms_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
135
|
+
end
|
136
|
+
return data, status_code, headers
|
137
|
+
end
|
138
|
+
# Delete email to sms stripped string rule
|
139
|
+
# Delete email to sms stripped string rule
|
140
|
+
# @param rule_id Your rule id
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [String]
|
143
|
+
def sms_email_sms_stripped_string_delete(rule_id, opts = {})
|
144
|
+
data, _status_code, _headers = sms_email_sms_stripped_string_delete_with_http_info(rule_id, opts)
|
145
|
+
data
|
146
|
+
end
|
147
|
+
|
148
|
+
# Delete email to sms stripped string rule
|
149
|
+
# Delete email to sms stripped string rule
|
150
|
+
# @param rule_id Your rule id
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
153
|
+
def sms_email_sms_stripped_string_delete_with_http_info(rule_id, opts = {})
|
154
|
+
if @api_client.config.debugging
|
155
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_stripped_string_delete ...'
|
156
|
+
end
|
157
|
+
# verify the required parameter 'rule_id' is set
|
158
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
159
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling EmailToSmsApi.sms_email_sms_stripped_string_delete"
|
160
|
+
end
|
161
|
+
# resource path
|
162
|
+
local_var_path = '/sms/email-sms-stripped-strings/{rule_id}'.sub('{' + 'rule_id' + '}', rule_id.to_s)
|
163
|
+
|
164
|
+
# query parameters
|
165
|
+
query_params = {}
|
166
|
+
|
167
|
+
# header parameters
|
168
|
+
header_params = {}
|
169
|
+
# HTTP header 'Accept' (if needed)
|
170
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
171
|
+
# HTTP header 'Content-Type'
|
172
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
173
|
+
|
174
|
+
# form parameters
|
175
|
+
form_params = {}
|
176
|
+
|
177
|
+
# http body (model)
|
178
|
+
post_body = nil
|
179
|
+
auth_names = ['BasicAuth']
|
180
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => 'String')
|
187
|
+
if @api_client.config.debugging
|
188
|
+
@api_client.config.logger.debug "API called: EmailToSmsApi#sms_email_sms_stripped_string_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
189
|
+
end
|
190
|
+
return data, status_code, headers
|
191
|
+
end
|
192
|
+
# Get email to sms stripped string rule
|
193
|
+
# Get email to sms stripped string rule
|
194
|
+
# @param rule_id Your rule id
|
195
|
+
# @param [Hash] opts the optional parameters
|
196
|
+
# @return [String]
|
197
|
+
def sms_email_sms_stripped_string_get(rule_id, opts = {})
|
198
|
+
data, _status_code, _headers = sms_email_sms_stripped_string_get_with_http_info(rule_id, opts)
|
199
|
+
data
|
200
|
+
end
|
201
|
+
|
202
|
+
# Get email to sms stripped string rule
|
203
|
+
# Get email to sms stripped string rule
|
204
|
+
# @param rule_id Your rule id
|
205
|
+
# @param [Hash] opts the optional parameters
|
206
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
207
|
+
def sms_email_sms_stripped_string_get_with_http_info(rule_id, opts = {})
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_stripped_string_get ...'
|
210
|
+
end
|
211
|
+
# verify the required parameter 'rule_id' is set
|
212
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
213
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling EmailToSmsApi.sms_email_sms_stripped_string_get"
|
214
|
+
end
|
215
|
+
# resource path
|
216
|
+
local_var_path = '/sms/email-sms-stripped-strings/{rule_id}'.sub('{' + 'rule_id' + '}', rule_id.to_s)
|
217
|
+
|
218
|
+
# query parameters
|
219
|
+
query_params = {}
|
220
|
+
|
221
|
+
# header parameters
|
222
|
+
header_params = {}
|
223
|
+
# HTTP header 'Accept' (if needed)
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
225
|
+
# HTTP header 'Content-Type'
|
226
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
227
|
+
|
228
|
+
# form parameters
|
229
|
+
form_params = {}
|
230
|
+
|
231
|
+
# http body (model)
|
232
|
+
post_body = nil
|
233
|
+
auth_names = ['BasicAuth']
|
234
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
235
|
+
:header_params => header_params,
|
236
|
+
:query_params => query_params,
|
237
|
+
:form_params => form_params,
|
238
|
+
:body => post_body,
|
239
|
+
:auth_names => auth_names,
|
240
|
+
:return_type => 'String')
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug "API called: EmailToSmsApi#sms_email_sms_stripped_string_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
243
|
+
end
|
244
|
+
return data, status_code, headers
|
245
|
+
end
|
246
|
+
# Create email to sms stripped string rule
|
247
|
+
# Create email to sms stripped string rules
|
248
|
+
# @param stripped_string StrippedString model
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [String]
|
251
|
+
def sms_email_sms_stripped_string_post(stripped_string, opts = {})
|
252
|
+
data, _status_code, _headers = sms_email_sms_stripped_string_post_with_http_info(stripped_string, opts)
|
253
|
+
data
|
254
|
+
end
|
255
|
+
|
256
|
+
# Create email to sms stripped string rule
|
257
|
+
# Create email to sms stripped string rules
|
258
|
+
# @param stripped_string StrippedString model
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
261
|
+
def sms_email_sms_stripped_string_post_with_http_info(stripped_string, opts = {})
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_stripped_string_post ...'
|
264
|
+
end
|
265
|
+
# verify the required parameter 'stripped_string' is set
|
266
|
+
if @api_client.config.client_side_validation && stripped_string.nil?
|
267
|
+
fail ArgumentError, "Missing the required parameter 'stripped_string' when calling EmailToSmsApi.sms_email_sms_stripped_string_post"
|
268
|
+
end
|
269
|
+
# resource path
|
270
|
+
local_var_path = '/sms/email-sms-stripped-strings'
|
271
|
+
|
272
|
+
# query parameters
|
273
|
+
query_params = {}
|
274
|
+
|
275
|
+
# header parameters
|
276
|
+
header_params = {}
|
277
|
+
# HTTP header 'Accept' (if needed)
|
278
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
279
|
+
# HTTP header 'Content-Type'
|
280
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
281
|
+
|
282
|
+
# form parameters
|
283
|
+
form_params = {}
|
284
|
+
|
285
|
+
# http body (model)
|
286
|
+
post_body = @api_client.object_to_http_body(stripped_string)
|
287
|
+
auth_names = ['BasicAuth']
|
288
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => 'String')
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug "API called: EmailToSmsApi#sms_email_sms_stripped_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
297
|
+
end
|
298
|
+
return data, status_code, headers
|
299
|
+
end
|
300
|
+
# Update email to sms stripped string rule
|
301
|
+
# Update email to sms stripped string rule
|
302
|
+
# @param stripped_string StrippedString model
|
303
|
+
# @param rule_id Your rule id
|
304
|
+
# @param [Hash] opts the optional parameters
|
305
|
+
# @return [String]
|
306
|
+
def sms_email_sms_stripped_string_put(stripped_string, rule_id, opts = {})
|
307
|
+
data, _status_code, _headers = sms_email_sms_stripped_string_put_with_http_info(stripped_string, rule_id, opts)
|
308
|
+
data
|
309
|
+
end
|
310
|
+
|
311
|
+
# Update email to sms stripped string rule
|
312
|
+
# Update email to sms stripped string rule
|
313
|
+
# @param stripped_string StrippedString model
|
314
|
+
# @param rule_id Your rule id
|
315
|
+
# @param [Hash] opts the optional parameters
|
316
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
317
|
+
def sms_email_sms_stripped_string_put_with_http_info(stripped_string, rule_id, opts = {})
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_stripped_string_put ...'
|
320
|
+
end
|
321
|
+
# verify the required parameter 'stripped_string' is set
|
322
|
+
if @api_client.config.client_side_validation && stripped_string.nil?
|
323
|
+
fail ArgumentError, "Missing the required parameter 'stripped_string' when calling EmailToSmsApi.sms_email_sms_stripped_string_put"
|
324
|
+
end
|
325
|
+
# verify the required parameter 'rule_id' is set
|
326
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
327
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling EmailToSmsApi.sms_email_sms_stripped_string_put"
|
328
|
+
end
|
329
|
+
# resource path
|
330
|
+
local_var_path = '/sms/email-sms-stripped-strings/{rule_id}'.sub('{' + 'rule_id' + '}', rule_id.to_s)
|
331
|
+
|
332
|
+
# query parameters
|
333
|
+
query_params = {}
|
334
|
+
|
335
|
+
# header parameters
|
336
|
+
header_params = {}
|
337
|
+
# HTTP header 'Accept' (if needed)
|
338
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
339
|
+
# HTTP header 'Content-Type'
|
340
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
341
|
+
|
342
|
+
# form parameters
|
343
|
+
form_params = {}
|
344
|
+
|
345
|
+
# http body (model)
|
346
|
+
post_body = @api_client.object_to_http_body(stripped_string)
|
347
|
+
auth_names = ['BasicAuth']
|
348
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
349
|
+
:header_params => header_params,
|
350
|
+
:query_params => query_params,
|
351
|
+
:form_params => form_params,
|
352
|
+
:body => post_body,
|
353
|
+
:auth_names => auth_names,
|
354
|
+
:return_type => 'String')
|
355
|
+
if @api_client.config.debugging
|
356
|
+
@api_client.config.logger.debug "API called: EmailToSmsApi#sms_email_sms_stripped_string_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
357
|
+
end
|
358
|
+
return data, status_code, headers
|
359
|
+
end
|
360
|
+
# Get list of email to sms stripped string rules
|
361
|
+
# Get list of email to sms stripped string rules
|
362
|
+
# @param [Hash] opts the optional parameters
|
363
|
+
# @option opts [Integer] :page Page number (default to 1)
|
364
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
365
|
+
# @return [String]
|
366
|
+
def sms_email_sms_stripped_strings_get(opts = {})
|
367
|
+
data, _status_code, _headers = sms_email_sms_stripped_strings_get_with_http_info(opts)
|
368
|
+
data
|
369
|
+
end
|
370
|
+
|
371
|
+
# Get list of email to sms stripped string rules
|
372
|
+
# Get list of email to sms stripped string rules
|
373
|
+
# @param [Hash] opts the optional parameters
|
374
|
+
# @option opts [Integer] :page Page number
|
375
|
+
# @option opts [Integer] :limit Number of records per page
|
376
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
377
|
+
def sms_email_sms_stripped_strings_get_with_http_info(opts = {})
|
378
|
+
if @api_client.config.debugging
|
379
|
+
@api_client.config.logger.debug 'Calling API: EmailToSmsApi.sms_email_sms_stripped_strings_get ...'
|
380
|
+
end
|
381
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
382
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailToSmsApi.sms_email_sms_stripped_strings_get, must be greater than or equal to 1.'
|
383
|
+
end
|
384
|
+
|
385
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
386
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailToSmsApi.sms_email_sms_stripped_strings_get, must be greater than or equal to 1.'
|
387
|
+
end
|
388
|
+
|
389
|
+
# resource path
|
390
|
+
local_var_path = '/sms/email-sms-stripped-strings'
|
391
|
+
|
392
|
+
# query parameters
|
393
|
+
query_params = {}
|
394
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
395
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
396
|
+
|
397
|
+
# header parameters
|
398
|
+
header_params = {}
|
399
|
+
# HTTP header 'Accept' (if needed)
|
400
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
401
|
+
# HTTP header 'Content-Type'
|
402
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
403
|
+
|
404
|
+
# form parameters
|
405
|
+
form_params = {}
|
406
|
+
|
407
|
+
# http body (model)
|
408
|
+
post_body = nil
|
409
|
+
auth_names = ['BasicAuth']
|
410
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
411
|
+
:header_params => header_params,
|
412
|
+
:query_params => query_params,
|
413
|
+
:form_params => form_params,
|
414
|
+
:body => post_body,
|
415
|
+
:auth_names => auth_names,
|
416
|
+
:return_type => 'String')
|
417
|
+
if @api_client.config.debugging
|
418
|
+
@api_client.config.logger.debug "API called: EmailToSmsApi#sms_email_sms_stripped_strings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
419
|
+
end
|
420
|
+
return data, status_code, headers
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
@@ -0,0 +1,425 @@
|
|
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 FAXApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get a list of Fax History.
|
23
|
+
# Get a list of Fax History.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Integer] :date_from Customize result by setting from date (timestsamp) Example: 1457572619.
|
26
|
+
# @option opts [Integer] :date_to Customize result by setting to date (timestamp) Example: 1457573000.
|
27
|
+
# @option opts [String] :q Custom query Example: status:Sent,status_code:201.
|
28
|
+
# @option opts [String] :order Order result by Example: date_added:desc,list_id:desc.
|
29
|
+
# @option opts [Integer] :page Page number (default to 1)
|
30
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
31
|
+
# @return [String]
|
32
|
+
def fax_history_get(opts = {})
|
33
|
+
data, _status_code, _headers = fax_history_get_with_http_info(opts)
|
34
|
+
data
|
35
|
+
end
|
36
|
+
|
37
|
+
# Get a list of Fax History.
|
38
|
+
# Get a list of Fax History.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [Integer] :date_from Customize result by setting from date (timestsamp) Example: 1457572619.
|
41
|
+
# @option opts [Integer] :date_to Customize result by setting to date (timestamp) Example: 1457573000.
|
42
|
+
# @option opts [String] :q Custom query Example: status:Sent,status_code:201.
|
43
|
+
# @option opts [String] :order Order result by Example: date_added:desc,list_id:desc.
|
44
|
+
# @option opts [Integer] :page Page number
|
45
|
+
# @option opts [Integer] :limit Number of records per page
|
46
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
47
|
+
def fax_history_get_with_http_info(opts = {})
|
48
|
+
if @api_client.config.debugging
|
49
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_history_get ...'
|
50
|
+
end
|
51
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
52
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FAXApi.fax_history_get, must be greater than or equal to 1.'
|
53
|
+
end
|
54
|
+
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FAXApi.fax_history_get, must be greater than or equal to 1.'
|
57
|
+
end
|
58
|
+
|
59
|
+
# resource path
|
60
|
+
local_var_path = '/fax/history'
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = {}
|
64
|
+
query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
65
|
+
query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
66
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
67
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
68
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
69
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
70
|
+
|
71
|
+
# header parameters
|
72
|
+
header_params = {}
|
73
|
+
# HTTP header 'Accept' (if needed)
|
74
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
75
|
+
# HTTP header 'Content-Type'
|
76
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
77
|
+
|
78
|
+
# form parameters
|
79
|
+
form_params = {}
|
80
|
+
|
81
|
+
# http body (model)
|
82
|
+
post_body = nil
|
83
|
+
auth_names = ['BasicAuth']
|
84
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
85
|
+
:header_params => header_params,
|
86
|
+
:query_params => query_params,
|
87
|
+
:form_params => form_params,
|
88
|
+
:body => post_body,
|
89
|
+
:auth_names => auth_names,
|
90
|
+
:return_type => 'String')
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
|
+
end
|
94
|
+
return data, status_code, headers
|
95
|
+
end
|
96
|
+
# Calculate Total Price for Fax Messages sent
|
97
|
+
# Calculate Total Price for Fax Messages sent
|
98
|
+
# @param fax_message FaxMessageCollection model
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [String]
|
101
|
+
def fax_price_post(fax_message, opts = {})
|
102
|
+
data, _status_code, _headers = fax_price_post_with_http_info(fax_message, opts)
|
103
|
+
data
|
104
|
+
end
|
105
|
+
|
106
|
+
# Calculate Total Price for Fax Messages sent
|
107
|
+
# Calculate Total Price for Fax Messages sent
|
108
|
+
# @param fax_message FaxMessageCollection model
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
111
|
+
def fax_price_post_with_http_info(fax_message, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_price_post ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'fax_message' is set
|
116
|
+
if @api_client.config.client_side_validation && fax_message.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'fax_message' when calling FAXApi.fax_price_post"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/fax/price'
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = {}
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
+
# HTTP header 'Content-Type'
|
130
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
131
|
+
|
132
|
+
# form parameters
|
133
|
+
form_params = {}
|
134
|
+
|
135
|
+
# http body (model)
|
136
|
+
post_body = @api_client.object_to_http_body(fax_message)
|
137
|
+
auth_names = ['BasicAuth']
|
138
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
139
|
+
:header_params => header_params,
|
140
|
+
:query_params => query_params,
|
141
|
+
:form_params => form_params,
|
142
|
+
:body => post_body,
|
143
|
+
:auth_names => auth_names,
|
144
|
+
:return_type => 'String')
|
145
|
+
if @api_client.config.debugging
|
146
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
147
|
+
end
|
148
|
+
return data, status_code, headers
|
149
|
+
end
|
150
|
+
# Get a single fax receipt based on message id.
|
151
|
+
# Get a single fax receipt based on message id.
|
152
|
+
# @param message_id ID of the message receipt to retrieve
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @return [String]
|
155
|
+
def fax_receipts_by_message_id_get(message_id, opts = {})
|
156
|
+
data, _status_code, _headers = fax_receipts_by_message_id_get_with_http_info(message_id, opts)
|
157
|
+
data
|
158
|
+
end
|
159
|
+
|
160
|
+
# Get a single fax receipt based on message id.
|
161
|
+
# Get a single fax receipt based on message id.
|
162
|
+
# @param message_id ID of the message receipt to retrieve
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
165
|
+
def fax_receipts_by_message_id_get_with_http_info(message_id, opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_receipts_by_message_id_get ...'
|
168
|
+
end
|
169
|
+
# verify the required parameter 'message_id' is set
|
170
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
171
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling FAXApi.fax_receipts_by_message_id_get"
|
172
|
+
end
|
173
|
+
# resource path
|
174
|
+
local_var_path = '/fax/receipts/{message_id}'.sub('{' + 'message_id' + '}', message_id.to_s)
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = {}
|
178
|
+
|
179
|
+
# header parameters
|
180
|
+
header_params = {}
|
181
|
+
# HTTP header 'Accept' (if needed)
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
183
|
+
# HTTP header 'Content-Type'
|
184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = nil
|
191
|
+
auth_names = ['BasicAuth']
|
192
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => 'String')
|
199
|
+
if @api_client.config.debugging
|
200
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_receipts_by_message_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
201
|
+
end
|
202
|
+
return data, status_code, headers
|
203
|
+
end
|
204
|
+
# Get all delivery receipts
|
205
|
+
# Get all delivery receipts
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @option opts [Integer] :page Page number (default to 1)
|
208
|
+
# @option opts [Integer] :limit Number of records per page (default to 10)
|
209
|
+
# @return [String]
|
210
|
+
def fax_receipts_get(opts = {})
|
211
|
+
data, _status_code, _headers = fax_receipts_get_with_http_info(opts)
|
212
|
+
data
|
213
|
+
end
|
214
|
+
|
215
|
+
# Get all delivery receipts
|
216
|
+
# Get all delivery receipts
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @option opts [Integer] :page Page number
|
219
|
+
# @option opts [Integer] :limit Number of records per page
|
220
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
221
|
+
def fax_receipts_get_with_http_info(opts = {})
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_receipts_get ...'
|
224
|
+
end
|
225
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
226
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FAXApi.fax_receipts_get, must be greater than or equal to 1.'
|
227
|
+
end
|
228
|
+
|
229
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
230
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FAXApi.fax_receipts_get, must be greater than or equal to 1.'
|
231
|
+
end
|
232
|
+
|
233
|
+
# resource path
|
234
|
+
local_var_path = '/fax/receipts'
|
235
|
+
|
236
|
+
# query parameters
|
237
|
+
query_params = {}
|
238
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
239
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
240
|
+
|
241
|
+
# header parameters
|
242
|
+
header_params = {}
|
243
|
+
# HTTP header 'Accept' (if needed)
|
244
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
245
|
+
# HTTP header 'Content-Type'
|
246
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
247
|
+
|
248
|
+
# form parameters
|
249
|
+
form_params = {}
|
250
|
+
|
251
|
+
# http body (model)
|
252
|
+
post_body = nil
|
253
|
+
auth_names = ['BasicAuth']
|
254
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
255
|
+
:header_params => header_params,
|
256
|
+
:query_params => query_params,
|
257
|
+
:form_params => form_params,
|
258
|
+
:body => post_body,
|
259
|
+
:auth_names => auth_names,
|
260
|
+
:return_type => 'String')
|
261
|
+
if @api_client.config.debugging
|
262
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_receipts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
263
|
+
end
|
264
|
+
return data, status_code, headers
|
265
|
+
end
|
266
|
+
# Add a delivery receipt
|
267
|
+
# Add a delivery receipt
|
268
|
+
# @param url Url model
|
269
|
+
# @param [Hash] opts the optional parameters
|
270
|
+
# @return [String]
|
271
|
+
def fax_receipts_post(url, opts = {})
|
272
|
+
data, _status_code, _headers = fax_receipts_post_with_http_info(url, opts)
|
273
|
+
data
|
274
|
+
end
|
275
|
+
|
276
|
+
# Add a delivery receipt
|
277
|
+
# Add a delivery receipt
|
278
|
+
# @param url Url model
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
281
|
+
def fax_receipts_post_with_http_info(url, opts = {})
|
282
|
+
if @api_client.config.debugging
|
283
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_receipts_post ...'
|
284
|
+
end
|
285
|
+
# verify the required parameter 'url' is set
|
286
|
+
if @api_client.config.client_side_validation && url.nil?
|
287
|
+
fail ArgumentError, "Missing the required parameter 'url' when calling FAXApi.fax_receipts_post"
|
288
|
+
end
|
289
|
+
# resource path
|
290
|
+
local_var_path = '/fax/receipts'
|
291
|
+
|
292
|
+
# query parameters
|
293
|
+
query_params = {}
|
294
|
+
|
295
|
+
# header parameters
|
296
|
+
header_params = {}
|
297
|
+
# HTTP header 'Accept' (if needed)
|
298
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
299
|
+
# HTTP header 'Content-Type'
|
300
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
301
|
+
|
302
|
+
# form parameters
|
303
|
+
form_params = {}
|
304
|
+
|
305
|
+
# http body (model)
|
306
|
+
post_body = @api_client.object_to_http_body(url)
|
307
|
+
auth_names = ['BasicAuth']
|
308
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
309
|
+
:header_params => header_params,
|
310
|
+
:query_params => query_params,
|
311
|
+
:form_params => form_params,
|
312
|
+
:body => post_body,
|
313
|
+
:auth_names => auth_names,
|
314
|
+
:return_type => 'String')
|
315
|
+
if @api_client.config.debugging
|
316
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_receipts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
317
|
+
end
|
318
|
+
return data, status_code, headers
|
319
|
+
end
|
320
|
+
# Mark delivery receipts as read
|
321
|
+
# Mark delivery receipts as read
|
322
|
+
# @param [Hash] opts the optional parameters
|
323
|
+
# @option opts [DateBefore] :date_before DateBefore model
|
324
|
+
# @return [String]
|
325
|
+
def fax_receipts_read_put(opts = {})
|
326
|
+
data, _status_code, _headers = fax_receipts_read_put_with_http_info(opts)
|
327
|
+
data
|
328
|
+
end
|
329
|
+
|
330
|
+
# Mark delivery receipts as read
|
331
|
+
# Mark delivery receipts as read
|
332
|
+
# @param [Hash] opts the optional parameters
|
333
|
+
# @option opts [DateBefore] :date_before DateBefore model
|
334
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
335
|
+
def fax_receipts_read_put_with_http_info(opts = {})
|
336
|
+
if @api_client.config.debugging
|
337
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_receipts_read_put ...'
|
338
|
+
end
|
339
|
+
# resource path
|
340
|
+
local_var_path = '/fax/receipts-read'
|
341
|
+
|
342
|
+
# query parameters
|
343
|
+
query_params = {}
|
344
|
+
|
345
|
+
# header parameters
|
346
|
+
header_params = {}
|
347
|
+
# HTTP header 'Accept' (if needed)
|
348
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
349
|
+
# HTTP header 'Content-Type'
|
350
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
351
|
+
|
352
|
+
# form parameters
|
353
|
+
form_params = {}
|
354
|
+
|
355
|
+
# http body (model)
|
356
|
+
post_body = @api_client.object_to_http_body(opts[:'date_before'])
|
357
|
+
auth_names = ['BasicAuth']
|
358
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
359
|
+
:header_params => header_params,
|
360
|
+
:query_params => query_params,
|
361
|
+
:form_params => form_params,
|
362
|
+
:body => post_body,
|
363
|
+
:auth_names => auth_names,
|
364
|
+
:return_type => 'String')
|
365
|
+
if @api_client.config.debugging
|
366
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_receipts_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
367
|
+
end
|
368
|
+
return data, status_code, headers
|
369
|
+
end
|
370
|
+
# Send a fax using supplied supported file-types.
|
371
|
+
# Send a fax using supplied supported file-types.
|
372
|
+
# @param fax_message FaxMessageCollection model
|
373
|
+
# @param [Hash] opts the optional parameters
|
374
|
+
# @return [String]
|
375
|
+
def fax_send_post(fax_message, opts = {})
|
376
|
+
data, _status_code, _headers = fax_send_post_with_http_info(fax_message, opts)
|
377
|
+
data
|
378
|
+
end
|
379
|
+
|
380
|
+
# Send a fax using supplied supported file-types.
|
381
|
+
# Send a fax using supplied supported file-types.
|
382
|
+
# @param fax_message FaxMessageCollection model
|
383
|
+
# @param [Hash] opts the optional parameters
|
384
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
385
|
+
def fax_send_post_with_http_info(fax_message, opts = {})
|
386
|
+
if @api_client.config.debugging
|
387
|
+
@api_client.config.logger.debug 'Calling API: FAXApi.fax_send_post ...'
|
388
|
+
end
|
389
|
+
# verify the required parameter 'fax_message' is set
|
390
|
+
if @api_client.config.client_side_validation && fax_message.nil?
|
391
|
+
fail ArgumentError, "Missing the required parameter 'fax_message' when calling FAXApi.fax_send_post"
|
392
|
+
end
|
393
|
+
# resource path
|
394
|
+
local_var_path = '/fax/send'
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = {}
|
398
|
+
|
399
|
+
# header parameters
|
400
|
+
header_params = {}
|
401
|
+
# HTTP header 'Accept' (if needed)
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
403
|
+
# HTTP header 'Content-Type'
|
404
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
405
|
+
|
406
|
+
# form parameters
|
407
|
+
form_params = {}
|
408
|
+
|
409
|
+
# http body (model)
|
410
|
+
post_body = @api_client.object_to_http_body(fax_message)
|
411
|
+
auth_names = ['BasicAuth']
|
412
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
413
|
+
:header_params => header_params,
|
414
|
+
:query_params => query_params,
|
415
|
+
:form_params => form_params,
|
416
|
+
:body => post_body,
|
417
|
+
:auth_names => auth_names,
|
418
|
+
:return_type => 'String')
|
419
|
+
if @api_client.config.debugging
|
420
|
+
@api_client.config.logger.debug "API called: FAXApi#fax_send_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
421
|
+
end
|
422
|
+
return data, status_code, headers
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|