Retrieves all credit_notes from Xero

 Usage : get_credit_notes
         get_credit_notes(:credit_note_id => " 297c2dc5-cc47-4afd-8ec8-74990b8761e9")

 Note  : modified_since is in UTC format (i.e. Brisbane is UTC+10)
549759
def get_credit_notes(options = {})

      request_params = {}

      request_params[:CreditNoteID]     = options[:credit_note_id] if options[:credit_note_id]
      request_params[:CreditNoteNumber] = options[:credit_note_number] if options[:credit_note_number]
      request_params[:order]            = options[:order] if options[:order]
      request_params[:ModifiedAfter]    = options[:modified_since] if options[:modified_since]

      request_params[:where]            = options[:where] if options[:where]

      response_xml = http_get(@client, "#{@xero_url}/CreditNotes", request_params)

      parse_response(response_xml, {:request_params => request_params}, {:request_signature => 'GET/CreditNotes'})
    end
137093
def line_items
      if line_items_downloaded?
        @line_items

      # There is an credit_note_is so we can assume this record was loaded from Xero.
      # attempt to download the line_item records.
      elsif credit_note_id =~ GUID_REGEX
        raise NoGatewayError unless @gateway

        response = @gateway.get_credit_note(credit_note_id)
        raise CreditNoteNotFoundError, "CreditNote with ID #{credit_note_id} not found in Xero." unless response.success? && response.credit_note.is_a?(XeroGateway::CreditNote)

        @line_items = response.credit_note.line_items
        @line_items_downloaded = true

        @line_items

      # Otherwise, this is a new credit_note, so return the line_items reference.
      else
        @line_items
      end
    end
153499
def get_family_notes(family, data_dir=None):
    '''
    '''

    file_path = _family_notes_path(family, data_dir)
    notes_str = fileio.read_notes_file(file_path)

    if notes_str is None:
        notes_str = ""

    ref_data = get_reference_data(data_dir)
    return notes.process_notes(notes_str, ref_data)
908019
public static Note getLongestNote(Note[] notes) {
	  float length = 0;
	  float currentNoteLength = 0;
	  Note maxNote = null;
	  for (int i=0; i<notes.length && maxNote==null; i++) {
		  currentNoteLength = notes[i].getDuration();
		  if (currentNoteLength > length)
			  maxNote = notes[i];
	  }
	  return maxNote;
  }
1324744
def get_comments_of_credit_note_per_page(self, credit_note_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=CREDIT_NOTE_COMMENTS,
            per_page=per_page,
            page=page,
            params={'credit_note_id': credit_note_id},
        )
317133
def notes_list
      options = create_params({})
      notes = self.class.get('/notes/list', options)['notes']['note']
      notes = [] if notes.nil?
      notes = [*notes]
      notes.map { |p| Note.new(Util.symbolize_keys(p)) }
    end
281027
def get_basis_notes(name, data_dir=None):
    '''
    '''

    file_path = _basis_notes_path(name, data_dir)
    notes_str = fileio.read_notes_file(file_path)

    if notes_str is None:
        return ""

    ref_data = get_reference_data(data_dir)
    return notes.process_notes(notes_str, ref_data)
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
        )
601857
def get_contact_notes(
        self,
        obj_id,
        search='',
        start=0,
        limit=0,
        order_by='',
        order_by_dir='ASC'
    ):
        

        parameters = {
            'search': search,
            'start': start,
            'limit': limit,
            'orderBy': order_by,
            'orderByDir': order_by_dir,
        }
        response = self._client.session.get(
            '{url}/{id}/notes'.format(
                url=self.endpoint_url, id=obj_id
            ),
            params=parameters
        )
        return self.process_response(response)
287283
def fetch(self, fetch_notes=None):
        
        if fetch_notes is None:
            fetch_notes = self.fetch_notes
        values, notes_index = get_sheet_values(self.name, self.sheet_name,
                                               spreadsheet_service=self._spreadsheet_service,
                                               get_notes=fetch_notes)
        self.raw_values = values
        self.values = [list(r) for r in zip(*itertools.zip_longest(*self.raw_values, fillvalue=''))]
        self.byCol = byCol(self.values, to_index=self.index_columns)
        self.notes_index = notes_index
621000
def get_notes(self, user):
        
        # Try to search for all notes on a user, return an empty list if none
        # are found.
        try:
            users_notes = []

            for note in self.cached_json['users'][user]['ns']:
                users_notes.append(Note(
                    user=user,
                    note=note['n'],
                    subreddit=self.subreddit,
                    mod=self._mod_from_index(note['m']),
                    link=note['l'],
                    warning=self._warning_from_index(note['w']),
                    note_time=note['t']
                ))

            return users_notes
        except KeyError:
            # User not found
            return []
792321
def get_notes(self, folderid="", offset=0, limit=10):

        

        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', {
            'folderid' : folderid,
            'offset' : offset,
            'limit' : limit
        })

        notes = []

        for item in response['results']:
            n = {}

            n['noteid'] = item['noteid']
            n['ts'] = item['ts']
            n['unread'] = item['unread']
            n['starred'] = item['starred']
            n['sent'] = item['sent']
            n['subject'] = item['subject']
            n['preview'] = item['preview']
            n['body'] = item['body']
            n['user'] = User()
            n['user'].from_dict(item['user'])
            n['recipients'] = []

            for recipient_item in item['recipients']:
                u = User()
                u.from_dict(recipient_item)
                n['recipients'].append(u)

            notes.append(n)

        return {
            "results" : notes,
            "has_more" : response['has_more'],
            "next_offset" : response['next_offset']
        }
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)
188941
def get_payments_of_credit_note_per_page(self, credit_note_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=CREDIT_NOTE_PAYMENTS,
            per_page=per_page,
            page=page,
            params={'credit_note_id': credit_note_id},
        )
180404
public function getNotes()
    {
        $entities = [];
        if ($this->entity->getNotes()) {
            foreach ($this->entity->getNotes() as $note) {
                $entities[] = $note;
            }
        }

        return $entities;
    }
941942
def get_note_names(self):
        """"""
        res = []
        for cont in self.bar:
            for x in cont[2].get_note_names():
                if x not in res:
                    res.append(x)
        return res
1091192
def to_request
        credit = {
          delayed:              self.delayed,
          authenticated:        self.authenticated,
          pre_authorization:    self.pre_authorization,
          save_card_data:       self.save_card_data,
          transaction_type:     self.transaction_type,
          number_installments:  self.number_installments.to_i,
          soft_descriptor:      self.soft_descriptor,
          dynamic_mcc:          self.dynamic_mcc,
          card:                 self.card.to_request,
        }

      return credit
    end