openapi: 3.0.0
info:
  title: Voice
  description: Everything about Voice Delivery Receipt Automations
servers:
  - url: https://rest.clicksend.com
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    pagination:
      type: object
      properties:
        total:
          type: integer
          description: The total number of items available for viewing.
          example: 2
        per_page:
          type: integer
          description: >-
            The number of items returned per page. This is specified in the
            limit parameter. You can have 100 items at maximum, and 15 at
            minimum.
          example: 15
        current_page:
          type: integer
          description: The current page number.
          example: 1
        last_page:
          type: integer
          description: The last page number.
          example: 1
        next_page_url:
          type: string
          nullable: true
          description: >-
            A URL of the next page. It will return **null** if there’s no next
            page.
          example: null
        prev_page_url:
          type: string
          nullable: true
          description: >-
            A URL of the previous page. It will return **null** if there’s no
            previous page.
          example: null
        from:
          type: integer
          description: The number of the first result in the current page.
          example: 1
        to:
          type: integer
          description: The number of the last result in the current page.
          example: 2
    voice_delivery_receipt_rule:
      type: object
      properties:
        receipt_rule_id:
          type: integer
          description: The ID of the receipt rule.
          example: 2
        rule_name:
          type: string
          description: The name of the receipt rule.
          example: My Rule 2
        match_type:
          type: integer
          description: The match type of the receipt rule.
          example: 3
        action:
          type: string
          description: The action of the receipt rule.
          example: URL
        action_address:
          type: string
          description: The action address of the receipt rule.
          example: http://yourdomain.com
        enabled:
          type: integer
          description: The enabled status of the receipt rule.
          example: 1
    view-voice-delivery-receipt-rules:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Your voice receipts.
        data:
          allOf:
            - $ref: '#/components/schemas/pagination'
            - type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/voice_delivery_receipt_rule'
    create-voice-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Your new voice receipt has been added.
        data:
          $ref: '#/components/schemas/voice_delivery_receipt_rule'
    view-voice-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Your rule incoming voice receipt.
        data:
          $ref: '#/components/schemas/voice_delivery_receipt_rule'
    update-voice-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Your rule incoming voice receipt.
        data:
          $ref: '#/components/schemas/voice_delivery_receipt_rule'
    delete-voice-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Your rule voice receipt has been deleted.
        data:
          type: array
          items: []
          example: []
