Generate a complete order template.

        :param int quote_id: ID of target quote
        :param dictionary extra: Overrides for the defaults of SoftLayer_Container_Product_Order
        :param int quantity: Number of items to order.
974894
def generate_order_template(self, quote_id, extra, quantity=1):
        

        if not isinstance(extra, dict):
            raise ValueError("extra is not formatted properly")

        container = self.get_order_container(quote_id)

        container['quantity'] = quantity
        for key in extra.keys():
            container[key] = extra[key]

        return container
1257214
public function addAmazonusOrderProducts($order_id, $data) {
		foreach ($data as $sku => $order_item_id) {

			$row = $this->db->query("SELECT `order_product_id` FROM `" . DB_PREFIX . "order_product` WHERE `model` = '" . $this->db->escape($sku) . "' AND `order_id` = " . (int)$order_id . "LIMIT 1")->row;

			if (!isset($row['order_product_id']) || empty($row['order_product_id'])) {
				continue;
			}

			$order_product_id = $row['order_product_id'];

			$this->db->query("INSERT INTO `" . DB_PREFIX . "amazonus_order_product` (`order_product_id`, `amazonus_order_item_id`) VALUES (" . (int)$order_product_id . ", '" . $this->db->escape($order_item_id) . "')");
		}
	}
537487
def quantity_string(name, quantity_dict):
    '''
    '''
    if name not in quantity_dict.keys():
        raise ValueError('{0} is not present in quantity_dict'.format(name))
    return '{0} ({1})'.format(quantity_dict[name]['name'],
                              quantity_dict[name]['units'])
346341
def openOrder(self, orderId, arg0, arg1, arg2):
        """"""
        return _swigibpy.EWrapper_openOrder(self, orderId, arg0, arg1, arg2)
670491
def new(cls, num_id, abstractNum_id):
        
        num = OxmlElement('w:num')
        num.numId = num_id
        abstractNumId = CT_DecimalNumber.new(
            'w:abstractNumId', abstractNum_id
        )
        num.append(abstractNumId)
        return num
812105
def get_order(self, id, **data):
        
        
        return self.get("/orders/{0}/".format(id), data=data)
194036
def update_product(product_id, **kwargs):
    
    content = update_product_raw(product_id, **kwargs)
    if content:
        return utils.format_json(content)
213565
public static Phrase fromPlural(View v, @PluralsRes int patternResourceId, int quantity) {
    return fromPlural(v.getResources(), patternResourceId, quantity);
  }
240657
def build_tracking_request(order_ids, options)
      xml = Builder::XmlMarkup.new :indent => 2
      xml.instruct!
      xml.tag! 'TrackingXML' do
        add_credentials(xml)

        order_ids.each do |o_id|
          xml.tag! 'Tracking' do
            xml.tag! 'Order', o_id
          end
        end
      end
    end
1008073
def quoteattrs(data):
    ''''''
    items = []
    for key, value in data.items():
        items.append('{}={}'.format(key, quoteattr(value)))
    return ' '.join(items)
1095509
def add_to_cart(item_id):
    
    cart = Cart(session['cart'])
    if cart.change_item(item_id, 'add'):
        session['cart'] = cart.to_dict()
    return list_products()
220935
def get(self, template_ids, session, fields=[]):
        ''''''
        request = TOPRequest('taobao.delivery.template.get')
        request['template_ids'] = template_ids
        if not fields:
            fields = self.fields
        request['fields'] = fields
        self.create(self.execute(request, session), fields=['delivery_templates', 'total_results'], models={'delivery_templates':DeliveryTemplate})
        return self.delivery_templates
684905
def order_id=(order_id)

      if !order_id.nil? && order_id.to_s.length > 192
        fail ArgumentError, "invalid value for 'order_id', the character length must be smaller than or equal to 192."
      end

      @order_id = order_id
    end
455582
async function nextQuote(store) {
  await store.update(state => {
    state.quoteId = state.quoteId + 1
    if (state.quoteId >= MAX_QUOTE_ID) {
      state.quoteId = 1
    }
  })
}
338429
def add_stock(self, product_id, sku_info, quantity):
        
        return self._post(
            'merchant/stock/add',
            data={
                "product_id": product_id,
                "sku_info": sku_info,
                "quantity": quantity
            }
        )
44392
public function loadByQuoteId($quoteId, $storeId)
    {
        $item = $this->campaignCollection->create()
            ->loadByQuoteId($quoteId, $storeId);

        if ($item) {
            return $item;
        } else {
            return $this->setQuoteId($quoteId)
                ->setStoreId($storeId);
        }
    }
767682
def build_kwargs(self):
        
        keys, self.keys = self.keys[:MAX_GET_BATCH], self.keys[MAX_GET_BATCH:]
        query = {'ConsistentRead': self.consistent}
        if self.attributes is not None:
            query['ProjectionExpression'] = self.attributes
        if self.alias:
            query['ExpressionAttributeNames'] = self.alias
        query['Keys'] = keys
        return {
            'RequestItems': {
                self.tablename: query,
            },
            'ReturnConsumedCapacity': self.return_capacity,
        }