当前位置: 首页>>代码示例>>Python>>正文


Python MozuUrl.formatUrl方法代码示例

本文整理汇总了Python中mozurestsdk.mozuurl.MozuUrl.formatUrl方法的典型用法代码示例。如果您正苦于以下问题:Python MozuUrl.formatUrl方法的具体用法?Python MozuUrl.formatUrl怎么用?Python MozuUrl.formatUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mozurestsdk.mozuurl.MozuUrl的用法示例。


在下文中一共展示了MozuUrl.formatUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: updateMasterCatalog

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def updateMasterCatalog(self, masterCatalog, masterCatalogId, responseFields=None):
        """ Updates the product publishing mode for the master catalog specified in the request.
		
		Args:
			| masterCatalog(masterCatalog) - Properties of a master product catalog defined for a tenant. All catalogs and sites associated with a master catalog share product definitions.
			| masterCatalogId (int) - 
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| MasterCatalog 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/commerce/catalog/admin/mastercatalogs/{masterCatalogId}?responseFields={responseFields}",
            "PUT",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("masterCatalogId", masterCatalogId)
        url.formatUrl("responseFields", responseFields)
        self.client.withResourceUrl(url).withBody(masterCatalog).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:28,代码来源:mastercatalog.py

示例2: getCartItem

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def getCartItem(self, cartItemId, responseFields=None):
        """ Retrieves a particular cart item by providing the cart item ID.
		
		Args:
			| cartItemId (string) - Identifier of the cart item to delete.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| CartItem 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/commerce/carts/current/items/{cartItemId}?responseFields={responseFields}",
            "GET",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("cartItemId", cartItemId)
        url.formatUrl("responseFields", responseFields)
        self.client.withResourceUrl(url).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:27,代码来源:cartitem.py

示例3: getEntityLists

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def getEntityLists(self,pageSize = None, startIndex = None, filter = None, sortBy = None, responseFields = None):
		""" Get a filtered list of EntityLists for a specific tenant.
		
		Args:
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The amount is divided and displayed on the  pageCount  amount of pages. The default is 20 and maximum value is 200 per page.
			| startIndex (int) - When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with a  pageSize  of 25, to get the 51st through the 75th items, use  startIndex=3 .
			| filter (string) - A set of expressions that consist of a field, operator, and value and represent search parameter syntax when filtering results of a query. Valid operators include equals (eq), does not equal (ne), greater than (gt), less than (lt), greater than or equal to (ge), less than or equal to (le), starts with (sw), or contains (cont). For example - "filter=IsDisplayed+eq+true"
			| sortBy (string) - The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| EntityListCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/platform/entitylists/?pageSize={pageSize}&startIndex={startIndex}&filter={filter}&sortBy={sortBy}&responseFields={responseFields}", "GET", UrlLocation.TenantPod, False);
		url.formatUrl("filter", filter);
		url.formatUrl("pageSize", pageSize);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("sortBy", sortBy);
		url.formatUrl("startIndex", startIndex);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:28,代码来源:entitylist.py

示例4: getSearchTuningRules

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def getSearchTuningRules(self,startIndex = None, pageSize = None, sortBy = None, filter = None, responseFields = None):
		""" Retrieves a list of search tuning rules and their properties.
		
		Args:
			| startIndex (int) - When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
			| pageSize (int) - When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
			| sortBy (string) - The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
			| filter (string) - A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
			| responseFields (string) - Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
		
		Returns:
			| SearchTuningRuleCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/admin/search/searchtuningrules?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}", "GET", UrlLocation.TenantPod, False);
		url.formatUrl("filter", filter);
		url.formatUrl("pageSize", pageSize);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("sortBy", sortBy);
		url.formatUrl("startIndex", startIndex);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
开发者ID:Mozu,项目名称:mozu-python-sdk,代码行数:28,代码来源:search.py

