def get_template_roles(signers)
      template_roles = []
      signers.each_with_index do |signer, index|
        template_role = {
          name:     signer[:name],
          email:    signer[:email],
          roleName: signer[:role_name],
          tabs: {
            textTabs:     get_signer_tabs(signer[:text_tabs]),
            checkboxTabs: get_signer_tabs(signer[:checkbox_tabs]),
            numberTabs:   get_signer_tabs(signer[:number_tabs]),
            radioGroupTabs: get_radio_signer_tabs(signer[:radio_group_tabs]),
            fullNameTabs: get_signer_tabs(signer[:fullname_tabs]),
            dateTabs:     get_signer_tabs(signer[:date_tabs])
          }
        }

        if signer[:email_notification]
          template_role[:emailNotification] = signer[:email_notification]
        end

        template_role['clientUserId'] = (signer[:client_id] || signer[:email]).to_s if signer[:embedded] == true
        template_roles << template_role
      end
      template_roles
    end
def get_template_roles(signers)
      template_roles = []
      signers.each_with_index do |signer, index|
        template_role = {
          name:     signer[:name],
          email:    signer[:email],
          roleName: signer[:role_name],
          tabs: {
            textTabs:     get_signer_tabs(signer[:text_tabs]),
            checkboxTabs: get_signer_tabs(signer[:checkbox_tabs]),
            numberTabs:   get_signer_tabs(signer[:number_tabs]),
            radioGroupTabs: get_radio_signer_tabs(signer[:radio_group_tabs]),
            fullNameTabs: get_signer_tabs(signer[:fullname_tabs]),
            dateTabs:     get_signer_tabs(signer[:date_tabs])
          }
        }

        if signer[:email_notification]
          template_role[:emailNotification] = signer[:email_notification]
        end

        template_role['clientUserId'] = (signer[:client_id] || signer[:email]).to_s if signer[:embedded] == true
        template_roles << template_role
      end
      template_roles
    end
Internal: takes in an array of hashes of signers and concatenates all the
 hashes with commas

 embedded -  Tells DocuSign if this is an embedded signer which determines
             whether or not to deliver emails. Also lets us authenticate
             them when they go to do embedded signing. Behind the scenes
             this is setting the clientUserId value to the signer's email.
 name      - The name of the signer
 email     - The email of the signer
 role_name - The role name of the signer ('Attorney', 'Client', etc.).
 tabs      - Array of tab pairs grouped by type (Example type: 'textTabs')
             { textTabs: [ { tabLabel: "label", name: "name", value: "value" } ] }

 Returns a hash of users that need to be embedded in the template to
 create an envelope