def add_recipient_tabs(options={})
      content_type = {'Content-Type' => 'application/json'}
      content_type.merge(options[:headers]) if options[:headers]

      uri = build_uri("/accounts/#{@acct_id}/envelopes/#{options[:envelope_id]}/recipients/#{options[:recipient_id]}/tabs")
      tabs = options[:tabs]
      index = options[:recipient_id] -  1

      post_body = {
        approveTabs:          nil,
        checkboxTabs:         nil,
        companyTabs:          nil,
        dateSignedTabs:       get_tabs(tabs[:date_signed_tabs], options, index),
        dateTabs:             nil,
        declineTabs:          nil,
        emailTabs:            nil,
        envelopeIdTabs:       nil,
        fullNameTabs:         nil,
        listTabs:             nil,
        noteTabs:             nil,
        numberTabs:           nil,
        radioGroupTabs:       nil,
        initialHereTabs:      get_tabs(tabs[:initial_here_tabs], options.merge!(initial_here_tab: true), index),
        signHereTabs:         get_tabs(tabs[:sign_here_tabs], options.merge!(sign_here_tab: true), index),
        signerAttachmentTabs: nil,
        ssnTabs:              nil,
        textTabs:             get_tabs(tabs[:text_tabs], options, index),
        titleTabs:            nil,
        zipTabs:              nil
      }.to_json

      http = initialize_net_http_ssl(uri)
      request = Net::HTTP::Post.new(uri.request_uri, headers(content_type))
      request.body = post_body

      response = http.request(request)
      generate_log(request, response, uri)
      JSON.parse(response.body)
    end
def add_recipient_tabs(options={})
      content_type = {'Content-Type' => 'application/json'}
      content_type.merge(options[:headers]) if options[:headers]

      uri = build_uri("/accounts/#{@acct_id}/envelopes/#{options[:envelope_id]}/recipients/#{options[:recipient_id]}/tabs")
      tabs = options[:tabs]
      index = options[:recipient_id] -  1

      post_body = {
        approveTabs:          nil,
        checkboxTabs:         nil,
        companyTabs:          nil,
        dateSignedTabs:       get_tabs(tabs[:date_signed_tabs], options, index),
        dateTabs:             nil,
        declineTabs:          nil,
        emailTabs:            nil,
        envelopeIdTabs:       nil,
        fullNameTabs:         nil,
        listTabs:             nil,
        noteTabs:             nil,
        numberTabs:           nil,
        radioGroupTabs:       nil,
        initialHereTabs:      get_tabs(tabs[:initial_here_tabs], options.merge!(initial_here_tab: true), index),
        signHereTabs:         get_tabs(tabs[:sign_here_tabs], options.merge!(sign_here_tab: true), index),
        signerAttachmentTabs: nil,
        ssnTabs:              nil,
        textTabs:             get_tabs(tabs[:text_tabs], options, index),
        titleTabs:            nil,
        zipTabs:              nil
      }.to_json

      http = initialize_net_http_ssl(uri)
      request = Net::HTTP::Post.new(uri.request_uri, headers(content_type))
      request.body = post_body

      response = http.request(request)
      generate_log(request, response, uri)
      JSON.parse(response.body)
    end
Public adds recipient tabs to a given envelope
 See https://docs.docusign.com/esign/restapi/Envelopes/EnvelopeRecipients/update/

 envelope_id  - ID of the envelope from which the doc will be added
 recipient - ID of the recipient to add tabs to
 tabs - hash of tab (see example below)
 {
   signHereTabs: [
     {
       anchorString: '/s1/',
       anchorXOffset: '5',
       anchorYOffset: '8',
       anchorIgnoreIfNotPresent: 'true',
       documentId: '1',
       pageNumber: '1',
       recipientId: '1'
     }
   ],
   initialHereTabs: [
     {
       anchorString: '/i1/',
       anchorXOffset: '5',
       anchorYOffset: '8',
       anchorIgnoreIfNotPresent: 'true',
       documentId: '1',
       pageNumber: '1',
       recipientId: '1'
     }
   ]
 }

 The response returns the success or failure of each document being added
 to the envelope and the envelope ID. Failed operations on array elements
 will add the "errorDetails" structure containing an error code and message.
 If "errorDetails" is null, then the operation was successful for that item.