Loads a Credit memo source for the set id.
348076
protected function setSourceCreditNote()
    {
        $this->source = Registry::getInstance()->create('\Magento\Sales\Model\Order\Creditmemo');
        /** @noinspection PhpDeprecationInspection http://magento.stackexchange.com/questions/114929/deprecated-save-and-load-methods-in-abstract-model */
        $this->source->load($this->id);
    }
153469
void setSourceCardData(@NonNull SourceCardData sourceCardData) {
        mCardBrand = sourceCardData.getBrand();
        mLast4 = sourceCardData.getLast4();
        updateBrandIcon();
        updateCardInformation();
    }
719995
def import_source(self, CachableSource):
        """"""
        _count = 0
        for item in CachableSource.items():
            if self.cache(item):
                _count += 1
        return _count
106959
def items(self):
        
        for anchor_id in self:
            try:
                anchor = self[anchor_id]
            except KeyError:
                assert False, 'Trying to load from missing file or something'

            yield (anchor_id, anchor)
42629
def from_dict(cls, d):
        

        name = PartitionIdentity._name_class(**d)

        if 'id' in d and 'revision' in d:
            # The vid should be constructed from the id and the revision
            on = (ObjectNumber.parse(d['id']).rev(d['revision']))
        elif 'vid' in d:
            on = ObjectNumber.parse(d['vid'])
        else:
            raise ValueError("Must have id and revision, or vid")

        try:
            return PartitionIdentity(name, on)
        except TypeError as e:
            raise TypeError(
                "Failed to make identity from \n{}\n: {}".format(
                    d,
                    e.message))
1286584
def _load_manifest_interpret_source(manifest, source, username=None, password=None, verify_certificate=True, do_inherit=True):
    
    try:
        if isinstance(source, string_types):
            if source.startswith("http"):
                # if manifest is a url
                _load_manifest_from_url(manifest, source,
                                        verify_certificate=verify_certificate,
                                        username=username, password=password)
            else:
                _load_manifest_from_file(manifest, source)
            if not manifest.has_option('config', 'source'):
                manifest.set('config', 'source', str(source))
        else:
            # assume source is a file pointer
            manifest.readfp(source)
        if manifest.has_option('config', 'extends') and do_inherit:
            parent_manifest = configparser.RawConfigParser()
            _load_manifest_interpret_source(parent_manifest,
                                            manifest.get('config', 'extends'),
                                            username=username,
                                            password=password,
                                            verify_certificate=verify_certificate)
            for s in parent_manifest.sections():
                for k, v in parent_manifest.items(s):
                    if not manifest.has_option(s, k):
                        manifest.set(s, k, v)

    except configparser.Error:
        logger.debug("", exc_info=True)
        error_message = sys.exc_info()[1]
        raise ManifestException("Unable to parse manifest!: {0}".format(error_message))
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},
        )
1264012
def load(self):
        """"""
        self._list = self._source.load()
        self._list_iter = itertools.cycle(self._list)
1261541
def __load_robject!(id, robject)
      @id = id
      @__robject = robject
      @attributes = {}
      @embedding = {}
      @_memo = {}

      data = @__robject.data
      embedded_data = {}

      model.embedding.each do |embedded|
        if d = data.delete(embedded.to_s)
          embedded_data[embedded] = d
        end
      end

      update_attributes data
      update_embedded_attributes embedded_data

      self
    end
34077
def _lazy_load(self):
        
        obj = self._connection.documents.get(id=self.id)
        self.__dict__['contributor'] = obj.contributor
        self.__dict__['contributor_organization'] = \
            obj.contributor_organization
        self.__dict__['data'] = obj.data
        self.__dict__['annotations'] = obj.__dict__['annotations']
        self.__dict__['sections'] = obj.__dict__['sections']
1318441
def get(self, identifier):
        """"""
        logging.info('Download document with id ' + str(identifier) + '.')
        try:
            record = self.instance.get(index=self.index, doc_type=self.doc_type, id=identifier)
            if '_source' in record:
                return record['_source']
            else:
                return record
        except NotFoundError:
            return None
430342
public static CacheableYamlSource sourceFromString(
        final String identity,
        final String content,
        final Date modified,
        final ValidationSet validation
    )
    {
        return new CacheableYamlSource() {
            @Override
            public boolean isValid() {
                return true;
            }

            @Override
            public Date getLastModified() {
                return modified;
            }

            @Override
            public String getIdentity() {
                return identity;
            }

            @Override
            public Iterable<ACLPolicyDoc> loadAll(final Yaml yaml) throws IOException {
                return YamlParsePolicy.documentIterable(yaml.loadAll(content).iterator(), validation, identity);
            }

            @Override
            public ValidationSet getValidationSet() {
                return validation;
            }

            @Override
            public void close() throws IOException {

            }
        };
    }
1059157
def load(self, filename):
        """"""
        LOGGER.info("Loading result from '%s'.", filename)
        if filename.endswith(".gz"):
            with gzip.open(filename, "rb") as file_handle:
                result = MemoteResult(
                    json.loads(file_handle.read().decode("utf-8"))
                )
        else:
            with open(filename, "r", encoding="utf-8") as file_handle:
                result = MemoteResult(json.load(file_handle))
        # TODO (Moritz Beber): Validate the read-in JSON maybe? Trade-off
        #  between extra time taken and correctness. Maybe we re-visit this
        #  issue when there was a new JSON format version needed.
        return result
863566
def __load_unique_identities(self, uidentities, matcher, match_new,
                                 reset, verbose):
        """"""

        self.new_uids.clear()

        n = 0

        if reset:
            self.__reset_unique_identities()

        self.log("Loading unique identities...")

        for uidentity in uidentities:
            self.log("\n=====", verbose)
            self.log("+ Processing %s" % uidentity.uuid, verbose)

            try:
                stored_uuid = self.__load_unique_identity(uidentity, verbose)
            except LoadError as e:
                self.error("%s Skipping." % str(e))
                self.log("=====", verbose)
                continue

            stored_uuid = self.__load_identities(uidentity.identities, stored_uuid,
                                                 verbose)

            try:
                self.__load_profile(uidentity.profile, stored_uuid, verbose)
            except Exception as e:
                self.error("%s. Loading %s profile. Skipping profile." %
                           (str(e), stored_uuid))

            self.__load_enrollments(uidentity.enrollments, stored_uuid,
                                    verbose)

            if matcher and (not match_new or stored_uuid in self.new_uids):
                stored_uuid = self._merge_on_matching(stored_uuid, matcher,
                                                      verbose)

            self.log("+ %s (old %s) loaded" % (stored_uuid, uidentity.uuid),
                     verbose)
            self.log("=====", verbose)
            n += 1

        self.log("%d/%d unique identities loaded" % (n, len(uidentities)))
557324
def load(self, id_code):
        
        filestream = open('{0}/{1}'.format(self.data_path, id_code), 'rb')
        workflow = pickle.load(filestream)
        return workflow
477572
function _loadPad (padId, revision, callback) {
    padManager.getPad(padId, function (err, pad) {
        throwIfError(err);
        if (revision) {
            pad.getInternalRevisionAText(revision, function (err, revisionAtext) {
                throwIfError(err);                
                pad.getRevisionDate(revision, function(err, revisionDate) {
                    throwIfError(err);
                    callback({ id: padId, pool: pad.pool, atext: revisionAtext, revisionDate: revisionDate});
                });
            });
        } else {
            pad.getLastEdit(function(err, lastEdit){
                throwIfError(err);
                callback({ id: padId, pool: pad.pool, atext: pad.atext, revisionDate: lastEdit});
            });
        }
    });
}
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
        )