本文整理汇总了Python中mozurestsdk.mozuurl.MozuUrl类的典型用法代码示例。如果您正苦于以下问题:Python MozuUrl类的具体用法?Python MozuUrl怎么用?Python MozuUrl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MozuUrl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: updateCouponSet
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()
示例2: getCouponSet
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()
示例3: updateMasterCatalog
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()
示例4: addItemToWishlist
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()
示例5: getCartItem
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()
示例6: getTreeDocumentContent
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()
示例7: updateCartItem
def updateCartItem(self, cartItem, cartItemId, responseFields=None):
""" Update the product or product quantity of an item in the current shopper's cart.
Args:
| cartItem(cartItem) - Properties of an item added to an active shopping cart.
| 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}",
"PUT",
UrlLocation.TenantPod,
False,
)
url.formatUrl("cartItemId", cartItemId)
url.formatUrl("responseFields", responseFields)
self.client.withResourceUrl(url).withBody(cartItem).execute()
return self.client.result()
示例8: getInStockNotificationSubscription
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()
示例9: getMasterCatalog
def getMasterCatalog(self, masterCatalogId, responseFields=None):
""" Retrieve the details of the master catalog specified in the request.
Args:
| masterCatalogId (int) - The unique identifier of the master catalog associated with the entity.
| 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}",
"GET",
UrlLocation.TenantPod,
False,
)
url.formatUrl("masterCatalogId", masterCatalogId)
url.formatUrl("responseFields", responseFields)
self.client.withResourceUrl(url).execute()
return self.client.result()
示例10: getSearchTuningRule
def getSearchTuningRule(self, searchTuningRuleCode, responseFields=None):
""" admin-search Get GetSearchTuningRule description DOCUMENT_HERE
Args:
| searchTuningRuleCode (string) -
| 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:
| SearchTuningRule
Raises:
| ApiException
"""
url = MozuUrl(
"/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}?responseFields={responseFields}",
"GET",
UrlLocation.TenantPod,
False,
)
url.formatUrl("responseFields", responseFields)
url.formatUrl("searchTuningRuleCode", searchTuningRuleCode)
self.client.withResourceUrl(url).execute()
return self.client.result()
示例11: getUserCartSummary
def getUserCartSummary(self, userId, responseFields=None):
""" Retrieves summary information associated with the cart of user specified in the request, including the number of items in the cart, the current total, and whether the cart has expired. All anonymous idle carts that do not proceed to checkout expire after 14 days.
Args:
| userId (string) - Unique identifier of the user whose tenant scopes you want to retrieve.
| responseFields (string) - Use this field to include those fields which are not included by default.
Returns:
| CartSummary
Raises:
| ApiException
"""
url = MozuUrl(
"/api/commerce/carts/user/{userId}/summary?responseFields={responseFields}",
"GET",
UrlLocation.TenantPod,
False,
)
url.formatUrl("responseFields", responseFields)
url.formatUrl("userId", userId)
self.client.withResourceUrl(url).execute()
return self.client.result()
示例12: updateDocumentListType
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()
示例13: updateWishlistItemQuantity
def updateWishlistItemQuantity(self, wishlistId, wishlistItemId, quantity, responseFields=None):
""" Updates the quantity of an item in a shopper wish list.
Args:
| wishlistId (string) - Unique identifier of the wish list.
| wishlistItemId (string) - Unique identifier of the item to remove from the shopper wish list.
| quantity (int) - The number of cart items in the shopper's active cart.
| 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/{wishlistItemId}/{quantity}?responseFields={responseFields}",
"PUT",
UrlLocation.TenantPod,
False,
)
url.formatUrl("quantity", quantity)
url.formatUrl("responseFields", responseFields)
url.formatUrl("wishlistId", wishlistId)
url.formatUrl("wishlistItemId", wishlistItemId)
self.client.withResourceUrl(url).execute()
return self.client.result()
示例14: getTreeDocument
def getTreeDocument(self, documentListName, documentName, includeInactive=False, responseFields=None):
""" Retrieves a document based on its document list and folder path in the document hierarchy.
Args:
| documentListName (string) - Name of content documentListName to delete
| documentName (string) - The name of the document in the site.
| includeInactive (bool) -
| responseFields (string) - Use this field to include those fields which are not included by default.
Returns:
| Document
Raises:
| ApiException
"""
url = MozuUrl(
"/api/content/documentlists/{documentListName}/documentTree/{documentName}?includeInactive={includeInactive}&responseFields={responseFields}",
"GET",
UrlLocation.TenantPod,
False,
)
url.formatUrl("documentListName", documentListName)
url.formatUrl("documentName", documentName)
url.formatUrl("includeInactive", includeInactive)
url.formatUrl("responseFields", responseFields)
self.client.withResourceUrl(url).execute()
return self.client.result()
示例15: updateExtendedProperties
def updateExtendedProperties(self,extendedProperties, orderId, updateMode = None, version = None, upsert = False):
""" Updates one or more extended properties.
Args:
| extendedProperties(array|extendedProperties) - Mozu.CommerceRuntime.Contracts.Commerce.ExtendedProperty ApiType DOCUMENT_HERE
| 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) - Determines whether or not to check versioning of items for concurrency purposes.
| upsert (bool) - Inserts and updates the extended property.
Returns:
| array of ExtendedProperty
Raises:
| ApiException
"""
url = MozuUrl("/api/commerce/orders/{orderId}/extendedproperties?updatemode={updateMode}&version={version}&upsert={upsert}", "PUT", UrlLocation.TenantPod, False);
url.formatUrl("orderId", orderId);
url.formatUrl("updateMode", updateMode);
url.formatUrl("upsert", upsert);
url.formatUrl("version", version);
self.client.withResourceUrl(url).withBody(extendedProperties).execute();
return self.client.result();