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)
191722
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
887465
def get_all_credit_notes(self, params=None):
        
        if not params:
            params = {}
        return self._iterate_through_pages(self.get_credit_notes_per_page, resource=CREDIT_NOTES, **{'params': params})
1355829
def create(cls, uri, tlp_level=0, tags=[]):
        
        return cls._create(uri=uri, tlp_level=tlp_level, tags=tags)
833986
def create_consumer
      creds = generate_credentials
      Consumer.new(creds[0], creds[1],
        {
          :site               => base_url,
          :request_token_path => request_token_path,
          :authorize_path     => authorize_path,
          :access_token_path  => access_token_path
        })
    end
1024323
def create(self, unique_name=values.unset, data=values.unset):
        
        data = values.of({'UniqueName': unique_name, 'Data': serialize.object(data), })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], )
470701
def list_notes(self, page=0, since=None):
        
        from highton.models.note import Note
        params = {'n': int(page) * self.NOTES_OFFSET}
        if since:
            params['since'] = since.strftime(self.COLLECTION_DATETIME)

        return fields.ListField(
            name=self.ENDPOINT,
            init_class=Note
        ).decode(
            self.element_from_string(
                self._get_request(
                    endpoint=self.ENDPOINT + '/' + str(self.id) + '/' + Note.ENDPOINT,
                    params=params
                ).text
            )
        )
599259
def add_note(self, body):
        
        from highton.models.note import Note
        created_id = self._post_request(
            endpoint=self.ENDPOINT + '/' + str(self.id) + '/' + Note.ENDPOINT,
            data=self.element_to_string(
                Note(body=body).encode()
            )
        ).headers.get('Location').replace('.xml', '').split('/')[-1]
        return Note.get(created_id)
984506
def create_from_label_monetary_account(cls, label_monetary_account):
        

        instance = cls.__new__(cls)
        instance.label_monetary_account = label_monetary_account
        instance.pointer = Pointer()
        instance.pointer._name = label_monetary_account.display_name
        instance.pointer._type_ = cls._POINTER_TYPE_IBAN
        instance.pointer._value = label_monetary_account.iban

        return instance
361985
def send_note(self, to, subject="", body="", noetid=""):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/notes/send', post_data={
            'to[]' : to,
            'subject' : subject,
            'body' : body,
            'noetid' : noetid
        })

        sent_notes = []

        for item in response['results']:
            n = {}
            n['success'] = item['success']
            n['user'] = User()
            n['user'].from_dict(item['user'])

            sent_notes.append(n)

        return sent_notes
389010
def get_items_of_credit_note_per_page(self, credit_note_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=CREDIT_NOTE_ITEMS,
            per_page=per_page,
            page=page,
            params={'credit_note_id': credit_note_id},
        )
558341
def create
      request = if receivers.empty?
                  Request.post('transactions', api_version, params)
                else
                  Request.post_xml('transactions/', nil, credentials, xml_params)
                end

      Response.new(request, self).serialize
    end
556570
def credits(params = {})
      request_params = params.merge(access_params)
      request = Requests::Credit::List.new(request_params)
      request.call!
    end
856630
def create_notes_folder(self, title, parentid=""):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/notes/folders/create', post_data={
            'title' : title,
            'parentid' : parentid
        })

        return response
173645
def create_qrcode(self, qrcode_data):
        
        result = self._post(
            'card/qrcode/create',
            data=qrcode_data,
            result_processor=lambda x: x['ticket']
        )
        return result
1276627
def add_source(self, url, *, note=''):
        
        new = {'url': url, 'note': note}
        self.sources.append(new)
258925
def update_credit_note_item(self, credit_note_item_id, credit_note_item_dict):
        
        return self._create_put_request(
            resource=CREDIT_NOTE_ITEMS,
            billomat_id=credit_note_item_id,
            send_data=credit_note_item_dict
        )
1204144
public function getCreditNotes()
    {
        $result = null;
        if ($this->getType() === static::Order) {
            $result = array();
            $shopCreditNotes = $this->getShopCreditNotesOrIds();
            foreach ($shopCreditNotes as $shopCreditNote) {
                $result[] = new static(static::CreditNote, $shopCreditNote);
            }
        }
        return $result;
    }