taobao.delivery.template.add 新增运费模板
        
        新增运费模板
492371
def add(self, name, assumer, valuation, template_types, template_dests, template_start_standards, template_start_fees, template_add_standards, template_add_fees, session):
        ''''''
        request = TOPRequest('taobao.delivery.template.add')
        request['name'] = name
        request['assumer'] = assumer
        request['valuation'] = valuation
        request['template_types'] = template_types
        request['template_dests'] = template_dests
        request['template_start_standards'] = template_start_standards
        request['template_start_fees'] = template_start_fees
        request['template_add_standards'] = template_add_standards
        request['template_add_fees'] = template_add_fees
        self.create(self.execute(request, session)['delivery_template'])
        return self
331997
def update_listing(self, num_iid, num, session):
        ''''''
        request = TOPRequest('taobao.item.update.listing')
        request['num_iid'] = num_iid
        request['num'] = num
        self.create(self.execute(request, session)['item'])
        return self
1274752
def add(self, name, productcat_id, standard_price, retail_price_low, retail_price_high, category_id, quantity, alarm_number, desc, prov, city, postage_type, have_invoice, have_guarantee, session, **kwargs):
        ''''''
        request = TOPRequest('taobao.fenxiao.product.add')
        request['name'] = name
        request['productcat_id'] = productcat_id
        request['standard_price'] = standard_price
        request['retail_price_low'] = retail_price_low
        request['retail_price_high'] = retail_price_high
        request['category_id'] = category_id
        request['quantity'] = quantity
        request['alarm_number'] = alarm_number
        request['desc'] = desc
        request['prov'] = prov
        request['city'] = city
        request['postage_type'] = postage_type
        request['have_invoice'] = have_invoice
        request['have_guarantee'] = have_guarantee
        for k, v in kwargs.iteritems():
            if k not in ('cost_price', 'outer_id', 'postage_id', 'postage_ordinary', 'postage_fast', 'postage_ems', 'discount_id', 'trade_type','is_authz','pic_path','image','properties','property_alias','input_properties','sku_standard_prices','sku_cost_prices','sku_outer_ids','sku_quantitys','sku_properties','dealer_cost_price','sku_dealer_cost_prices') and v==None: continue
            request[k] = v
        self.create(self.execute(request, session), fields=['pid','created'], models={'created':TOPDate})
        return self
440336
def set_delivery(self, order_id, delivery_data):
        
        delivery_data['order_id'] = order_id
        return self._post(
            'merchant/shelf/setdeliverymod',
            data=delivery_data
        )
435263
def update(self, session, title=None, bulletin=None, desc=None):
        ''''''
        request = TOPRequest('taobao.shop.remainshowcase.get')
        if title!=None: request['title'] = title
        if bulletin!=None: request['bulletin'] = bulletin
        if desc!=None: request['desc'] = desc
        self.create(self.execute(request, session)['shop'])
        return self
1291168
def items_get(self, **kwargs):
        ''''''
        request = TOPRequest('taobao.increment.items.get')
        for k, v in kwargs.iteritems():
            if k not in ('status', 'nick', 'start_modified', 'end_modified', 'page_no', 'page_size') and v==None: continue
            request[k] = v
        self.create(self.execute(request), fields=['notify_items', 'total_results'], models={'notify_items':NotifyItem})
        return self.notify_items
744658
function upgrade(template) {
  var info = templates.get(template) ||
      set(templates, template, transform(template));
  return {
    template: template,
    updates: fixUpdates.call(this, info.updates),
    chunks: info.chunks
  };
}
713241
def get(self, service_type, source_id=None, target_id=None, goods_value=None):
        ''''''
        request = TOPRequest('taobao.logistics.partners.get')
        request['service_type'] = service_type
        if source_id!=None: request['source_id'] = source_id
        if target_id!=None: request['target_id'] = target_id
        if goods_value!=None: request['goods_value'] = goods_value
        self.create(self.execute(request))
        return self.logistics_partners
518120
function templateSourceUpdate(){
    if (this.destroyBuilder)
      buildTemplate.call(this);

    var cursor = this;
    while (cursor = cursor.attaches_)
      cursor.handler.call(cursor.context);
  }
78373
def update(self, pid, session, **kwargs):
        ''''''
        request = TOPRequest('taobao.fenxiao.product.update')
        request['pid'] = pid
        for k, v in kwargs.iteritems():
            if k not in ('name', 'standard_price', 'cost_price', 'retail_price_low', 'retail_price_high', 'outer_id', 'quantity', 'alarm_number','desc','prov','city','postage_type','postage_id','postage_ordinary','postage_fast','postage_ems','status','sku_ids','sku_cost_prices','sku_quantitys','sku_outer_ids','have_invoice','have_guarantee','discount_id','sku_standard_prices','sku_properties','sku_properties_del','is_authz','pic_path','image','properties','property_alias','input_properties','dealer_cost_price','sku_dealer_cost_prices','category_id') and v==None: continue
            request[k] = v
        self.create(self.execute(request, session), fields=['pid','modified'], models={'modified':TOPDate})
        return self