paths:
  /v3/automations/voice/receipts:
    get:
      summary: View Voice Delivery Receipt Rules
      operationId: view-voice-delivery-receipt-rules
      description: >-
        _Get all voice delivery receipt automations_


        Get all voice delivery receipt automations


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | page | query | integer(int32) | false | Page number |

        | limit | query | integer(int32) | false | Number of records per page |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-voice-delivery-receipt-rules'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
            'https://rest.clicksend.com/v3/automations/voice/receipts'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\VoiceDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $q = "q_example"; // string | Your keyword or query.

            $page = 1; // int | Page number

            $limit = 10; // int | Number of records per page


            try {
                $result = $apiInstance->voiceDeliveryReceiptAutomationsGet($q, $page, $limit);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling VoiceDeliveryReceiptRulesApi->voiceDeliveryReceiptAutomationsGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var voiceDeliveryReceiptRulesApi = new
            VoiceDeliveryReceiptRulesApi(configuration);

            var response =
            voiceDeliveryReceiptRulesApi.VoiceDeliveryReceiptAutomationsGet();
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.VoiceDeliveryReceiptRulesApi;

            public class view_all_voice_delivery_receipt_rule {
                public static void main(String[] args) {
                  ApiClient defaultClient = new ApiClient();
                  defaultClient.setUsername("USERNAME");
                  defaultClient.setPassword("API_KEY");
                  VoiceDeliveryReceiptRulesApi apiInstance = new VoiceDeliveryReceiptRulesApi(defaultClient);
                  String q = "q_example"; // String | Your keyword or query.
                  Integer page = 1; // Integer | Page number
                  Integer limit = 10; // Integer | Number of records per page
                  try {
                    String result = apiInstance.voiceDeliveryReceiptAutomationsGet(q, page, limit);
                      System.out.println(result);
                  } catch (ApiException e) {
                      System.err.println("Exception when calling VoiceDeliveryReceiptRulesApi#voiceDeliveryReceiptAutomationsGet");
                      e.printStackTrace();
                  }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var voiceDeliveryReceiptApi = new
            api.VoiceDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var page = 1;

            var limit = 10;


            voiceDeliveryReceiptApi.voiceDeliveryReceiptAutomationsGet(page,
            limit).then(function(response) {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::VoiceDeliveryReceiptRulesApi.new

            opts = {
              page: 1,  # Integer | Page number
              limit: 10 # Integer | Number of records per page
            }

            begin
              # Get all voice delivery receipt automations
              result = api_instance.voice_delivery_receipt_automations_get(opts)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automations_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.VoiceDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            page = 1 # int | Page number (optional) (default to 1)

            limit = 10 # int | Number of records per page (optional) (default to
            10)


            try:
                # Get all voice delivery receipt automations
                api_response = api_instance.voice_delivery_receipt_automations_get(page=page, limit=limit)
                print(api_response)
            except ApiException as e:
                print("Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automations_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->voice_delivery_receipt_automations_get('page' => '1', 'limit'
            => '10');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSVoiceDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *page = [[NSNumber alloc] initWithInt:1];

            NSNumber *limit = [[NSNumber alloc] initWithInt:15];


            CSVoiceDeliveryReceiptRulesApi *voiceDeliveryReceiptRulesApiInstance
            =[[CSVoiceDeliveryReceiptRulesApi alloc] init];

            [voiceDeliveryReceiptRulesApiInstance
            voiceDeliveryReceiptAutomationsGetWithQ:@"string" page:page
            limit:limit completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            VoiceDeliveryReceiptRulesAPI.voiceDeliveryReceiptAutomationsGet {
            (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
    post:
      summary: Create Voice Delivery Receipt Rule
      operationId: create-voice-delivery-receipt-rule
      description: >-
        _Create voice delivery receipt automations_


        Create voice delivery receipt automations


        ### Properties


        | Name | Type | Required | Restrictions | Description |

        | --- | --- | --- | --- | --- |

        | rule_name | string | true | none | Rule Name. |

        | match_type | number | true | none | Match Type. 0=All reports. |

        | action | string | true | none | Action to be taken (AUTO_REPLY,
        EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT,
        CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL,
        CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). |

        | action_address | string | true | none | Action address. |

        | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.


        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rule_name:
                  type: string
                match_type:
                  type: integer
                action:
                  type: string
                action_address:
                  type: string
                enabled:
                  type: integer
              example:
                rule_name: test
                match_type: 1
                action: URL
                action_address: http://test.com
                enabled: 1
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-voice-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request POST \
                 --header "Content-Type: application/json" \
                 --data-binary "{
                \"rule_name\":\"My Rule\",
                \"match_type\":3,
                \"action\":\"EMAIL_FIXED\",
                \"action_address\":\"john@doe.com\",
                \"enabled\":1
            }" \
            'https://rest.clicksend.com/v3/automations/voice/receipts'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\VoiceDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            // \ClickSend\Model\DeliveryReceiptRule | voice delivery receipt
            rule model

            $delivery_receipt_rule = new
            \ClickSend\Model\DeliveryReceiptRule(); 

            $delivery_receipt_rule->setRuleName("my rule");

            $delivery_receipt_rule->setMatchType(0);

            $delivery_receipt_rule->setAction("URL");

            $delivery_receipt_rule->setActionAddress("http://example.com");

            $delivery_receipt_rule->setEnabled(1);


            try {
                $result = $apiInstance->voiceDeliveryReceiptAutomationPost($delivery_receipt_rule);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling VoiceDeliveryReceiptRulesApi->voiceDeliveryReceiptAutomationPost: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var voiceDeliveryReceiptRulesApi = new
            VoiceDeliveryReceiptRulesApi(configuration);

            var response =
            voiceDeliveryReceiptRulesApi.VoiceDeliveryReceiptAutomationPost(new
            DeliveryReceiptRule(
                ruleName: "Rule Name",
                matchType: 1,
                action: "URL",
                actionAddress: "https://yourdomain.com",
                enabled: 1
            ));
        - lang: Java
          source: |-
            package ClickSend;

            import java.math.BigDecimal;
            import ClickSend.ApiClient;
            import ClickSend.ApiException;
            import ClickSend.Api.VoiceDeliveryReceiptRulesApi;
            import ClickSend.Model.DeliveryReceiptRule;

            public class create_voice_delivery_receipt_rule{
                public static void main(String[] args) {
                  ApiClient defaultClient = new ApiClient();
                  defaultClient.setUsername("USERNAME");
                  defaultClient.setPassword("API_KEY");
                  VoiceDeliveryReceiptRulesApi apiInstance = new VoiceDeliveryReceiptRulesApi(defaultClient);
                  // DeliveryReceiptRule | voice delivery receipt rule model
                  DeliveryReceiptRule deliveryReceiptRule = new DeliveryReceiptRule();
                  deliveryReceiptRule.ruleName("new rule");
                  deliveryReceiptRule.matchType(new BigDecimal(1.25));
                  deliveryReceiptRule.action("EMAIL_FIXED");
                  deliveryReceiptRule.actionAddress("xxx@gmail.com");
                  deliveryReceiptRule.enabled(new BigDecimal(1));
                  try {
                      String result = apiInstance.voiceDeliveryReceiptAutomationPost(deliveryReceiptRule);
                      System.out.println(result);
                  } catch (ApiException e) {
                      System.err.println("Exception when calling VoiceDeliveryReceiptRulesApi#voiceDeliveryReceiptAutomationPost");
                      e.printStackTrace();
                  }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var voiceDeliveryReceiptApi = new
            api.VoiceDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var deliveryReceiptRule = new api.DeliveryReceiptRule();


            deliveryReceiptRule.ruleName = "My rule";

            deliveryReceiptRule.matchType = 1;

            deliveryReceiptRule.action = "EMAIL_FIXED";

            deliveryReceiptRule.actionAddress = "john@doe.com";

            deliveryReceiptRule.enabled = 1;


            voiceDeliveryReceiptApi.voiceDeliveryReceiptAutomationPost(deliveryReceiptRule).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::VoiceDeliveryReceiptRulesApi.new

            # DeliveryReceiptRule | fax delivery receipt rule model
            delivery_receipt_rule = ClickSendClient::DeliveryReceiptRule.new(
              "rule_name": "rule_name",
              "match_type": 1,
              "action": "URL",
              "action_address": "action_address",
              "enabled": 1
            )

            begin
              # Create voice delivery receipt automations
              result = api_instance.voice_delivery_receipt_automation_post(delivery_receipt_rule)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_post: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.VoiceDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            # DeliveryReceiptRule | voice delivery receipt rule model

            delivery_receipt_rule = clicksend_client.DeliveryReceiptRule(
                                  rule_name='My Rule',
                                  match_type=1.1,
                                  action='EMAIL_FIXED',
                                  action_address='john@doe.com',
                                  enabled=1) 

            try:
                # Create voice delivery receipt automations
                api_response = api_instance.voice_delivery_receipt_automation_post(delivery_receipt_rule)
                print(api_response)
            except ApiException as e:
                print("Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_post: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi;

            use WWW::ClickSendClient::Object::DeliveryReceiptRule;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my %params = (
                'rule_name'      => 'rule_name',
                'match_type'     => '1',
                'action'         => 'EMAIL_FIXED',
                'action_address' => 'test1@test.com',
                'enabled'        => '1'
            );


            my $devlivery_rule_obj =
            WWW::ClickSendClient::Object::DeliveryReceiptRule->new(%params);


            my $json_output =
            $api->voice_delivery_receipt_automation_post('delivery_receipt_rule'
            => $devlivery_rule_obj);


            print $json_output;
        - lang: objc
          source: >-
            #import "CSVoiceDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            CSDeliveryReceiptRule *deliveryReceiptRule = [[CSDeliveryReceiptRule
            alloc] init];

            deliveryReceiptRule.ruleName = @"string";

            deliveryReceiptRule.matchType =0;

            deliveryReceiptRule.action = @"string";

            deliveryReceiptRule.actionAddress = @"string";

            deliveryReceiptRule.enabled =0;


            CSVoiceDeliveryReceiptRulesApi *voiceDeliveryReceiptRulesApiInstance
            =[[CSVoiceDeliveryReceiptRulesApi alloc] init];

            [voiceDeliveryReceiptRulesApiInstance
            voiceDeliveryReceiptAutomationPostWithDeliveryReceiptRule:deliveryReceiptRule
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            let deliveryReceiptRule = DeliveryReceiptRule(ruleName: "ruleName",
                                                          matchType: 1,
                                                          action: "action",
                                                          actionAddress: "actionAddress",
                                                          enabled: 1)

            VoiceDeliveryReceiptRulesAPI.voiceDeliveryReceiptAutomationPost(deliveryReceiptRule:
            deliveryReceiptRule) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
  /v3/automations/voice/receipts/{receipt_rule_id}:
    get:
      summary: View Voice Delivery Receipt Rule
      operationId: view-voice-delivery-receipt-rule
      description: >-
        _Get specific voice delivery receipt automation_


        Get specific voice delivery receipt automation


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | receipt_rule_id | path | integer(int32) | true | Receipt rule id |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: receipt_rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-voice-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: >-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
            'https://rest.clicksend.com/v3/automations/voice/receipts/{receipt_rule_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\VoiceDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $receipt_rule_id = 4486; // int | Receipt rule id


            try {
                $result = $apiInstance->voiceDeliveryReceiptAutomationGet($receipt_rule_id);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling VoiceDeliveryReceiptRulesApi->voiceDeliveryReceiptAutomationGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var voiceDeliveryReceiptRulesApi = new
            VoiceDeliveryReceiptRulesApi(configuration);

            var response =
            voiceDeliveryReceiptRulesApi.VoiceDeliveryReceiptAutomationGet(RULE_ID);
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.VoiceDeliveryReceiptRulesApi;

            public class view_specific_voice_delivery_receipt_rule {
                public static void main(String[] args) {
                  ApiClient defaultClient = new ApiClient();
                  defaultClient.setUsername("USERNAME");
                  defaultClient.setPassword("API_KEY");
                  VoiceDeliveryReceiptRulesApi apiInstance = new VoiceDeliveryReceiptRulesApi(defaultClient);
                  Integer receiptRuleId = 4471; // Integer | Receipt rule id
                  try {
                      String result = apiInstance.voiceDeliveryReceiptAutomationGet(receiptRuleId);
                      System.out.println(result);
                  } catch (ApiException e) {
                      System.err.println("Exception when calling VoiceDeliveryReceiptRulesApi#voiceDeliveryReceiptAutomationGet");
                      e.printStackTrace();
                  }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var voiceDeliveryReceiptApi = new
            api.VoiceDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var receiptRuleId = 4481;


            voiceDeliveryReceiptApi.voiceDeliveryReceiptAutomationGet(receiptRuleId).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::VoiceDeliveryReceiptRulesApi.new

            receipt_rule_id = 56 # Integer | Receipt rule id

            begin
              # Get specific voice delivery receipt automation
              result = api_instance.voice_delivery_receipt_automation_get(receipt_rule_id)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.VoiceDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            receipt_rule_id = 4465 # int | Receipt rule id


            try:
                # Get specific voice delivery receipt automation
                api_response = api_instance.voice_delivery_receipt_automation_get(receipt_rule_id)
                print(api_response)
            except ApiException as e:
                print("Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->voice_delivery_receipt_automation_get('receipt_rule_id' =>
            '12345');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSVoiceDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *receiptRuleId = [[NSNumber alloc] initWithInt:1];

            CSVoiceDeliveryReceiptRulesApi *voiceDeliveryReceiptRulesApiInstance
            =[[CSVoiceDeliveryReceiptRulesApi alloc] init];

            [voiceDeliveryReceiptRulesApiInstance
            voiceDeliveryReceiptAutomationGetWithReceiptRuleId:receiptRuleId
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            VoiceDeliveryReceiptRulesAPI.voiceDeliveryReceiptAutomationGet(receiptRuleId:
            1) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
    put:
      summary: Update Voice Delivery Receipt Rule
      operationId: update-voice-delivery-receipt-rule
      description: >-
        _Update voice delivery receipt automation_


        Update voice delivery receipt automation


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | receipt_rule_id | path | integer(int32) | true | Receipt rule id |


        ### Properties


        | Name | Type | Required | Restrictions | Description |

        | --- | --- | --- | --- | --- |

        | rule_name | string | true | none | Rule Name. |

        | match_type | number | true | none | Match Type. 0=All reports. |

        | action | string | true | none | Action to be taken (AUTO_REPLY,
        EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT,
        CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL,
        CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). |

        | action_address | string | true | none | Action address. |

        | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rule_name:
                  type: string
                match_type:
                  type: integer
                action:
                  type: string
                action_address:
                  type: string
                enabled:
                  type: integer
              example:
                rule_name: test
                match_type: 1
                action: URL
                action_address: http://test.com
                enabled: 1
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: receipt_rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-voice-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: >-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request PUT \
                 --header "Content-Type: application/json" \
                 --data-binary "{
                \"rule_name\":\"My Rule\",
                \"match_type\":3,
                \"action\":\"EMAIL_FIXED\",
                \"action_address\":\"john@doe.com\",
                \"enabled\":1
            }" \

            'https://rest.clicksend.com/v3/automations/voice/receipts/{receipt_rule_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\VoiceDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $receipt_rule_id = 4486; // int | Receipt rule id

            // \ClickSend\Model\DeliveryReceiptRule | Delivery receipt rule
            model

            $delivery_receipt_rule = new
            \ClickSend\Model\DeliveryReceiptRule(); 

            $delivery_receipt_rule->setRuleName("my rule");

            $delivery_receipt_rule->setMatchType(0);

            $delivery_receipt_rule->setAction("URL");

            $delivery_receipt_rule->setActionAddress("http://example.com");

            $delivery_receipt_rule->setEnabled(1);


            try {
                $result = $apiInstance->voiceDeliveryReceiptAutomationPut($receipt_rule_id, $delivery_receipt_rule);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling VoiceDeliveryReceiptRulesApi->voiceDeliveryReceiptAutomationPut: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var voiceDeliveryReceiptRulesApi = new
            VoiceDeliveryReceiptRulesApi(configuration);

            var response =
            voiceDeliveryReceiptRulesApi.VoiceDeliveryReceiptAutomationPut(RULE_ID,
            new DeliveryReceiptRule(
                ruleName: "Rule Name",
                matchType: 1,
                action: "URL",
                actionAddress: "https://yourdomain.com",
                enabled: 1
            ));
        - lang: Java
          source: |
            package ClickSend;

            import java.math.BigDecimal;
            import ClickSend.Api.VoiceDeliveryReceiptRulesApi;
            import ClickSend.Model.DeliveryReceiptRule;

            public class update_voice_delivery_receipt_rule {
               public static void main(String[] args) {
                  ApiClient defaultClient = new ApiClient();
                  defaultClient.setUsername("USERNAME");
                  defaultClient.setPassword("API_KEY");
                  VoiceDeliveryReceiptRulesApi apiInstance = new VoiceDeliveryReceiptRulesApi(defaultClient);
                  Integer receiptRuleId = 4476; // Integer | Receipt rule id
                  DeliveryReceiptRule deliveryReceiptRule = new DeliveryReceiptRule(); // DeliveryReceiptRule | Delivery receipt rule model
                  deliveryReceiptRule.ruleName("new rule");
                  deliveryReceiptRule.matchType(new BigDecimal(1.25));
                  deliveryReceiptRule.action("EMAIL_FIXED");
                  deliveryReceiptRule.actionAddress("xxx@gmail.com");
                  deliveryReceiptRule.enabled(new BigDecimal(1));
                   try {
                      String result = apiInstance.voiceDeliveryReceiptAutomationPut(receiptRuleId, deliveryReceiptRule);
                      System.out.println(result);
                  } catch (ApiException e) {
                      System.err.println("Exception when calling VoiceDeliveryReceiptRulesApi#voiceDeliveryReceiptAutomationPut");
                      e.printStackTrace();
                  }
               }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var voiceDeliveryReceiptApi = new
            api.VoiceDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var receiptRuleId = 4481;


            var deliveryReceiptRule = new api.DeliveryReceiptRule();


            deliveryReceiptRule.ruleName = "My rule";

            deliveryReceiptRule.matchType = 1;

            deliveryReceiptRule.action = "EMAIL_FIXED";

            deliveryReceiptRule.actionAddress = "john@doe.com";

            deliveryReceiptRule.enabled = 1;


            voiceDeliveryReceiptApi.voiceDeliveryReceiptAutomationPut(receiptRuleId,
            deliveryReceiptRule).then(function(response) {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::VoiceDeliveryReceiptRulesApi.new

            receipt_rule_id = 56 # Integer | Receipt rule id

            # DeliveryReceiptRule | fax delivery receipt rule model
            delivery_receipt_rule = ClickSendClient::DeliveryReceiptRule.new(
              "rule_name": "rule_name",
              "match_type": 1234,
              "action": "action",
              "action_address": "action_address",
              "enabled": 1
            )

            begin
              # Update voice delivery receipt automation
              result = api_instance.voice_delivery_receipt_automation_put(receipt_rule_id, delivery_receipt_rule)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_put: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.VoiceDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            receipt_rule_id = 4465 # int | Receipt rule id

            # DeliveryReceiptRule | Delivery receipt rule model

            delivery_receipt_rule = clicksend_client.DeliveryReceiptRule(
                                    rule_name='updated Rule',
                                    match_type=1.5,
                                    action='EMAIL_FIXED',
                                    action_address='abc_new@doe.com',
                                    enabled=1) 

            try:
                # Update voice delivery receipt automation
                api_response = api_instance.voice_delivery_receipt_automation_put(receipt_rule_id, delivery_receipt_rule)
                print(api_response)
            except ApiException as e:
                print("Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_put: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi;

            use WWW::ClickSendClient::Object::DeliveryReceiptRule;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my %params = (
                'rule_name'      => 'rule_name_updated',
                'match_type'     => '1',
                'action'         => 'EMAIL_FIXED',
                'action_address' => 'test1@test.com',
                'enabled'        => '1'

            );


            my $devlivery_rule_obj =
            WWW::ClickSendClient::Object::DeliveryReceiptRule->new(%params);


            my $json_output = $api->voice_delivery_receipt_automation_put(
            'delivery_receipt_rule' => $devlivery_rule_obj ,'receipt_rule_id' =>
            '12345');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSVoiceDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *receiptId = [[NSNumber alloc] initWithInt:1];

            CSDeliveryReceiptRule *deliveryReceiptRule = [[CSDeliveryReceiptRule
            alloc] init];

            deliveryReceiptRule.ruleName = @"string";

            deliveryReceiptRule.matchType =0;

            deliveryReceiptRule.action = @"action";

            deliveryReceiptRule.actionAddress = @"action_address";

            deliveryReceiptRule.enabled =0;


            CSVoiceDeliveryReceiptRulesApi *voiceDeliveryReceiptRulesApiInstance
            =[[CSVoiceDeliveryReceiptRulesApi alloc] init];

            [voiceDeliveryReceiptRulesApiInstance
            voiceDeliveryReceiptAutomationPutWithReceiptRuleId:receiptId 
            deliveryReceiptRule:deliveryReceiptRule completionHandler:^(NSString
            *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }
                      let deliveryReceiptRule = DeliveryReceiptRule(ruleName: "ruleName",
                                                                    matchType: 1,
                                                                    action: "action",
                                                                    actionAddress: "actionAddress",
                                                                    enabled: 1)

            VoiceDeliveryReceiptRulesAPI.voiceDeliveryReceiptAutomationPut(receiptRuleId:
            1, deliveryReceiptRule: deliveryReceiptRule) { (dataString, error)
            in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
    delete:
      summary: Delete Voice Delivery Receipt Rule
      operationId: delete-voice-delivery-receipt-rule
      description: >-
        _Delete voice delivery receipt automation_


        Delete voice delivery receipt automation


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | receipt_rule_id | path | integer(int32) | true | Receipt rule id |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: receipt_rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-voice-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: >-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request DELETE \
            'https://rest.clicksend.com/v3/automations/voice/receipts/{receipt_rule_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\VoiceDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $receipt_rule_id = 4486; // int | Receipt rule id


            try {
                $result = $apiInstance->voiceDeliveryReceiptAutomationDelete($receipt_rule_id);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling VoiceDeliveryReceiptRulesApi->voiceDeliveryReceiptAutomationDelete: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var voiceDeliveryReceiptRulesApi = new
            VoiceDeliveryReceiptRulesApi(configuration);

            var response =
            voiceDeliveryReceiptRulesApi.VoiceDeliveryReceiptAutomationDelete(RULE_ID);
        - lang: Java
          source: |
            package ClickSend;

            import ClickSend.Api.VoiceDeliveryReceiptRulesApi;

            public class delete_voice_delivery_receipt_rule {
               public static void main(String[] args) {
                  ApiClient defaultClient = new ApiClient();
                  defaultClient.setUsername("USERNAME");
                  defaultClient.setPassword("API_KEY");
                  VoiceDeliveryReceiptRulesApi apiInstance = new VoiceDeliveryReceiptRulesApi(defaultClient);
                  Integer receiptRuleId = 4466; // Integer | Receipt rule id
                  try {
                      String result = apiInstance.voiceDeliveryReceiptAutomationDelete(receiptRuleId);
                      System.out.println(result);
                  } catch (ApiException e) {
                      System.err.println("Exception when calling VoiceDeliveryReceiptRulesApi#voiceDeliveryReceiptAutomationDelete");
                      e.printStackTrace();
                  }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var voiceDeliveryReceiptApi = new
            api.VoiceDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var receiptRuleId = 4481;


            voiceDeliveryReceiptApi.voiceDeliveryReceiptAutomationDelete(receiptRuleId).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::VoiceDeliveryReceiptRulesApi.new

            receipt_rule_id = 56 # Integer | Receipt rule id

            begin
              # Delete voice delivery receipt automation
              result = api_instance.voice_delivery_receipt_automation_delete(receipt_rule_id)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_delete: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.VoiceDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            receipt_rule_id = 4465 # int | Receipt rule id


            try:
                # Delete voice delivery receipt automation
                api_response = api_instance.voice_delivery_receipt_automation_delete(receipt_rule_id)
                print(api_response)
            except ApiException as e:
                print("Exception when calling VoiceDeliveryReceiptRulesApi->voice_delivery_receipt_automation_delete: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::VoiceDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->voice_delivery_receipt_automation_delete('receipt_rule_id' =>
            '12345');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSVoiceDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *receiptRuleId = [[NSNumber alloc] initWithInt:1];

            CSVoiceDeliveryReceiptRulesApi *voiceDeliveryReceiptRulesApiInstance
            =[[CSVoiceDeliveryReceiptRulesApi alloc] init];

            [voiceDeliveryReceiptRulesApiInstance
            voiceDeliveryReceiptAutomationDeleteWithReceiptRuleId:receiptRuleId
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            VoiceDeliveryReceiptRulesAPI.voiceDeliveryReceiptAutomationDelete(receiptRuleId:
            1) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