示例5: getTreeDocumentContent

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def getTreeDocumentContent(self, documentListName, documentName):
        """ Retrieve the content associated with the document, such as a product image or PDF specifications file.
		
		Args:
			| documentListName (string) - Name of content documentListName to delete
			| documentName (string) - The name of the document in the site.
		
		Returns:
			| Stream 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/content/documentlists/{documentListName}/documentTree/{documentName}/content",
            "GET",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("documentListName", documentListName)
        url.formatUrl("documentName", documentName)
        self.client.withResourceUrl(url).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:27,代码来源:documenttree.py

示例6: getPriceListEntry

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def getPriceListEntry(self,priceListCode, productCode, currencyCode, startDate = None, responseFields = None):
		""" Retrieves the details of a price list entry.
		
		Args:
			| priceListCode (string) - The unique code of the price list associated with the price list entry.
			| productCode (string) - The unique, user-defined product code of a product, used throughout  to reference and associate to a product.
			| currencyCode (string) - The three character ISO currency code, such as USD for US Dollars.
			| startDate (DateTime) - The start date of the price list entry.
			| responseFields (string) - Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
		
		Returns:
			| PriceListEntry 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}&responseFields={responseFields}", "GET", UrlLocation.TenantPod, False);
		url.formatUrl("currencyCode", currencyCode);
		url.formatUrl("priceListCode", priceListCode);
		url.formatUrl("productCode", productCode);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("startDate", startDate);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
开发者ID:Mozu,项目名称:mozu-python-sdk,代码行数:28,代码来源:pricelistentry.py

示例7: addItemToWishlist

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def addItemToWishlist(self, wishlistItem, wishlistId, responseFields=None):
        """ Adds a product in a site's catalog as an item in a shopper wish list.
		
		Args:
			| wishlistItem(wishlistItem) - Properties of an item in a shopper wish list.
			| wishlistId (string) - Unique identifier of the wish list.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| WishlistItem 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/commerce/wishlists/{wishlistId}/items?responseFields={responseFields}",
            "POST",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("responseFields", responseFields)
        url.formatUrl("wishlistId", wishlistId)
        self.client.withResourceUrl(url).withBody(wishlistItem).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:28,代码来源:wishlistitem.py

示例8: getPropertyValueLocalizedContent

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def getPropertyValueLocalizedContent(self,productCode, attributeFQN, value, localeCode, responseFields = None):
		""" Retrieves the property value for localized content. This content is set by the locale code. 
		
		Args:
			| productCode (string) - The unique, user-defined product code of a product, used throughout Mozu to reference and associate to a product.
			| attributeFQN (string) - Fully qualified name for an attribute.
			| value (string) - The value string to create.
			| localeCode (string) - Language used for the entity. Currently, only "en-US" is supported.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| ProductPropertyValueLocalizedContent 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}/values/{value}/LocalizedContent/{localeCode}?responseFields={responseFields}", "GET", UrlLocation.TenantPod, False);
		url.formatUrl("attributeFQN", attributeFQN);
		url.formatUrl("localeCode", localeCode);
		url.formatUrl("productCode", productCode);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("value", value);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:28,代码来源:productproperty.py

示例9: updateDocumentListType

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def updateDocumentListType(self, list, documentListTypeFQN, responseFields=None):
        """ Updates a DocumentListType
		
		Args:
			| list(list) - Properties for the document list type. Document lists contain documents with an associated document type, such as web pages.
			| documentListTypeFQN (string) - 
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| DocumentListType 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/content/documentlistTypes/{documentListTypeFQN}?responseFields={responseFields}",
            "PUT",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("documentListTypeFQN", documentListTypeFQN)
        url.formatUrl("responseFields", responseFields)
        self.client.withResourceUrl(url).withBody(list).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:28,代码来源:documentlisttype.py

示例10: createOrderItem

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def createOrderItem(self,orderItem, orderId, updateMode = None, version = None, skipInventoryCheck = False, responseFields = None):
		""" Adds a new item to a defined order.
		
		Args:
			| orderItem(orderItem) - The details associated with a specific item in an order.
			| orderId (string) - Unique identifier of the order.
			| updateMode (string) - Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
			| version (string) - System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
			| skipInventoryCheck (bool) - If true, skip the process to validate inventory when creating this product reservation.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| Order 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/orders/{orderId}/items?updatemode={updateMode}&version={version}&skipInventoryCheck={skipInventoryCheck}&responseFields={responseFields}", "POST", UrlLocation.TenantPod, False);
		url.formatUrl("orderId", orderId);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("skipInventoryCheck", skipInventoryCheck);
		url.formatUrl("updateMode", updateMode);
		url.formatUrl("version", version);
		self.client.withResourceUrl(url).withBody(orderItem).execute();
		return self.client.result();
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:29,代码来源:orderitem.py

