def create_credit_notes(credit_notes)
      b = Builder::XmlMarkup.new
      request_xml = b.CreditNotes {
        credit_notes.each do | credit_note |
          credit_note.to_xml(b)
        end
      }

      response_xml = http_put(@client, "#{@xero_url}/CreditNotes", request_xml, {})

      response = parse_response(response_xml, {:request_xml => request_xml}, {:request_signature => 'PUT/credit_notes'})
      response.credit_notes.each_with_index do | response_credit_note, index |
        credit_notes[index].credit_note_id = response_credit_note.credit_note_id if response_credit_note && response_credit_note.credit_note_id
      end
      response
    end
def create_credit_notes(credit_notes)
      b = Builder::XmlMarkup.new
      request_xml = b.CreditNotes {
        credit_notes.each do | credit_note |
          credit_note.to_xml(b)
        end
      }

      response_xml = http_put(@client, "#{@xero_url}/CreditNotes", request_xml, {})

      response = parse_response(response_xml, {:request_xml => request_xml}, {:request_signature => 'PUT/credit_notes'})
      response.credit_notes.each_with_index do | response_credit_note, index |
        credit_notes[index].credit_note_id = response_credit_note.credit_note_id if response_credit_note && response_credit_note.credit_note_id
      end
      response
    end
Creates an array of credit_notes with a single API request.

 Usage :
  credit_notes = [XeroGateway::CreditNote.new(...), XeroGateway::CreditNote.new(...)]
  result = gateway.create_credit_notes(credit_notes)