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()
Beispiel #2
0
	def validateProduct(self,productOptionSelections, productCode, skipInventoryCheck = False, quantity = None, skipDefaults = False, responseFields = None):
		""" Validate the final state of shopper-selected options.
		
		Args:
			| productOptionSelections(productOptionSelections) - For a product with shopper-configurable options, the properties of the product options selected by the shopper.
			| 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.
			| skipInventoryCheck (bool) - If true, skip the process to validate inventory when creating this product reservation.
			| quantity (int) - The number of cart items in the shopper's active cart.
			| skipDefaults (bool) - Normally, product validation applies default extras to products that do not have options specified. If , product validation does not apply default extras to products.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| ProductValidationSummary 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/storefront/products/{productCode}/validate?skipInventoryCheck={skipInventoryCheck}&quantity={quantity}&skipDefaults={skipDefaults}&responseFields={responseFields}", "POST", UrlLocation.TenantPod, False);
		url.formatUrl("productCode", productCode);
		url.formatUrl("quantity", quantity);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("skipDefaults", skipDefaults);
		url.formatUrl("skipInventoryCheck", skipInventoryCheck);
		self.client.withResourceUrl(url).withBody(productOptionSelections).execute();
		return self.client.result();
Beispiel #3
0
	def getOrderReturnableItems(self,orderId, responseFields = None):
		""" Retrieves information about which items are eligible for return on an order.Each item displays the following information:
* One entry that represents the entire order item, whether this is a single product, a bundle, or a product or bundle with extras. (ParentProductCode == null, ExcludeProductExtras == false)

* (If the item contains product extras) 
* One entry that represents the parent product without product extras (ParentProductCode == null, ExcludeProductExtras == true)

* One entry for each extra (ParentProductCode != null, OrderItemOptionAttributeFQN != null)


* (If the parent item is a bundle)
* One entry for each item within the bundle (ParentProductCode != null, OrderItemOptionAttributeFQN == null)


		
		Args:
			| orderId (string) - Unique identifier of the order.
			| 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:
			| OrderReturnableItemCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/orders/{orderId}/returnableitems?responseFields={responseFields}", "GET", UrlLocation.TenantPod, False);
		url.formatUrl("orderId", orderId);
		url.formatUrl("responseFields", responseFields);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
    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()
	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();
Beispiel #6
0
	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();
    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()
Beispiel #8
0
	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();
    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()
	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();
    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()
	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();
    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()
    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()
	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();
Beispiel #16
0
	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();
    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()
Beispiel #18
0
	def getCategories(self,filter = None, startIndex = None, pageSize = None, sortBy = None, responseFields = None):
		""" Retrieves a list of categories according to any specified filter criteria and sort options.
		
		Args:
			| 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.
			| startIndex (int) - 
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The maximum value is 200.
			| sortBy (string) - 
			| 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:
			| CategoryPagedCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/storefront/categories/?filter={filter}&startIndex={startIndex}&pageSize={pageSize}&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();
Beispiel #19
0
	def applyCoupon(self,orderId, couponCode, updateMode = None, version = None, responseFields = None):
		""" Apply a coupon to the order.
		
		Args:
			| orderId (string) - Unique identifier of the order.
			| couponCode (string) - Alphanumeric code associated with the coupon or promotion that results in a discounted price.
			| 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}/coupons/{couponCode}?updatemode={updateMode}&version={version}&responseFields={responseFields}", "PUT", UrlLocation.TenantPod, False);
		url.formatUrl("couponCode", couponCode);
		url.formatUrl("orderId", orderId);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("updateMode", updateMode);
		url.formatUrl("version", version);
		self.client.withResourceUrl(url).execute();
		return self.client.result();
Beispiel #20
0
    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()
    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()