示例11: getCouponSet

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def getCouponSet(self, couponSetCode, includeCounts=False, responseFields=None):
        """ 
		
		Args:
			| couponSetCode (string) - 
			| includeCounts (bool) - 
			| responseFields (string) - 
		
		Returns:
			| CouponSet 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/commerce/catalog/admin/couponsets/{couponSetCode}?includeCounts={includeCounts}&responseFields={responseFields}",
            "GET",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("couponSetCode", couponSetCode)
        url.formatUrl("includeCounts", includeCounts)
        url.formatUrl("responseFields", responseFields)
        self.client.withResourceUrl(url).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:29,代码来源:couponset.py

示例12: updateCouponSet

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def updateCouponSet(self, couponSet, couponSetCode, responseFields=None):
        """ 
		
		Args:
			| couponSet(couponSet) - 
			| couponSetCode (string) - 
			| responseFields (string) - 
		
		Returns:
			| CouponSet 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/commerce/catalog/admin/couponsets/{couponSetCode}?responseFields={responseFields}",
            "PUT",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("couponSetCode", couponSetCode)
        url.formatUrl("responseFields", responseFields)
        self.client.withResourceUrl(url).withBody(couponSet).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:28,代码来源:couponset.py

示例13: getProduct

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def getProduct(self,productCode, variationProductCode = None, allowInactive = False, skipInventoryCheck = False, supressOutOfStock404 = False, responseFields = None):
		""" Retrieves information about a single product given its product code.
		
		Args:
			| productCode (string) - Merchant-created code that uniquely identifies the product such as a SKU or item number. Once created, the product code is read-only.
			| variationProductCode (string) - Merchant-created code associated with a specific product variation. Variation product codes maintain an association with the base product code.
			| allowInactive (bool) - If true, allow inactive categories to be retrieved in the category list response. If false, the categories retrieved will not include ones marked inactive.
			| skipInventoryCheck (bool) - If true, skip the process to validate inventory when creating this product reservation.
			| supressOutOfStock404 (bool) - 
			| responseFields (string) - A list or array of fields returned for a call. These fields may be customized and may be used for various types of data calls in Mozu. For example, responseFields are returned for retrieving or updating attributes, carts, and messages in Mozu.
		
		Returns:
			| Product 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/storefront/products/{productCode}?variationProductCode={variationProductCode}&allowInactive={allowInactive}&skipInventoryCheck={skipInventoryCheck}&supressOutOfStock404={supressOutOfStock404}&responseFields={responseFields}", "GET", UrlLocation.TenantPod, False);
		url.formatUrl("allowInactive", allowInactive);
		url.formatUrl("productCode", productCode);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("skipInventoryCheck", skipInventoryCheck);
		url.formatUrl("supressOutOfStock404", supressOutOfStock404);
		url.formatUrl("variationProductCode", variationProductCode);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:30,代码来源:product.py

示例14: updateOrderDiscount

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
	def updateOrderDiscount(self,discount, orderId, discountId, updateMode = None, version = None, responseFields = None):
		""" Update the properties of a discount applied to an order.
		
		Args:
			| discount(discount) - Properties of all applied discounts for an associated cart, order, or product. 
			| orderId (string) - Unique identifier of the order.
			| discountId (int) - discountId parameter description DOCUMENT_HERE 
			| updateMode (string) - Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
			| version (string) - System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| Order 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/orders/{orderId}/discounts/{discountId}?updatemode={updateMode}&version={version}&responseFields={responseFields}", "PUT", UrlLocation.TenantPod, False);
		url.formatUrl("discountId", discountId);
		url.formatUrl("orderId", orderId);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("updateMode", updateMode);
		url.formatUrl("version", version);
		self.client.withResourceUrl(url).withBody(discount).execute();
		return self.client.result();
开发者ID:Mozu,项目名称:mozu-python-sdk,代码行数:29,代码来源:order.py

示例15: getInStockNotificationSubscription

# 需要导入模块: from mozurestsdk.mozuurl import MozuUrl [as 别名]
# 或者: from mozurestsdk.mozuurl.MozuUrl import formatUrl [as 别名]
    def getInStockNotificationSubscription(self, id, responseFields=None):
        """ Retrieves the details of a subscription that sends a push notification when a product is available in a site's active stock.
		
		Args:
			| id (int) - Unique identifier of the customer segment to retrieve.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| InStockNotificationSubscription 
		
		Raises:
			| ApiException
		
		"""

        url = MozuUrl(
            "/api/commerce/instocknotifications/{id}?responseFields={responseFields}",
            "GET",
            UrlLocation.TenantPod,
            False,
        )
        url.formatUrl("id", id)
        url.formatUrl("responseFields", responseFields)
        self.client.withResourceUrl(url).execute()
        return self.client.result()
开发者ID:sanjaymandadi,项目名称:mozu-python-sdk,代码行数:27,代码来源:instocknotificationsubscription.py


注:本文中的mozurestsdk.mozuurl.MozuUrl.formatUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。