660196
def postage_update(self, tid, post_fee, session):
        ''''''
        request = TOPRequest('taobao.trade.postage.update')
        request['tid'] = tid
        request['post_fee'] = post_fee
        self.create(self.execute(request, session)['trade'])
        return self
619770
def update(self, session, **kwargs):
        ''''''
        request = TOPRequest('taobao.fenxiao.discount.update')
        for k, v in kwargs.iteritems():
            if k not in ('discount_id', 'discount_name', 'discount_status', 'detail_ids', 'target_types', 'target_ids', 'discount_types', 'discount_values', 'detail_statuss') and v==None: continue
            request[k] = v
        self.create(self.execute(request, session), fields=['is_success',])
        return self.is_success
853348
def create_payload(self):
        
        payload = super(ProvisioningTemplate, self).create_payload()
        if 'template_combinations' in payload:
            payload['template_combinations_attributes'] = payload.pop(
                'template_combinations')
        return {u'provisioning_template': payload}
1317663
public function editTemplate()
    {
        $this->defaultData();

        $clazz = $this->getCurrentClass();
        $delivery = $this->getCurrentInstance();

        $formContainer = new DeliveryForm($clazz, $delivery);
        $myForm = $formContainer->getForm();

        $myForm->evaluate();

        if ($myForm->isSubmited()) {
            if ($myForm->isValid()) {
                $propertyValues = $myForm->getValues();

                // then save the property values as usual
                $binder = new tao_models_classes_dataBinding_GenerisFormDataBinder($delivery);
                $delivery = $binder->bind($propertyValues);

                // edit process label:
                $this->getClassService()->onChangeLabel($delivery);

                $this->setData("selectNode", tao_helpers_Uri::encode($delivery->getUri()));
                $this->setData('message', __('Delivery saved'));
                $this->setData('reload', true);
            }
        }

        $this->setData('contentForm', $this->getContentForm());

        $this->setData('uri', tao_helpers_Uri::encode($delivery->getUri()));
        $this->setData('classUri', tao_helpers_Uri::encode($clazz->getUri()));

        $this->setData('hasContent', !is_null($this->getClassService()->getContent($delivery)));

        $this->setData('formTitle', __('Delivery properties'));
        $this->setData('myForm', $myForm->render());

        if ($this->getServiceLocator()->get(\common_ext_ExtensionsManager::SERVICE_ID)->isEnabled('taoCampaign')) {
            $this->setData('campaign', \taoCampaign_helpers_Campaign::renderCampaignTree($delivery));
        }
        $this->setView('DeliveryTemplate/editDelivery.tpl');
    }
1127680
async function updatePackageJSON (version) {
  ['package.json'].forEach(async fileName => {
    const filePath = path.resolve(__dirname, '..', fileName)
    const file = require(filePath)
    file.version = version
    await writeFile(filePath, JSON.stringify(file, null, 2))
  })
}
557534
def publishTemplate(self, templateMessage):
        

        desc = {
            "name": "CodeSuccessReslut",
            "desc": " http 成功返回结果",
            "fields": [{
                "name": "code",
                "type": "Integer",
                "desc": "返回码，200 为正常。"
            }, {
                "name": "errorMessage",
                "type": "String",
                "desc": "错误信息。"
            }]
        }
        r = self.call_api(
            method=('API', 'POST', 'application/json'),
            action='/message/private/publish_template.json',
            params=templateMessage)
        return Response(r, desc)
1260844
def update_object(
        request, model=None, object_id=None, slug=None,
        slug_field='slug', template_name=None, template_loader=loader,
        extra_context=None, post_save_redirect=None, login_required=False,
        context_processors=None, template_object_name='object',
        form_class=None):
    
    if extra_context is None:
        extra_context = {}
    if login_required and not request.user.is_authenticated:
        return redirect_to_login(request.path)

    model, form_class = get_model_and_form_class(model, form_class)
    obj = lookup_object(model, object_id, slug, slug_field)

    if request.method == 'POST':
        form = form_class(request.POST, request.FILES, instance=obj)
        if form.is_valid():
            obj = form.save()
            msg = ugettext("The %(verbose_name)s was updated successfully.") %\
                {"verbose_name": model._meta.verbose_name}
            messages.success(request, msg, fail_silently=True)
            return redirect(post_save_redirect, obj)
    else:
        form = form_class(instance=obj)

    if not template_name:
        template_name = "%s/%s_form.html" % (
            model._meta.app_label, model._meta.object_name.lower())
    t = template_loader.get_template(template_name)
    c = {
        'form': form,
        template_object_name: obj,
    }
    apply_extra_context(extra_context, c)
    response = HttpResponse(t.render(context=c, request=request))
    return response