Beispiel #22
0
    def getSearchTuningRules(self, startIndex=None, pageSize=None, sortBy=None, filter=None, responseFields=None):
        """ admin-search Get GetSearchTuningRules description DOCUMENT_HERE 
		
		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 a  pageSize  of 25, to get the 51st through the 75th items, use  startIndex=3 .
			| 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.
			| 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.
			| filter (string) - A set of filter expressions representing the search parameters for a query: eq=equals, ne=not equals, gt=greater than, lt = less than or equals, gt = greater than or equals, lt = less than or equals, sw = starts with, or cont = contains. Optional.
			| 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:
			| 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()
Beispiel #23
0
    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()
	def getProductTypes(self,startIndex = None, pageSize = None, sortBy = None, filter = None, responseFields = None):
		""" Retrieves a list of product types according to any specified filter criteria and sort options.
		
		Args:
			| startIndex (int) - 
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The maximum value is 200.
			| sortBy (string) - 
			| filter (string) - A set of filter expressions representing the search parameters for a query: eq=equals, ne=not equals, gt=greater than, lt = less than or equals, gt = greater than or equals, lt = less than or equals, sw = starts with, or cont = contains. Optional.
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| ProductTypeCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/admin/attributedefinition/producttypes/?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();
Beispiel #25
0
	def configuredProduct(self,productOptionSelections, productCode, includeOptionDetails = False, skipInventoryCheck = False, quantity = None, responseFields = None):
		""" Creates a new product configuration each time a shopper selects a product option value. After the shopper defines values for all required product options, the shopper can add the product configuration to a cart.
		
		Args:
			| productOptionSelections(productOptionSelections) - For a product with shopper-configurable options, the properties of the product options selected by the shopper.
			| 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.
			| includeOptionDetails (bool) - If true, the response returns details about the product. If false, returns a product summary such as the product name, price, and sale price.
			| skipInventoryCheck (bool) - If true, skip the process to validate inventory when creating this product reservation.
			| quantity (int) - The number of cart items in the shopper's active cart.
			| 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:
			| ConfiguredProduct 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/storefront/products/{productCode}/configure?includeOptionDetails={includeOptionDetails}&skipInventoryCheck={skipInventoryCheck}&quantity={quantity}&responseFields={responseFields}", "POST", UrlLocation.TenantPod, False);
		url.formatUrl("includeOptionDetails", includeOptionDetails);
		url.formatUrl("productCode", productCode);
		url.formatUrl("quantity", quantity);
		url.formatUrl("responseFields", responseFields);
		url.formatUrl("skipInventoryCheck", skipInventoryCheck);
		self.client.withResourceUrl(url).withBody(productOptionSelections).execute();
		return self.client.result();
Beispiel #26
0
	def getCategories(self,startIndex = None, pageSize = None, sortBy = None, filter = None, responseFields = None):
		""" Retrieves a list of categories according to any specified filter criteria and sort options.
		
		Args:
			| startIndex (int) - 
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The maximum value is 200.
			| sortBy (string) - 
			| 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) - Use this field to include those fields which are not included by default.
		
		Returns:
			| CategoryPagedCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/admin/categories/?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();
	def getDiscounts(self,startIndex = None, pageSize = None, sortBy = None, filter = None, responseFields = None):
		""" Retrieves a list of discounts according to any specified filter criteria and sort options.
		
		Args:
			| startIndex (int) - 
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The maximum value is 200.
			| sortBy (string) - 
			| 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"
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| DiscountCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/admin/discounts/?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();
	def getProducts(self,filter = None, startIndex = None, pageSize = None, sortBy = None, responseFields = None):
		""" Retrieves a list of products that appear on the web storefront according to any specified filter criteria and sort options.
		
		Args:
			| 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"
			| startIndex (int) - 
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The maximum value is 200.
			| sortBy (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:
			| ProductCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/catalog/storefront/products/?filter={filter}&startIndex={startIndex}&pageSize={pageSize}&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();
Beispiel #29
0
	def getVisits(self,startIndex = None, pageSize = None, sortBy = None, filter = None, responseFields = None):
		""" Retrieves a list of customer visits according to any filter or sort criteria specified in the request.
		
		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 a PageSize of 25, to get the 51st through the 75th items, use startIndex=3.
			| pageSize (int) - The number of results to display on each page when creating paged results from a query. The maximum value is 200.
			| sortBy (string) - The property by which to sort results and whether the results appear in ascending (a-z) order, represented by ASC or in descending (z-a) order, represented by DESC. The sortBy parameter follows an available property. For example: "sortBy=productCode+asc"
			| 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"
			| responseFields (string) - Use this field to include those fields which are not included by default.
		
		Returns:
			| VisitCollection 
		
		Raises:
			| ApiException
		
		"""

		url = MozuUrl("/api/commerce/customer/visits/?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();
    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()