From 99679ba07ba1669491655653ac66698678b27f4d Mon Sep 17 00:00:00 2001 From: Sanjay Mandadi Date: Fri, 15 May 2015 14:49:27 -0500 Subject: [PATCH] Regen SDK for 1.17 Add public payment card test --- mozu-java-core/ChangeLog.txt | 245 ++++---- .../src/main/java/com/mozu/api/Version.java | 2 +- .../catalog/admin/CategoryClient.java | 572 +++++++++--------- .../catalog/admin/SoftAllocationClient.java | 27 + .../commerce/payments/PublicCardClient.java | 100 +++ .../fulfillment/FulfillmentInfo.java | 10 + .../commerceruntime/orders/Order.java | 24 +- .../commerceruntime/returns/ReturnItem.java | 98 +-- .../com/mozu/api/contracts/content/View.java | 22 +- .../contracts/paymentservice/PublicCard.java | 109 ++++ .../paymentservice/response/SyncResponse.java | 49 ++ .../pricingruntime/TaxableOrder.java | 78 +-- .../api/contracts/productadmin/Discount.java | 20 +- .../LocationInventoryCollection.java | 48 +- .../productadmin/SoftAllocation.java | 20 +- .../productadmin/SoftAllocationRenew.java | 38 ++ .../shippingruntime/ShippingItemRate.java | 26 +- .../mozu/api/contracts/tenant/Catalog.java | 26 +- .../catalog/admin/CategoryResource.java | 514 ++++++++-------- .../catalog/admin/SoftAllocationResource.java | 21 + .../commerce/payments/PublicCardResource.java | 101 ++++ .../commerce/catalog/admin/CategoryUrl.java | 222 +++---- .../catalog/admin/SoftAllocationUrl.java | 10 + .../urls/commerce/payments/PublicCardUrl.java | 51 ++ .../java/com/mozu/client/MozuClientImpl.java | 1 + .../test/framework/core/MozuApiTestBase.java | 5 +- .../datafactory/CategoryFactory.java | 348 +++++------ .../datafactory/PublicCardFactory.java | 84 +++ .../datafactory/SoftAllocationFactory.java | 20 + .../src/main/resources/mozu_config.properties | 27 +- .../java/com/mozu/test/PublicCardTest.java | 59 ++ 31 files changed, 1849 insertions(+), 1128 deletions(-) create mode 100644 mozu-java-core/src/main/java/com/mozu/api/clients/commerce/payments/PublicCardClient.java create mode 100644 mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/PublicCard.java create mode 100644 mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/response/SyncResponse.java create mode 100644 mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocationRenew.java create mode 100644 mozu-java-core/src/main/java/com/mozu/api/resources/commerce/payments/PublicCardResource.java create mode 100644 mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java create mode 100644 mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/PublicCardFactory.java create mode 100644 mozu-java-test/src/test/java/com/mozu/test/PublicCardTest.java diff --git a/mozu-java-core/ChangeLog.txt b/mozu-java-core/ChangeLog.txt index 9738f840..931348ae 100644 --- a/mozu-java-core/ChangeLog.txt +++ b/mozu-java-core/ChangeLog.txt @@ -8,87 +8,102 @@ Operation Params 6. Added - commerce.carts.cartextendedproperties.UpdateExtendedProperty- Param : responseFields 7. Added - commerce.carts.cartextendedproperties.UpdateExtendedProperties- Param : upsert 8. Added - commerce.carts.cartextendedproperties.UpdateExtendedProperty- Param : upsert -9. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : filter -10. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : pageSize -11. Added - commerce.catalog.admin.softallocations.GetSoftAllocation- Param : responseFields -12. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : responseFields -13. Added - commerce.catalog.admin.softallocations.DeleteSoftAllocation- Param : softAllocationId -14. Added - commerce.catalog.admin.softallocations.GetSoftAllocation- Param : softAllocationId -15. Added - commerce.catalog.admin.softallocations.ConvertToProductReservation- Param : softAllocations -16. Added - commerce.catalog.admin.softallocations.UpdateSoftAllocations- Param : softAllocations -17. Added - commerce.catalog.admin.softallocations.AddSoftAllocations- Param : softAllocationsIn -18. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : sortBy -19. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : startIndex -20. Added - commerce.catalog.storefront.productsearch.Search- Param : searchSettings -21. Added - commerce.customer.accounts.ChangePasswords- Param : accountPasswordInfos -22. Added - commerce.customer.accounts.ChangePassword- Param : unlockAccount -23. Added - commerce.orders.changemessages.DeleteChangeMessage- Param : changeMessageId -24. Added - commerce.orders.changemessages.GetChangeMessage- Param : changeMessageId -25. Added - commerce.orders.changemessages.DeleteChangeMessage- Param : draft -26. Added - commerce.orders.changemessages.GetChangeMessage- Param : draft -27. Added - commerce.orders.changemessages.GetChangeMessages- Param : filter -28. Added - commerce.orders.changemessages.DeleteChangeMessage- Param : orderId -29. Added - commerce.orders.changemessages.GetChangeMessages- Param : orderId -30. Added - commerce.orders.changemessages.GetChangeMessage- Param : orderId -31. Added - commerce.orders.changemessages.GetChangeMessages- Param : pageSize -32. Added - commerce.orders.changemessages.GetChangeMessage- Param : responseFields -33. Added - commerce.orders.changemessages.GetChangeMessages- Param : responseFields -34. Added - commerce.orders.changemessages.GetChangeMessages- Param : sortBy -35. Added - commerce.orders.changemessages.GetChangeMessages- Param : startIndex -36. Added - commerce.orders.extendedproperties.GetExtendedProperties- Param : draft -37. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : extendedProperties -38. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : extendedProperties -39. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : extendedProperty -40. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : key -41. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : key -42. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : keys -43. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : orderId -44. Added - commerce.orders.extendedproperties.GetExtendedProperties- Param : orderId -45. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : orderId -46. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : orderId -47. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : orderId -48. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : orderId -49. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : responseFields -50. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : updateMode -51. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : updateMode -52. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : updateMode -53. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : updateMode -54. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : updateMode -55. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : upsert -56. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : upsert -57. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : version -58. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : version -59. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : version -60. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : version -61. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : version -62. Added - commerce.orders.orderitems.UpdateItemDuty- Param : dutyAmount -63. Added - commerce.orders.orderitems.GetOrderItemViaLineId- Param : lineId -64. Added - platform.developer.DeletePackageFile- Param : applicationKey -65. Added - platform.developer.GetAppPackageNames- Param : applicationKey -66. Added - platform.developer.GetPackageFileMetadata- Param : applicationKey -67. Added - platform.developer.GetPackageMetadata- Param : applicationKey -68. Added - platform.developer.RenamePackageFile- Param : applicationKey -69. Added - platform.developer.UpsertPackageFile- Param : applicationKey -70. Added - platform.developer.DeletePackageFile- Param : filepath -71. Added - platform.developer.GetPackageFileMetadata- Param : filepath -72. Added - platform.developer.UpsertPackageFile- Param : filepath -73. Added - platform.developer.UpsertPackageFile- Param : lastModifiedTime -74. Added - platform.developer.GetAppVersions- Param : nsAndAppId -75. Added - platform.developer.RenamePackageFile- Param : renameInfo -76. Added - platform.developer.GetAppPackageNames- Param : responseFields -77. Added - platform.developer.GetAppVersions- Param : responseFields -78. Added - platform.developer.GetPackageMetadata- Param : responseFields -79. Added - platform.developer.GetPackageFileMetadata- Param : responseFields -80. Added - platform.developer.RenamePackageFile- Param : responseFields -81. Added - platform.developer.UpsertPackageFile- Param : responseFields -82. Added - platform.developer.UpsertPackageFile- Param : stream -83. Added - platform.extensions.GetAction- Param : actionId -84. Added - platform.extensions.UpdateExtensions- Param : extensions -85. Added - platform.extensions.GetExtensions- Param : responseFields -86. Added - platform.extensions.GetAction- Param : responseFields -87. Added - platform.extensions.UpdateExtensions- Param : responseFields -88. Added - platform.tenants.DeleteCatalogInternal- Param : allowInactives -89. Added - platform.tenants.DeleteMasterCatalogInternal- Param : allowInactives +9. Added - commerce.catalog.admin.categories.DeleteCategoryById- Param : forceDelete +10. Added - commerce.catalog.admin.categories.DeleteCategoryById- Param : reassignToParent +11. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : filter +12. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : pageSize +13. Added - commerce.catalog.admin.softallocations.GetSoftAllocation- Param : responseFields +14. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : responseFields +15. Added - commerce.catalog.admin.softallocations.DeleteSoftAllocation- Param : softAllocationId +16. Added - commerce.catalog.admin.softallocations.GetSoftAllocation- Param : softAllocationId +17. Added - commerce.catalog.admin.softallocations.RenewSoftAllocations- Param : softAllocationRenew +18. Added - commerce.catalog.admin.softallocations.ConvertToProductReservation- Param : softAllocations +19. Added - commerce.catalog.admin.softallocations.UpdateSoftAllocations- Param : softAllocations +20. Added - commerce.catalog.admin.softallocations.AddSoftAllocations- Param : softAllocationsIn +21. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : sortBy +22. Added - commerce.catalog.admin.softallocations.GetSoftAllocations- Param : startIndex +23. Added - commerce.catalog.storefront.productsearch.Search- Param : searchSettings +24. Added - commerce.customer.accounts.ChangePasswords- Param : accountPasswordInfos +25. Added - commerce.customer.accounts.ChangePassword- Param : unlockAccount +26. Added - commerce.orders.changemessages.DeleteChangeMessage- Param : changeMessageId +27. Added - commerce.orders.changemessages.GetChangeMessage- Param : changeMessageId +28. Added - commerce.orders.changemessages.DeleteChangeMessage- Param : draft +29. Added - commerce.orders.changemessages.GetChangeMessage- Param : draft +30. Added - commerce.orders.changemessages.GetChangeMessages- Param : filter +31. Added - commerce.orders.changemessages.DeleteChangeMessage- Param : orderId +32. Added - commerce.orders.changemessages.GetChangeMessages- Param : orderId +33. Added - commerce.orders.changemessages.GetChangeMessage- Param : orderId +34. Added - commerce.orders.changemessages.GetChangeMessages- Param : pageSize +35. Added - commerce.orders.changemessages.GetChangeMessage- Param : responseFields +36. Added - commerce.orders.changemessages.GetChangeMessages- Param : responseFields +37. Added - commerce.orders.changemessages.GetChangeMessages- Param : sortBy +38. Added - commerce.orders.changemessages.GetChangeMessages- Param : startIndex +39. Added - commerce.orders.extendedproperties.GetExtendedProperties- Param : draft +40. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : extendedProperties +41. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : extendedProperties +42. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : extendedProperty +43. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : key +44. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : key +45. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : keys +46. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : orderId +47. Added - commerce.orders.extendedproperties.GetExtendedProperties- Param : orderId +48. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : orderId +49. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : orderId +50. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : orderId +51. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : orderId +52. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : responseFields +53. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : updateMode +54. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : updateMode +55. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : updateMode +56. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : updateMode +57. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : updateMode +58. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : upsert +59. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : upsert +60. Added - commerce.orders.extendedproperties.AddExtendedProperties- Param : version +61. Added - commerce.orders.extendedproperties.DeleteExtendedProperties- Param : version +62. Added - commerce.orders.extendedproperties.DeleteExtendedProperty- Param : version +63. Added - commerce.orders.extendedproperties.UpdateExtendedProperties- Param : version +64. Added - commerce.orders.extendedproperties.UpdateExtendedProperty- Param : version +65. Added - commerce.orders.orderitems.UpdateItemDuty- Param : dutyAmount +66. Added - commerce.orders.orderitems.GetOrderItemViaLineId- Param : lineId +67. Added - commerce.payments.cards.Delete- Param : cardId +68. Added - commerce.payments.cards.Update- Param : cardId +69. Added - commerce.payments.cards.cardsync.SendCreateMessage- Param : cardId +70. Added - commerce.payments.cards.cardsync.SendDeleteMessage- Param : cardId +71. Added - commerce.payments.cards.cardsync.SendUpdateMessage- Param : cardId +72. Added - commerce.payments.cards.cardsync.SendCreateMessage- Param : createMsg +73. Added - commerce.payments.cards.cardsync.SendDeleteMessage- Param : deleteMsg +74. Added - commerce.payments.cards.cardsync.SendUpdateMessage- Param : updateMsg +75. Added - commerce.payments.cards.Create- Param : request +76. Added - commerce.payments.cards.Update- Param : request +77. Added - commerce.settings.general.ImportIpBlocks- Param : request +78. Added - commerce.settings.general.UpdateIPBlockSettings- Param : settings +79. Added - platform.developer.DeletePackageFile- Param : applicationKey +80. Added - platform.developer.GetAppPackageNames- Param : applicationKey +81. Added - platform.developer.GetPackageFileMetadata- Param : applicationKey +82. Added - platform.developer.GetPackageMetadata- Param : applicationKey +83. Added - platform.developer.RenamePackageFile- Param : applicationKey +84. Added - platform.developer.UpsertPackageFile- Param : applicationKey +85. Added - platform.developer.DeletePackageFile- Param : filepath +86. Added - platform.developer.GetPackageFileMetadata- Param : filepath +87. Added - platform.developer.UpsertPackageFile- Param : filepath +88. Added - platform.developer.UpsertPackageFile- Param : lastModifiedTime +89. Added - platform.developer.GetAppVersions- Param : nsAndAppId +90. Added - platform.developer.RenamePackageFile- Param : renameInfo +91. Added - platform.developer.GetAppPackageNames- Param : responseFields +92. Added - platform.developer.GetAppVersions- Param : responseFields +93. Added - platform.developer.GetPackageMetadata- Param : responseFields +94. Added - platform.developer.GetPackageFileMetadata- Param : responseFields +95. Added - platform.developer.RenamePackageFile- Param : responseFields +96. Added - platform.developer.UpsertPackageFile- Param : responseFields +97. Added - platform.developer.UpsertPackageFile- Param : stream +98. Added - platform.extensions.GetAction- Param : actionId +99. Added - platform.extensions.UpdateExtensions- Param : extensions +100. Added - platform.extensions.GetExtensions- Param : responseFields +101. Added - platform.extensions.GetAction- Param : responseFields +102. Added - platform.extensions.UpdateExtensions- Param : responseFields +103. Added - platform.tenants.DeleteCatalogInternal- Param : allowInactives +104. Added - platform.tenants.DeleteMasterCatalogInternal- Param : allowInactives Operations 0. Added - commerce.carts.cartextendedproperties.AddExtendedProperties - POST @@ -104,36 +119,50 @@ Operations 10. Added - commerce.catalog.admin.softallocations.DeleteSoftAllocation - DELETE 11. Added - commerce.catalog.admin.softallocations.GetSoftAllocation - GET 12. Added - commerce.catalog.admin.softallocations.GetSoftAllocations - GET -13. Added - commerce.catalog.admin.softallocations.UpdateSoftAllocations - PUT -14. Added - commerce.customer.accounts.ChangePasswords - POST -15. Added - commerce.orders.changemessages.DeleteChangeMessage - DELETE -16. Added - commerce.orders.changemessages.GetChangeMessage - GET -17. Added - commerce.orders.changemessages.GetChangeMessages - GET -18. Added - commerce.orders.extendedproperties.AddExtendedProperties - POST -19. Added - commerce.orders.extendedproperties.DeleteExtendedProperties - DELETE -20. Added - commerce.orders.extendedproperties.DeleteExtendedProperty - DELETE -21. Added - commerce.orders.extendedproperties.GetExtendedProperties - GET -22. Added - commerce.orders.extendedproperties.UpdateExtendedProperties - PUT -23. Added - commerce.orders.extendedproperties.UpdateExtendedProperty - PUT -24. Added - commerce.orders.orderitems.GetOrderItemViaLineId - GET -25. Added - commerce.orders.orderitems.UpdateItemDuty - PUT -26. Added - platform.developer.DeletePackageFile - DELETE -27. Added - platform.developer.GetAppPackageNames - GET -28. Added - platform.developer.GetAppVersions - GET -29. Added - platform.developer.GetPackageFileMetadata - GET -30. Added - platform.developer.GetPackageMetadata - GET -31. Added - platform.developer.RenamePackageFile - POST -32. Added - platform.developer.UpsertPackageFile - POST -33. Added - platform.extensions.GetAction - GET -34. Added - platform.extensions.GetExtensions - GET -35. Added - platform.extensions.UpdateExtensions - PUT -36. Added - platform.tenants.DeleteCatalogInternal - DELETE -37. Added - platform.tenants.DeleteMasterCatalogInternal - DELETE +13. Added - commerce.catalog.admin.softallocations.RenewSoftAllocations - POST +14. Added - commerce.catalog.admin.softallocations.UpdateSoftAllocations - PUT +15. Added - commerce.customer.accounts.ChangePasswords - POST +16. Added - commerce.orders.changemessages.DeleteChangeMessage - DELETE +17. Added - commerce.orders.changemessages.GetChangeMessage - GET +18. Added - commerce.orders.changemessages.GetChangeMessages - GET +19. Added - commerce.orders.extendedproperties.AddExtendedProperties - POST +20. Added - commerce.orders.extendedproperties.DeleteExtendedProperties - DELETE +21. Added - commerce.orders.extendedproperties.DeleteExtendedProperty - DELETE +22. Added - commerce.orders.extendedproperties.GetExtendedProperties - GET +23. Added - commerce.orders.extendedproperties.UpdateExtendedProperties - PUT +24. Added - commerce.orders.extendedproperties.UpdateExtendedProperty - PUT +25. Added - commerce.orders.orderitems.GetOrderItemViaLineId - GET +26. Added - commerce.orders.orderitems.UpdateItemDuty - PUT +27. Added - commerce.payments.cards.cardsync.SendCreateMessage - POST +28. Added - commerce.payments.cards.cardsync.SendDeleteMessage - POST +29. Added - commerce.payments.cards.cardsync.SendUpdateMessage - POST +30. Added - commerce.payments.cards.Create - POST +31. Added - commerce.payments.cards.Delete - DELETE +32. Added - commerce.payments.cards.Update - PUT +33. Added - commerce.settings.general.ExportIpBlocks - GET +34. Added - commerce.settings.general.GetIPBlocks - GET +35. Added - commerce.settings.general.GetIPBlockSettings - GET +36. Added - commerce.settings.general.ImportIpBlocks - POST +37. Added - commerce.settings.general.UpdateIPBlockSettings - PUT +38. Added - platform.developer.DeletePackageFile - DELETE +39. Added - platform.developer.GetAppPackageNames - GET +40. Added - platform.developer.GetAppVersions - GET +41. Added - platform.developer.GetPackageFileMetadata - GET +42. Added - platform.developer.GetPackageMetadata - GET +43. Added - platform.developer.RenamePackageFile - POST +44. Added - platform.developer.UpsertPackageFile - POST +45. Added - platform.extensions.GetAction - GET +46. Added - platform.extensions.GetExtensions - GET +47. Added - platform.extensions.UpdateExtensions - PUT +48. Added - platform.tenants.DeleteCatalogInternal - DELETE +49. Added - platform.tenants.DeleteMasterCatalogInternal - DELETE Resources 0. Added - commerce.carts.cartextendedproperties | commerce/carts/cartextendedproperties 1. Added - commerce.catalog.admin.softallocations | commerce/catalog/admin/softallocations 2. Added - commerce.orders.changemessages | commerce/orders/changemessages 3. Added - commerce.orders.extendedproperties | commerce/orders/extendedproperties -4. Added - platform.developer | platform/developer -5. Added - platform.extensions | platform/extensions +4. Added - commerce.payments.cards | commerce/payments/cards +5. Added - commerce.payments.cards.cardsync | commerce/payments/cards/cardsync +6. Added - platform.developer | platform/developer +7. Added - platform.extensions | platform/extensions diff --git a/mozu-java-core/src/main/java/com/mozu/api/Version.java b/mozu-java-core/src/main/java/com/mozu/api/Version.java index 49d10398..d32e5c9f 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/Version.java +++ b/mozu-java-core/src/main/java/com/mozu/api/Version.java @@ -9,5 +9,5 @@ public class Version { - public final static String API_VERSION = "1.17.15118.0"; + public final static String API_VERSION = "1.17.15134.1"; } \ No newline at end of file diff --git a/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/CategoryClient.java b/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/CategoryClient.java index 878506ce..146447b6 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/CategoryClient.java +++ b/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/CategoryClient.java @@ -1,285 +1,287 @@ -/** - * This code was auto-generated by a Codezu. - * - * Changes to this file may cause incorrect behavior and will be lost if - * the code is regenerated. - */ -package com.mozu.api.clients.commerce.catalog.admin; - -import java.util.List; -import java.util.ArrayList; -import com.mozu.api.MozuClient; -import com.mozu.api.MozuClientFactory; -import com.mozu.api.MozuUrl; -import com.mozu.api.Headers; -import com.mozu.api.security.AuthTicket; -import org.apache.commons.lang.StringUtils; -/** - * Use the Categories resource to organize products and control where they appear on the storefront. Create and maintain a hierarchy of categories and subcategories where the site will store properties. - * - */ -public class CategoryClient { - - /** - * Retrieves a list of categories according to any specified filter criteria and sort options. - *


-	 * MozuClient mozuClient=GetCategoriesClient();
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * CategoryPagedCollection categoryPagedCollection = client.Result();
-	 * 

- * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection - */ - public static MozuClient getCategoriesClient() throws Exception - { - return getCategoriesClient( null, null, null, null, null); - } - - /** - * Retrieves a list of categories according to any specified filter criteria and sort options. - *


-	 * MozuClient mozuClient=GetCategoriesClient( startIndex,  pageSize,  sortBy,  filter,  responseFields);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * CategoryPagedCollection categoryPagedCollection = client.Result();
-	 * 

- * @param filter 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. - * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. - * @param responseFields Use this field to include those fields which are not included by default. - * @param sortBy - * @param startIndex - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection - */ - public static MozuClient getCategoriesClient(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception - { - MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.getCategoriesUrl(filter, pageSize, responseFields, sortBy, startIndex); - String verb = "GET"; - Class clz = com.mozu.api.contracts.productadmin.CategoryPagedCollection.class; - MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); - mozuClient.setVerb(verb); - mozuClient.setResourceUrl(url); - return mozuClient; - - } - - /** - * Retrieves the list of subcategories within a category. - *


-	 * MozuClient mozuClient=GetChildCategoriesClient( categoryId);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * CategoryCollection categoryCollection = client.Result();
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.CategoryCollection - */ - public static MozuClient getChildCategoriesClient(Integer categoryId) throws Exception - { - return getChildCategoriesClient( categoryId, null); - } - - /** - * Retrieves the list of subcategories within a category. - *


-	 * MozuClient mozuClient=GetChildCategoriesClient( categoryId,  responseFields);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * CategoryCollection categoryCollection = client.Result();
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.CategoryCollection - */ - public static MozuClient getChildCategoriesClient(Integer categoryId, String responseFields) throws Exception - { - MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.getChildCategoriesUrl(categoryId, responseFields); - String verb = "GET"; - Class clz = com.mozu.api.contracts.productadmin.CategoryCollection.class; - MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); - mozuClient.setVerb(verb); - mozuClient.setResourceUrl(url); - return mozuClient; - - } - - /** - * Retrieves the details of a single category. - *


-	 * MozuClient mozuClient=GetCategoryClient( categoryId);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * Category category = client.Result();
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.Category - */ - public static MozuClient getCategoryClient(Integer categoryId) throws Exception - { - return getCategoryClient( categoryId, null); - } - - /** - * Retrieves the details of a single category. - *


-	 * MozuClient mozuClient=GetCategoryClient( categoryId,  responseFields);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * Category category = client.Result();
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.Category - */ - public static MozuClient getCategoryClient(Integer categoryId, String responseFields) throws Exception - { - MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.getCategoryUrl(categoryId, responseFields); - String verb = "GET"; - Class clz = com.mozu.api.contracts.productadmin.Category.class; - MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); - mozuClient.setVerb(verb); - mozuClient.setResourceUrl(url); - return mozuClient; - - } - - /** - * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. - *


-	 * MozuClient mozuClient=AddCategoryClient( category);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * Category category = client.Result();
-	 * 

- * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public static MozuClient addCategoryClient(com.mozu.api.contracts.productadmin.Category category) throws Exception - { - return addCategoryClient( category, null, null); - } - - /** - * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. - *


-	 * MozuClient mozuClient=AddCategoryClient( category,  incrementSequence,  responseFields);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * Category category = client.Result();
-	 * 

- * @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. - * @param responseFields Use this field to include those fields which are not included by default. - * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public static MozuClient addCategoryClient(com.mozu.api.contracts.productadmin.Category category, Boolean incrementSequence, String responseFields) throws Exception - { - MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.addCategoryUrl(incrementSequence, responseFields); - String verb = "POST"; - Class clz = com.mozu.api.contracts.productadmin.Category.class; - MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); - mozuClient.setVerb(verb); - mozuClient.setResourceUrl(url); - mozuClient.setBody(category); - return mozuClient; - - } - - /** - * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. - *


-	 * MozuClient mozuClient=UpdateCategoryClient( category,  categoryId);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * Category category = client.Result();
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public static MozuClient updateCategoryClient(com.mozu.api.contracts.productadmin.Category category, Integer categoryId) throws Exception - { - return updateCategoryClient( category, categoryId, null, null); - } - - /** - * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. - *


-	 * MozuClient mozuClient=UpdateCategoryClient( category,  categoryId,  cascadeVisibility,  responseFields);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * Category category = client.Result();
-	 * 

- * @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. Default: False. - * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return Mozu.Api.MozuClient - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public static MozuClient updateCategoryClient(com.mozu.api.contracts.productadmin.Category category, Integer categoryId, Boolean cascadeVisibility, String responseFields) throws Exception - { - MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.updateCategoryUrl(cascadeVisibility, categoryId, responseFields); - String verb = "PUT"; - Class clz = com.mozu.api.contracts.productadmin.Category.class; - MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); - mozuClient.setVerb(verb); - mozuClient.setResourceUrl(url); - mozuClient.setBody(category); - return mozuClient; - - } - - /** - * Deletes the category specified by its category ID. - *


-	 * MozuClient mozuClient=DeleteCategoryByIdClient( categoryId);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @return Mozu.Api.MozuClient - */ - public static MozuClient deleteCategoryByIdClient(Integer categoryId) throws Exception - { - return deleteCategoryByIdClient( categoryId, null); - } - - /** - * Deletes the category specified by its category ID. - *


-	 * MozuClient mozuClient=DeleteCategoryByIdClient( categoryId,  cascadeDelete);
-	 * client.setBaseAddress(url);
-	 * client.executeRequest();
-	 * 

- * @param cascadeDelete If true, also delete all subcategories associated with the specified category. - * @param categoryId Unique identifier of the category to modify. - * @return Mozu.Api.MozuClient - */ - public static MozuClient deleteCategoryByIdClient(Integer categoryId, Boolean cascadeDelete) throws Exception - { - MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.deleteCategoryByIdUrl(cascadeDelete, categoryId); - String verb = "DELETE"; - MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(); - mozuClient.setVerb(verb); - mozuClient.setResourceUrl(url); - return mozuClient; - - } - -} - - - +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.clients.commerce.catalog.admin; + +import java.util.List; +import java.util.ArrayList; +import com.mozu.api.MozuClient; +import com.mozu.api.MozuClientFactory; +import com.mozu.api.MozuUrl; +import com.mozu.api.Headers; +import com.mozu.api.security.AuthTicket; +import org.apache.commons.lang.StringUtils; +/** + * Use the Categories resource to organize products and control where they appear on the storefront. Create and maintain a hierarchy of categories and subcategories where the site will store properties. + * + */ +public class CategoryClient { + + /** + * Retrieves a list of categories according to any specified filter criteria and sort options. + *


+	 * MozuClient mozuClient=GetCategoriesClient();
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * CategoryPagedCollection categoryPagedCollection = client.Result();
+	 * 

+ * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection + */ + public static MozuClient getCategoriesClient() throws Exception + { + return getCategoriesClient( null, null, null, null, null); + } + + /** + * Retrieves a list of categories according to any specified filter criteria and sort options. + *


+	 * MozuClient mozuClient=GetCategoriesClient( startIndex,  pageSize,  sortBy,  filter,  responseFields);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * CategoryPagedCollection categoryPagedCollection = client.Result();
+	 * 

+ * @param filter 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. + * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. + * @param responseFields Use this field to include those fields which are not included by default. + * @param sortBy + * @param startIndex + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection + */ + public static MozuClient getCategoriesClient(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.getCategoriesUrl(filter, pageSize, responseFields, sortBy, startIndex); + String verb = "GET"; + Class clz = com.mozu.api.contracts.productadmin.CategoryPagedCollection.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + return mozuClient; + + } + + /** + * Retrieves the list of subcategories within a category. + *


+	 * MozuClient mozuClient=GetChildCategoriesClient( categoryId);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * CategoryCollection categoryCollection = client.Result();
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.CategoryCollection + */ + public static MozuClient getChildCategoriesClient(Integer categoryId) throws Exception + { + return getChildCategoriesClient( categoryId, null); + } + + /** + * Retrieves the list of subcategories within a category. + *


+	 * MozuClient mozuClient=GetChildCategoriesClient( categoryId,  responseFields);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * CategoryCollection categoryCollection = client.Result();
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.CategoryCollection + */ + public static MozuClient getChildCategoriesClient(Integer categoryId, String responseFields) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.getChildCategoriesUrl(categoryId, responseFields); + String verb = "GET"; + Class clz = com.mozu.api.contracts.productadmin.CategoryCollection.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + return mozuClient; + + } + + /** + * Retrieves the details of a single category. + *


+	 * MozuClient mozuClient=GetCategoryClient( categoryId);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * Category category = client.Result();
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.Category + */ + public static MozuClient getCategoryClient(Integer categoryId) throws Exception + { + return getCategoryClient( categoryId, null); + } + + /** + * Retrieves the details of a single category. + *


+	 * MozuClient mozuClient=GetCategoryClient( categoryId,  responseFields);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * Category category = client.Result();
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.Category + */ + public static MozuClient getCategoryClient(Integer categoryId, String responseFields) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.getCategoryUrl(categoryId, responseFields); + String verb = "GET"; + Class clz = com.mozu.api.contracts.productadmin.Category.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + return mozuClient; + + } + + /** + * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. + *


+	 * MozuClient mozuClient=AddCategoryClient( category);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * Category category = client.Result();
+	 * 

+ * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public static MozuClient addCategoryClient(com.mozu.api.contracts.productadmin.Category category) throws Exception + { + return addCategoryClient( category, null, null); + } + + /** + * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. + *


+	 * MozuClient mozuClient=AddCategoryClient( category,  incrementSequence,  responseFields);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * Category category = client.Result();
+	 * 

+ * @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. + * @param responseFields Use this field to include those fields which are not included by default. + * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public static MozuClient addCategoryClient(com.mozu.api.contracts.productadmin.Category category, Boolean incrementSequence, String responseFields) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.addCategoryUrl(incrementSequence, responseFields); + String verb = "POST"; + Class clz = com.mozu.api.contracts.productadmin.Category.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + mozuClient.setBody(category); + return mozuClient; + + } + + /** + * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. + *


+	 * MozuClient mozuClient=UpdateCategoryClient( category,  categoryId);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * Category category = client.Result();
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public static MozuClient updateCategoryClient(com.mozu.api.contracts.productadmin.Category category, Integer categoryId) throws Exception + { + return updateCategoryClient( category, categoryId, null, null); + } + + /** + * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. + *


+	 * MozuClient mozuClient=UpdateCategoryClient( category,  categoryId,  cascadeVisibility,  responseFields);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * Category category = client.Result();
+	 * 

+ * @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. Default: False. + * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public static MozuClient updateCategoryClient(com.mozu.api.contracts.productadmin.Category category, Integer categoryId, Boolean cascadeVisibility, String responseFields) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.updateCategoryUrl(cascadeVisibility, categoryId, responseFields); + String verb = "PUT"; + Class clz = com.mozu.api.contracts.productadmin.Category.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + mozuClient.setBody(category); + return mozuClient; + + } + + /** + * Deletes the category specified by its category ID. + *


+	 * MozuClient mozuClient=DeleteCategoryByIdClient( categoryId);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @return Mozu.Api.MozuClient + */ + public static MozuClient deleteCategoryByIdClient(Integer categoryId) throws Exception + { + return deleteCategoryByIdClient( categoryId, null, null, null); + } + + /** + * Deletes the category specified by its category ID. + *


+	 * MozuClient mozuClient=DeleteCategoryByIdClient( categoryId,  cascadeDelete,  forceDelete,  reassignToParent);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * 

+ * @param cascadeDelete If true, also delete all subcategories associated with the specified category. + * @param categoryId Unique identifier of the category to modify. + * @param forceDelete + * @param reassignToParent + * @return Mozu.Api.MozuClient + */ + public static MozuClient deleteCategoryByIdClient(Integer categoryId, Boolean cascadeDelete, Boolean forceDelete, Boolean reassignToParent) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.CategoryUrl.deleteCategoryByIdUrl(cascadeDelete, categoryId, forceDelete, reassignToParent); + String verb = "DELETE"; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + return mozuClient; + + } + +} + + + diff --git a/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/SoftAllocationClient.java b/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/SoftAllocationClient.java index 800dddd3..8ceee183 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/SoftAllocationClient.java +++ b/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/SoftAllocationClient.java @@ -164,6 +164,33 @@ public static MozuClient

+	 * MozuClient> mozuClient=RenewSoftAllocationsClient( softAllocationRenew);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * SoftAllocation softAllocation = client.Result();
+	 * 

+ * @param dataViewMode DataViewMode + * @param softAllocationRenew + * @return Mozu.Api.MozuClient > + * @see com.mozu.api.contracts.productadmin.SoftAllocation + * @see com.mozu.api.contracts.productadmin.SoftAllocationRenew + */ + public static MozuClient> renewSoftAllocationsClient(com.mozu.api.contracts.productadmin.SoftAllocationRenew softAllocationRenew) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.SoftAllocationUrl.renewSoftAllocationsUrl(); + String verb = "POST"; + Class clz = new ArrayList(){}.getClass(); + MozuClient> mozuClient = (MozuClient>) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + mozuClient.setBody(softAllocationRenew); + return mozuClient; + + } + /** * *


diff --git a/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/payments/PublicCardClient.java b/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/payments/PublicCardClient.java
new file mode 100644
index 00000000..2a1e4c0c
--- /dev/null
+++ b/mozu-java-core/src/main/java/com/mozu/api/clients/commerce/payments/PublicCardClient.java
@@ -0,0 +1,100 @@
+/**
+ *     This code was auto-generated by a Codezu.     
+ *
+ *     Changes to this file may cause incorrect behavior and will be lost if
+ *     the code is regenerated.
+ */
+package com.mozu.api.clients.commerce.payments;
+
+import java.util.List;
+import java.util.ArrayList;
+import com.mozu.api.MozuClient;
+import com.mozu.api.MozuClientFactory;
+import com.mozu.api.MozuUrl;
+import com.mozu.api.Headers;
+import com.mozu.api.security.AuthTicket;
+import org.apache.commons.lang.StringUtils;
+/** 
+ * 
+ * 
+ */
+public class PublicCardClient {
+	
+	/**
+	 * 
+	 * 


+	 * MozuClient mozuClient=CreateClient( request);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * SyncResponse syncResponse = client.Result();
+	 * 

+ * @param request + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.paymentservice.response.SyncResponse + * @see com.mozu.api.contracts.paymentservice.PublicCard + */ + public static MozuClient createClient(com.mozu.api.contracts.paymentservice.PublicCard request) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.payments.PublicCardUrl.createUrl(); + String verb = "POST"; + Class clz = com.mozu.api.contracts.paymentservice.response.SyncResponse.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + mozuClient.setBody(request); + return mozuClient; + + } + + /** + * + *


+	 * MozuClient mozuClient=UpdateClient( request,  cardId);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * SyncResponse syncResponse = client.Result();
+	 * 

+ * @param cardId + * @param request + * @return Mozu.Api.MozuClient + * @see com.mozu.api.contracts.paymentservice.response.SyncResponse + * @see com.mozu.api.contracts.paymentservice.PublicCard + */ + public static MozuClient updateClient(com.mozu.api.contracts.paymentservice.PublicCard request, String cardId) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.payments.PublicCardUrl.updateUrl(cardId); + String verb = "PUT"; + Class clz = com.mozu.api.contracts.paymentservice.response.SyncResponse.class; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(clz); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + mozuClient.setBody(request); + return mozuClient; + + } + + /** + * + *


+	 * MozuClient mozuClient=DeleteClient( cardId);
+	 * client.setBaseAddress(url);
+	 * client.executeRequest();
+	 * 

+ * @param cardId + * @return Mozu.Api.MozuClient + */ + public static MozuClient deleteClient(String cardId) throws Exception + { + MozuUrl url = com.mozu.api.urls.commerce.payments.PublicCardUrl.deleteUrl(cardId); + String verb = "DELETE"; + MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(); + mozuClient.setVerb(verb); + mozuClient.setResourceUrl(url); + return mozuClient; + + } + +} + + + diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/fulfillment/FulfillmentInfo.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/fulfillment/FulfillmentInfo.java index 0fb131fd..823ff68a 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/fulfillment/FulfillmentInfo.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/fulfillment/FulfillmentInfo.java @@ -73,6 +73,16 @@ public void setAuditInfo(AuditInfo auditInfo) { this.auditInfo = auditInfo; } + protected com.fasterxml.jackson.databind.JsonNode data; + + public com.fasterxml.jackson.databind.JsonNode getData() { + return this.data; + } + + public void setData(com.fasterxml.jackson.databind.JsonNode data) { + this.data = data; + } + /** * The contact information of the person receiving the shipment or performing the pickup. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/orders/Order.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/orders/Order.java index 14690116..bde96b0e 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/orders/Order.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/orders/Order.java @@ -10,6 +10,7 @@ import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.joda.time.DateTime; +import com.mozu.api.contracts.commerceruntime.orders.OrderItem; import com.mozu.api.contracts.commerceruntime.commerce.Adjustment; import com.mozu.api.contracts.commerceruntime.orders.OrderAttribute; import com.mozu.api.contracts.core.AuditInfo; @@ -20,7 +21,6 @@ import com.mozu.api.contracts.commerceruntime.fulfillment.FulfillmentInfo; import com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount; import com.mozu.api.contracts.commerceruntime.discounts.InvalidCoupon; -import com.mozu.api.contracts.commerceruntime.orders.OrderItem; import com.mozu.api.contracts.commerceruntime.orders.OrderNote; import com.mozu.api.contracts.commerceruntime.fulfillment.Package; import com.mozu.api.contracts.commerceruntime.payments.Payment; @@ -823,6 +823,17 @@ public void setWebSessionId(String webSessionId) { this.webSessionId = webSessionId; } + /** + * An array list of objects in the returned collection. + */ + protected List items; + public List getItems() { + return this.items; + } + public void setItems(List items) { + this.items = items; + } + /** * Properties of an ad-hoc price adjustment for an order. */ @@ -948,17 +959,6 @@ public void setInvalidCoupons(List invalidCoupons) { this.invalidCoupons = invalidCoupons; } - /** - * An array list of objects in the returned collection. - */ - protected List items; - public List getItems() { - return this.items; - } - public void setItems(List items) { - this.items = items; - } - /** * Paged list collection of note content for objects including customers, orders, and returns. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/returns/ReturnItem.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/returns/ReturnItem.java index a10a3027..6c7700e3 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/returns/ReturnItem.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/commerceruntime/returns/ReturnItem.java @@ -24,55 +24,6 @@ public class ReturnItem implements Serializable // Default Serial Version UID private static final long serialVersionUID = 1L; - /** - * Unique identifier of the source product property. For a product field it will be the name of the field. For a product attribute it will be the Attribute FQN. - */ - protected String id; - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - /** - * Unique identifier of the order item associated with a validation message, order, or return. - */ - protected String orderItemId; - - public String getOrderItemId() { - return this.orderItemId; - } - - public void setOrderItemId(String orderItemId) { - this.orderItemId = orderItemId; - } - - protected Integer orderLineId; - - public Integer getOrderLineId() { - return this.orderLineId; - } - - public void setOrderLineId(Integer orderLineId) { - this.orderLineId = orderLineId; - } - - /** - * The total value of the product returned to the merchant for accounting purposes, calculated by multiplying the cost of the item by its quantity returned. - */ - protected Double productLossAmount; - - public Double getProductLossAmount() { - return this.productLossAmount; - } - - public void setProductLossAmount(Double productLossAmount) { - this.productLossAmount = productLossAmount; - } - /** * The total tax amount levied on the product loss amount. */ @@ -151,6 +102,55 @@ public void setShippingLossTaxAmount(Double shippingLossTaxAmount) { this.shippingLossTaxAmount = shippingLossTaxAmount; } + /** + * Unique identifier of the source product property. For a product field it will be the name of the field. For a product attribute it will be the Attribute FQN. + */ + protected String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * Unique identifier of the order item associated with a validation message, order, or return. + */ + protected String orderItemId; + + public String getOrderItemId() { + return this.orderItemId; + } + + public void setOrderItemId(String orderItemId) { + this.orderItemId = orderItemId; + } + + protected Integer orderLineId; + + public Integer getOrderLineId() { + return this.orderLineId; + } + + public void setOrderLineId(Integer orderLineId) { + this.orderLineId = orderLineId; + } + + /** + * The total value of the product returned to the merchant for accounting purposes, calculated by multiplying the cost of the item by its quantity returned. + */ + protected Double productLossAmount; + + public Double getProductLossAmount() { + return this.productLossAmount; + } + + public void setProductLossAmount(Double productLossAmount) { + this.productLossAmount = productLossAmount; + } + /** * Properties of a collection of component products that make up a single product bundle with its own product code. Tenants can define product bundles for any product type that supports the Bundle product usage. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/content/View.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/content/View.java index 20d8a714..248160b8 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/content/View.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/content/View.java @@ -21,17 +21,6 @@ public class View implements Serializable // Default Serial Version UID private static final long serialVersionUID = 1L; - /** - * List description of usages for content within a view and scope. - */ - protected List usages; - public List getUsages() { - return this.usages; - } - public void setUsages(List usages) { - this.usages = usages; - } - /** * The isVisibleInStorefront field indicates whether documents in the view can be accessed from the Mozu storefront application. If true, the storefront application and storefront client application (javascript tier) can GET documents from the view. */ @@ -58,6 +47,17 @@ public void setName(String name) { this.name = name; } + /** + * List description of usages for content within a view and scope. + */ + protected List usages; + public List getUsages() { + return this.usages; + } + public void setUsages(List usages) { + this.usages = usages; + } + /** * The list of fields to display for a view or an associated schema. For example, the address schema would display fields for postal addresses. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/PublicCard.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/PublicCard.java new file mode 100644 index 00000000..935d55c6 --- /dev/null +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/PublicCard.java @@ -0,0 +1,109 @@ +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.contracts.paymentservice; + +import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.joda.time.DateTime; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class PublicCard implements Serializable +{ + // Default Serial Version UID + private static final long serialVersionUID = 1L; + + protected String cardHolderName; + + public String getCardHolderName() { + return this.cardHolderName; + } + + public void setCardHolderName(String cardHolderName) { + this.cardHolderName = cardHolderName; + } + + protected Integer cardIssueMonth; + + public Integer getCardIssueMonth() { + return this.cardIssueMonth; + } + + public void setCardIssueMonth(Integer cardIssueMonth) { + this.cardIssueMonth = cardIssueMonth; + } + + protected String cardIssueNumber; + + public String getCardIssueNumber() { + return this.cardIssueNumber; + } + + public void setCardIssueNumber(String cardIssueNumber) { + this.cardIssueNumber = cardIssueNumber; + } + + protected Integer cardIssueYear; + + public Integer getCardIssueYear() { + return this.cardIssueYear; + } + + public void setCardIssueYear(Integer cardIssueYear) { + this.cardIssueYear = cardIssueYear; + } + + protected String cardNumber; + + public String getCardNumber() { + return this.cardNumber; + } + + public void setCardNumber(String cardNumber) { + this.cardNumber = cardNumber; + } + + protected String cardType; + + public String getCardType() { + return this.cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + protected String cvv; + + public String getCvv() { + return this.cvv; + } + + public void setCvv(String cvv) { + this.cvv = cvv; + } + + protected Integer expireMonth; + + public Integer getExpireMonth() { + return this.expireMonth; + } + + public void setExpireMonth(Integer expireMonth) { + this.expireMonth = expireMonth; + } + + protected Integer expireYear; + + public Integer getExpireYear() { + return this.expireYear; + } + + public void setExpireYear(Integer expireYear) { + this.expireYear = expireYear; + } + +} diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/response/SyncResponse.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/response/SyncResponse.java new file mode 100644 index 00000000..d677c900 --- /dev/null +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/paymentservice/response/SyncResponse.java @@ -0,0 +1,49 @@ +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.contracts.paymentservice.response; + +import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.joda.time.DateTime; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SyncResponse implements Serializable +{ + // Default Serial Version UID + private static final long serialVersionUID = 1L; + + protected String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + protected Boolean isSuccessful; + + public Boolean getIsSuccessful() { + return this.isSuccessful; + } + + public void setIsSuccessful(Boolean isSuccessful) { + this.isSuccessful = isSuccessful; + } + + protected String numberPart; + + public String getNumberPart() { + return this.numberPart; + } + + public void setNumberPart(String numberPart) { + this.numberPart = numberPart; + } + +} diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/pricingruntime/TaxableOrder.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/pricingruntime/TaxableOrder.java index 9fd3bf4f..4cf088e4 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/pricingruntime/TaxableOrder.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/pricingruntime/TaxableOrder.java @@ -22,45 +22,6 @@ public class TaxableOrder implements Serializable // Default Serial Version UID private static final long serialVersionUID = 1L; - /** - * 3-letter ISO 4217 standard global currency code. Currently, only "USD" (US Dollar) is supported. - */ - protected String currencyCode; - - public String getCurrencyCode() { - return this.currencyCode; - } - - public void setCurrencyCode(String currencyCode) { - this.currencyCode = currencyCode; - } - - /** - * The combined price for all handling costs calculated together for shipped orders, not for digital or in-store pickup. This includes all handling costs per the product line items and options, excluding taxes and discounts. - */ - protected Double handlingFee; - - public Double getHandlingFee() { - return this.handlingFee; - } - - public void setHandlingFee(Double handlingFee) { - this.handlingFee = handlingFee; - } - - /** - * The date and time the order was submitted for purchase. - */ - protected DateTime orderDate; - - public DateTime getOrderDate() { - return this.orderDate; - } - - public void setOrderDate(DateTime orderDate) { - this.orderDate = orderDate; - } - /** * The unique identifier of the original order, used to track order changes for tax purposes. */ @@ -113,6 +74,45 @@ public void setTaxRequestType(String taxRequestType) { this.taxRequestType = taxRequestType; } + /** + * 3-letter ISO 4217 standard global currency code. Currently, only "USD" (US Dollar) is supported. + */ + protected String currencyCode; + + public String getCurrencyCode() { + return this.currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + /** + * The combined price for all handling costs calculated together for shipped orders, not for digital or in-store pickup. This includes all handling costs per the product line items and options, excluding taxes and discounts. + */ + protected Double handlingFee; + + public Double getHandlingFee() { + return this.handlingFee; + } + + public void setHandlingFee(Double handlingFee) { + this.handlingFee = handlingFee; + } + + /** + * The date and time the order was submitted for purchase. + */ + protected DateTime orderDate; + + public DateTime getOrderDate() { + return this.orderDate; + } + + public void setOrderDate(DateTime orderDate) { + this.orderDate = orderDate; + } + /** * List of line items associated with the order. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/Discount.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/Discount.java index 92674b0f..cd9641b1 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/Discount.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/Discount.java @@ -23,16 +23,6 @@ public class Discount implements Serializable // Default Serial Version UID private static final long serialVersionUID = 1L; - protected Boolean canBeDeleted; - - public Boolean getCanBeDeleted() { - return this.canBeDeleted; - } - - public void setCanBeDeleted(Boolean canBeDeleted) { - this.canBeDeleted = canBeDeleted; - } - /** * The integer amount of the discount. For example, an entry of "10" could represent a discount of $10.00 or a discount of 10%, depending on the type. */ @@ -59,6 +49,16 @@ public void setAmountType(String amountType) { this.amountType = amountType; } + protected Boolean canBeDeleted; + + public Boolean getCanBeDeleted() { + return this.canBeDeleted; + } + + public void setCanBeDeleted(Boolean canBeDeleted) { + this.canBeDeleted = canBeDeleted; + } + /** * The number of times this discount has been redeemed. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/LocationInventoryCollection.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/LocationInventoryCollection.java index 3d117d4d..10489bc7 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/LocationInventoryCollection.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/LocationInventoryCollection.java @@ -22,55 +22,55 @@ public class LocationInventoryCollection implements Serializable private static final long serialVersionUID = 1L; /** - * 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. + * The number of pages returned based on the startIndex and pageSize values specified. This value is system-supplied and read-only. */ - protected Integer startIndex; + protected Integer pageCount; - public Integer getStartIndex() { - return this.startIndex; + public Integer getPageCount() { + return this.pageCount; } - public void setStartIndex(Integer startIndex) { - this.startIndex = startIndex; + public void setPageCount(Integer pageCount) { + this.pageCount = pageCount; } /** - * The number of results listed in the query collection, represented by a signed 64-bit (8-byte) integer. This value is system-supplied and read-only. + * The number of results to display on each page when creating paged results from a query. The maximum value is 200. */ - protected Integer totalCount; + protected Integer pageSize; - public Integer getTotalCount() { - return this.totalCount; + public Integer getPageSize() { + return this.pageSize; } - public void setTotalCount(Integer totalCount) { - this.totalCount = totalCount; + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; } /** - * The number of pages returned based on the startIndex and pageSize values specified. This value is system-supplied and read-only. + * 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. */ - protected Integer pageCount; + protected Integer startIndex; - public Integer getPageCount() { - return this.pageCount; + public Integer getStartIndex() { + return this.startIndex; } - public void setPageCount(Integer pageCount) { - this.pageCount = pageCount; + public void setStartIndex(Integer startIndex) { + this.startIndex = startIndex; } /** - * The number of results to display on each page when creating paged results from a query. The maximum value is 200. + * The number of results listed in the query collection, represented by a signed 64-bit (8-byte) integer. This value is system-supplied and read-only. */ - protected Integer pageSize; + protected Integer totalCount; - public Integer getPageSize() { - return this.pageSize; + public Integer getTotalCount() { + return this.totalCount; } - public void setPageSize(Integer pageSize) { - this.pageSize = pageSize; + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; } /** diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocation.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocation.java index 13acc233..d28e0363 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocation.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocation.java @@ -67,24 +67,24 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - protected String refrenceId; + protected String referenceId; - public String getRefrenceId() { - return this.refrenceId; + public String getReferenceId() { + return this.referenceId; } - public void setRefrenceId(String refrenceId) { - this.refrenceId = refrenceId; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - protected String refrenceItemId; + protected String referenceItemId; - public String getRefrenceItemId() { - return this.refrenceItemId; + public String getReferenceItemId() { + return this.referenceItemId; } - public void setRefrenceItemId(String refrenceItemId) { - this.refrenceItemId = refrenceItemId; + public void setReferenceItemId(String referenceItemId) { + this.referenceItemId = referenceItemId; } protected AuditInfo auditInfo; diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocationRenew.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocationRenew.java new file mode 100644 index 00000000..37f8b41a --- /dev/null +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/productadmin/SoftAllocationRenew.java @@ -0,0 +1,38 @@ +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.contracts.productadmin; + +import java.util.List; +import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.joda.time.DateTime; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SoftAllocationRenew implements Serializable +{ + // Default Serial Version UID + private static final long serialVersionUID = 1L; + + protected DateTime expiresAt; + + public DateTime getExpiresAt() { + return this.expiresAt; + } + + public void setExpiresAt(DateTime expiresAt) { + this.expiresAt = expiresAt; + } + + protected List ids; + public List getIds() { + return this.ids; + } + public void setIds(List ids) { + this.ids = ids; + } + +} diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/shippingruntime/ShippingItemRate.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/shippingruntime/ShippingItemRate.java index dd5657ba..46295662 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/shippingruntime/ShippingItemRate.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/shippingruntime/ShippingItemRate.java @@ -19,6 +19,19 @@ public class ShippingItemRate implements Serializable // Default Serial Version UID private static final long serialVersionUID = 1L; + /** + * The specified quantity of objects and items. This property is used for numerous object types including products, options, components within a product bundle, cart and order items, returned items, shipping line items, items in a digital product. and items associated with types and reservations. + */ + protected Integer quantity; + + public Integer getQuantity() { + return this.quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + /** * The calculated shipping amount for an item in a shipment. */ @@ -45,17 +58,4 @@ public void setItemId(String itemId) { this.itemId = itemId; } - /** - * The specified quantity of objects and items. This property is used for numerous object types including products, options, components within a product bundle, cart and order items, returned items, shipping line items, items in a digital product. and items associated with types and reservations. - */ - protected Integer quantity; - - public Integer getQuantity() { - return this.quantity; - } - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - } diff --git a/mozu-java-core/src/main/java/com/mozu/api/contracts/tenant/Catalog.java b/mozu-java-core/src/main/java/com/mozu/api/contracts/tenant/Catalog.java index 3e527b93..5272fd81 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/contracts/tenant/Catalog.java +++ b/mozu-java-core/src/main/java/com/mozu/api/contracts/tenant/Catalog.java @@ -19,19 +19,6 @@ public class Catalog implements Serializable // Default Serial Version UID private static final long serialVersionUID = 1L; - /** - * Unique identifier of the source product property. For a product field it will be the name of the field. For a product attribute it will be the Attribute FQN. - */ - protected Integer id; - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - /** * The date time in UTC format set when the object was created. */ @@ -84,6 +71,19 @@ public void setDeleteDate(DateTime deleteDate) { this.deleteDate = deleteDate; } + /** + * Unique identifier of the source product property. For a product field it will be the name of the field. For a product attribute it will be the Attribute FQN. + */ + protected Integer id; + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + /** * Indicates if the object is deleted. If true, the object has been deleted. This may affect associated child members and objects. For example, a deleted master catalog affects all associated catalogs. */ diff --git a/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/CategoryResource.java b/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/CategoryResource.java index 7b946b56..a3808127 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/CategoryResource.java +++ b/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/CategoryResource.java @@ -1,256 +1,258 @@ -/** - * This code was auto-generated by a Codezu. - * - * Changes to this file may cause incorrect behavior and will be lost if - * the code is regenerated. - */ -package com.mozu.api.resources.commerce.catalog.admin; - -import com.mozu.api.ApiContext; -import java.util.List; -import java.util.ArrayList; -import com.mozu.api.MozuClient; -import com.mozu.api.MozuClientFactory; -import com.mozu.api.MozuUrl; -import com.mozu.api.Headers; -import com.mozu.api.security.AuthTicket; -import org.apache.commons.lang.StringUtils; -/** - * Use the Categories resource to organize products and control where they appear on the storefront. Create and maintain a hierarchy of categories and subcategories where the site will store properties. - * - */ -public class CategoryResource { - /// - /// - /// - private ApiContext _apiContext; - - - public CategoryResource(ApiContext apiContext) - { - _apiContext = apiContext; - } - - - /** - * Retrieves a list of categories according to any specified filter criteria and sort options. - *


-	 *	Category category = new Category();
-	 *	CategoryPagedCollection categoryPagedCollection = category.getCategories();
-	 * 

- * @return com.mozu.api.contracts.productadmin.CategoryPagedCollection - * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection - */ - public com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories() throws Exception - { - return getCategories( null, null, null, null, null); - } - - /** - * Retrieves a list of categories according to any specified filter criteria and sort options. - *


-	 *	Category category = new Category();
-	 *	CategoryPagedCollection categoryPagedCollection = category.getCategories( startIndex,  pageSize,  sortBy,  filter,  responseFields);
-	 * 

- * @param filter 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. - * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. - * @param responseFields Use this field to include those fields which are not included by default. - * @param sortBy - * @param startIndex - * @return com.mozu.api.contracts.productadmin.CategoryPagedCollection - * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection - */ - public com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception - { - MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.getCategoriesClient( startIndex, pageSize, sortBy, filter, responseFields); - client.setContext(_apiContext); - client.executeRequest(); - return client.getResult(); - - } - - /** - * Retrieves the list of subcategories within a category. - *


-	 *	Category category = new Category();
-	 *	CategoryCollection categoryCollection = category.getChildCategories( categoryId);
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @return com.mozu.api.contracts.productadmin.CategoryCollection - * @see com.mozu.api.contracts.productadmin.CategoryCollection - */ - public com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(Integer categoryId) throws Exception - { - return getChildCategories( categoryId, null); - } - - /** - * Retrieves the list of subcategories within a category. - *


-	 *	Category category = new Category();
-	 *	CategoryCollection categoryCollection = category.getChildCategories( categoryId,  responseFields);
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return com.mozu.api.contracts.productadmin.CategoryCollection - * @see com.mozu.api.contracts.productadmin.CategoryCollection - */ - public com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(Integer categoryId, String responseFields) throws Exception - { - MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.getChildCategoriesClient( categoryId, responseFields); - client.setContext(_apiContext); - client.executeRequest(); - return client.getResult(); - - } - - /** - * Retrieves the details of a single category. - *


-	 *	Category category = new Category();
-	 *	Category category = category.getCategory( categoryId);
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @return com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public com.mozu.api.contracts.productadmin.Category getCategory(Integer categoryId) throws Exception - { - return getCategory( categoryId, null); - } - - /** - * Retrieves the details of a single category. - *


-	 *	Category category = new Category();
-	 *	Category category = category.getCategory( categoryId,  responseFields);
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public com.mozu.api.contracts.productadmin.Category getCategory(Integer categoryId, String responseFields) throws Exception - { - MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.getCategoryClient( categoryId, responseFields); - client.setContext(_apiContext); - client.executeRequest(); - return client.getResult(); - - } - - /** - * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. - *


-	 *	Category category = new Category();
-	 *	Category category = category.addCategory( category);
-	 * 

- * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public com.mozu.api.contracts.productadmin.Category addCategory(com.mozu.api.contracts.productadmin.Category category) throws Exception - { - return addCategory( category, null, null); - } - - /** - * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. - *


-	 *	Category category = new Category();
-	 *	Category category = category.addCategory( category,  incrementSequence,  responseFields);
-	 * 

- * @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. - * @param responseFields Use this field to include those fields which are not included by default. - * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public com.mozu.api.contracts.productadmin.Category addCategory(com.mozu.api.contracts.productadmin.Category category, Boolean incrementSequence, String responseFields) throws Exception - { - MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.addCategoryClient( category, incrementSequence, responseFields); - client.setContext(_apiContext); - client.executeRequest(); - return client.getResult(); - - } - - /** - * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. - *


-	 *	Category category = new Category();
-	 *	Category category = category.updateCategory( category,  categoryId);
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public com.mozu.api.contracts.productadmin.Category updateCategory(com.mozu.api.contracts.productadmin.Category category, Integer categoryId) throws Exception - { - return updateCategory( category, categoryId, null, null); - } - - /** - * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. - *


-	 *	Category category = new Category();
-	 *	Category category = category.updateCategory( category,  categoryId,  cascadeVisibility,  responseFields);
-	 * 

- * @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. Default: False. - * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. - * @return com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - * @see com.mozu.api.contracts.productadmin.Category - */ - public com.mozu.api.contracts.productadmin.Category updateCategory(com.mozu.api.contracts.productadmin.Category category, Integer categoryId, Boolean cascadeVisibility, String responseFields) throws Exception - { - MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.updateCategoryClient( category, categoryId, cascadeVisibility, responseFields); - client.setContext(_apiContext); - client.executeRequest(); - return client.getResult(); - - } - - /** - * Deletes the category specified by its category ID. - *


-	 *	Category category = new Category();
-	 *	category.deleteCategoryById( categoryId);
-	 * 

- * @param categoryId Unique identifier of the category to modify. - * @return - */ - public void deleteCategoryById(Integer categoryId) throws Exception - { - deleteCategoryById( categoryId, null); - } - - /** - * Deletes the category specified by its category ID. - *


-	 *	Category category = new Category();
-	 *	category.deleteCategoryById( categoryId,  cascadeDelete);
-	 * 

- * @param cascadeDelete If true, also delete all subcategories associated with the specified category. - * @param categoryId Unique identifier of the category to modify. - * @return - */ - public void deleteCategoryById(Integer categoryId, Boolean cascadeDelete) throws Exception - { - MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.deleteCategoryByIdClient( categoryId, cascadeDelete); - client.setContext(_apiContext); - client.executeRequest(); - client.cleanupHttpConnection(); - - } - -} - - - +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.resources.commerce.catalog.admin; + +import com.mozu.api.ApiContext; +import java.util.List; +import java.util.ArrayList; +import com.mozu.api.MozuClient; +import com.mozu.api.MozuClientFactory; +import com.mozu.api.MozuUrl; +import com.mozu.api.Headers; +import com.mozu.api.security.AuthTicket; +import org.apache.commons.lang.StringUtils; +/** + * Use the Categories resource to organize products and control where they appear on the storefront. Create and maintain a hierarchy of categories and subcategories where the site will store properties. + * + */ +public class CategoryResource { + /// + /// + /// + private ApiContext _apiContext; + + + public CategoryResource(ApiContext apiContext) + { + _apiContext = apiContext; + } + + + /** + * Retrieves a list of categories according to any specified filter criteria and sort options. + *


+	 *	Category category = new Category();
+	 *	CategoryPagedCollection categoryPagedCollection = category.getCategories();
+	 * 

+ * @return com.mozu.api.contracts.productadmin.CategoryPagedCollection + * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection + */ + public com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories() throws Exception + { + return getCategories( null, null, null, null, null); + } + + /** + * Retrieves a list of categories according to any specified filter criteria and sort options. + *


+	 *	Category category = new Category();
+	 *	CategoryPagedCollection categoryPagedCollection = category.getCategories( startIndex,  pageSize,  sortBy,  filter,  responseFields);
+	 * 

+ * @param filter 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. + * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. + * @param responseFields Use this field to include those fields which are not included by default. + * @param sortBy + * @param startIndex + * @return com.mozu.api.contracts.productadmin.CategoryPagedCollection + * @see com.mozu.api.contracts.productadmin.CategoryPagedCollection + */ + public com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.getCategoriesClient( startIndex, pageSize, sortBy, filter, responseFields); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * Retrieves the list of subcategories within a category. + *


+	 *	Category category = new Category();
+	 *	CategoryCollection categoryCollection = category.getChildCategories( categoryId);
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @return com.mozu.api.contracts.productadmin.CategoryCollection + * @see com.mozu.api.contracts.productadmin.CategoryCollection + */ + public com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(Integer categoryId) throws Exception + { + return getChildCategories( categoryId, null); + } + + /** + * Retrieves the list of subcategories within a category. + *


+	 *	Category category = new Category();
+	 *	CategoryCollection categoryCollection = category.getChildCategories( categoryId,  responseFields);
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return com.mozu.api.contracts.productadmin.CategoryCollection + * @see com.mozu.api.contracts.productadmin.CategoryCollection + */ + public com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(Integer categoryId, String responseFields) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.getChildCategoriesClient( categoryId, responseFields); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * Retrieves the details of a single category. + *


+	 *	Category category = new Category();
+	 *	Category category = category.getCategory( categoryId);
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @return com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public com.mozu.api.contracts.productadmin.Category getCategory(Integer categoryId) throws Exception + { + return getCategory( categoryId, null); + } + + /** + * Retrieves the details of a single category. + *


+	 *	Category category = new Category();
+	 *	Category category = category.getCategory( categoryId,  responseFields);
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public com.mozu.api.contracts.productadmin.Category getCategory(Integer categoryId, String responseFields) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.getCategoryClient( categoryId, responseFields); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. + *


+	 *	Category category = new Category();
+	 *	Category category = category.addCategory( category);
+	 * 

+ * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public com.mozu.api.contracts.productadmin.Category addCategory(com.mozu.api.contracts.productadmin.Category category) throws Exception + { + return addCategory( category, null, null); + } + + /** + * Adds a new category to the site's category hierarchy. Specify a ParentCategoryID to determine where to place the category in the hierarchy. If no ParentCategoryID is specified, the new category is a top-level category. + *


+	 *	Category category = new Category();
+	 *	Category category = category.addCategory( category,  incrementSequence,  responseFields);
+	 * 

+ * @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. + * @param responseFields Use this field to include those fields which are not included by default. + * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public com.mozu.api.contracts.productadmin.Category addCategory(com.mozu.api.contracts.productadmin.Category category, Boolean incrementSequence, String responseFields) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.addCategoryClient( category, incrementSequence, responseFields); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. + *


+	 *	Category category = new Category();
+	 *	Category category = category.updateCategory( category,  categoryId);
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public com.mozu.api.contracts.productadmin.Category updateCategory(com.mozu.api.contracts.productadmin.Category category, Integer categoryId) throws Exception + { + return updateCategory( category, categoryId, null, null); + } + + /** + * Update the properties of a defined category or move it to another location in the category hierarchy. Because this operation replaces the defined resource,include all the information to maintain for the category in the request. + *


+	 *	Category category = new Category();
+	 *	Category category = category.updateCategory( category,  categoryId,  cascadeVisibility,  responseFields);
+	 * 

+ * @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. Default: False. + * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @param category A descriptive container that groups products. A category is merchant defined with associated products and discounts as configured. GThe storefront displays products in a hierarchy of categories. As such, categories can include a nesting of sub-categories to organize products and product options per set guidelines such as color, brand, material, and size. + * @return com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + * @see com.mozu.api.contracts.productadmin.Category + */ + public com.mozu.api.contracts.productadmin.Category updateCategory(com.mozu.api.contracts.productadmin.Category category, Integer categoryId, Boolean cascadeVisibility, String responseFields) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.updateCategoryClient( category, categoryId, cascadeVisibility, responseFields); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * Deletes the category specified by its category ID. + *


+	 *	Category category = new Category();
+	 *	category.deleteCategoryById( categoryId);
+	 * 

+ * @param categoryId Unique identifier of the category to modify. + * @return + */ + public void deleteCategoryById(Integer categoryId) throws Exception + { + deleteCategoryById( categoryId, null, null, null); + } + + /** + * Deletes the category specified by its category ID. + *


+	 *	Category category = new Category();
+	 *	category.deleteCategoryById( categoryId,  cascadeDelete,  forceDelete,  reassignToParent);
+	 * 

+ * @param cascadeDelete If true, also delete all subcategories associated with the specified category. + * @param categoryId Unique identifier of the category to modify. + * @param forceDelete + * @param reassignToParent + * @return + */ + public void deleteCategoryById(Integer categoryId, Boolean cascadeDelete, Boolean forceDelete, Boolean reassignToParent) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.deleteCategoryByIdClient( categoryId, cascadeDelete, forceDelete, reassignToParent); + client.setContext(_apiContext); + client.executeRequest(); + client.cleanupHttpConnection(); + + } + +} + + + diff --git a/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/SoftAllocationResource.java b/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/SoftAllocationResource.java index cd5bc8bc..bcf74eee 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/SoftAllocationResource.java +++ b/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/SoftAllocationResource.java @@ -150,6 +150,27 @@ public List convertToPro } + /** + * + *


+	 *	SoftAllocation softallocation = new SoftAllocation();
+	 *	SoftAllocation softAllocation = softallocation.renewSoftAllocations( softAllocationRenew);
+	 * 

+ * @param dataViewMode DataViewMode + * @param softAllocationRenew + * @return List + * @see com.mozu.api.contracts.productadmin.SoftAllocation + * @see com.mozu.api.contracts.productadmin.SoftAllocationRenew + */ + public List renewSoftAllocations(com.mozu.api.contracts.productadmin.SoftAllocationRenew softAllocationRenew) throws Exception + { + MozuClient> client = com.mozu.api.clients.commerce.catalog.admin.SoftAllocationClient.renewSoftAllocationsClient( softAllocationRenew); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + /** * *


diff --git a/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/payments/PublicCardResource.java b/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/payments/PublicCardResource.java
new file mode 100644
index 00000000..a354b96e
--- /dev/null
+++ b/mozu-java-core/src/main/java/com/mozu/api/resources/commerce/payments/PublicCardResource.java
@@ -0,0 +1,101 @@
+/**
+ *     This code was auto-generated by a Codezu.     
+ *
+ *     Changes to this file may cause incorrect behavior and will be lost if
+ *     the code is regenerated.
+ */
+package com.mozu.api.resources.commerce.payments;
+
+import com.mozu.api.ApiContext;
+import java.util.List;
+import java.util.ArrayList;
+import com.mozu.api.MozuClient;
+import com.mozu.api.MozuClientFactory;
+import com.mozu.api.MozuUrl;
+import com.mozu.api.Headers;
+import com.mozu.api.security.AuthTicket;
+import org.apache.commons.lang.StringUtils;
+/** 
+ * 
+ * 
+ */
+public class PublicCardResource {
+	///
+	/// 
+	///
+	private ApiContext _apiContext;
+
+
+	public PublicCardResource() 
+		{
+			_apiContext = null;
+	}
+public PublicCardResource(ApiContext apiContext) 
+	{
+		_apiContext = apiContext;
+	}
+
+	
+	/**
+	 * 
+	 * 


+	 *	PublicCard publiccard = new PublicCard();
+	 *	SyncResponse syncResponse = publiccard.create( request);
+	 * 

+ * @param request + * @return com.mozu.api.contracts.paymentservice.response.SyncResponse + * @see com.mozu.api.contracts.paymentservice.response.SyncResponse + * @see com.mozu.api.contracts.paymentservice.PublicCard + */ + public com.mozu.api.contracts.paymentservice.response.SyncResponse create(com.mozu.api.contracts.paymentservice.PublicCard request) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.payments.PublicCardClient.createClient( request); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * + *


+	 *	PublicCard publiccard = new PublicCard();
+	 *	SyncResponse syncResponse = publiccard.update( request,  cardId);
+	 * 

+ * @param cardId + * @param request + * @return com.mozu.api.contracts.paymentservice.response.SyncResponse + * @see com.mozu.api.contracts.paymentservice.response.SyncResponse + * @see com.mozu.api.contracts.paymentservice.PublicCard + */ + public com.mozu.api.contracts.paymentservice.response.SyncResponse update(com.mozu.api.contracts.paymentservice.PublicCard request, String cardId) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.payments.PublicCardClient.updateClient( request, cardId); + client.setContext(_apiContext); + client.executeRequest(); + return client.getResult(); + + } + + /** + * + *


+	 *	PublicCard publiccard = new PublicCard();
+	 *	publiccard.delete( cardId);
+	 * 

+ * @param cardId + * @return + */ + public void delete(String cardId) throws Exception + { + MozuClient client = com.mozu.api.clients.commerce.payments.PublicCardClient.deleteClient( cardId); + client.setContext(_apiContext); + client.executeRequest(); + client.cleanupHttpConnection(); + + } + +} + + + diff --git a/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java b/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java index c2e7e3a3..32a48482 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java +++ b/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java @@ -1,109 +1,113 @@ -/** - * This code was auto-generated by a Codezu. - * - * Changes to this file may cause incorrect behavior and will be lost if - * the code is regenerated. - */ -package com.mozu.api.urls.commerce.catalog.admin; - -import com.mozu.api.MozuUrl; -import com.mozu.api.utils.UrlFormatter; - - -public class CategoryUrl -{ - - /** - * Get Resource Url for GetCategories - * @param filter 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. - * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. - * @param responseFields Use this field to include those fields which are not included by default. - * @param sortBy - * @param startIndex - * @return String Resource Url - */ - public static MozuUrl getCategoriesUrl(String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex) - { - UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}"); - formatter.formatUrl("filter", filter); - formatter.formatUrl("pageSize", pageSize); - formatter.formatUrl("responseFields", responseFields); - formatter.formatUrl("sortBy", sortBy); - formatter.formatUrl("startIndex", startIndex); - return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; - } - - /** - * Get Resource Url for GetChildCategories - * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return String Resource Url - */ - public static MozuUrl getChildCategoriesUrl(Integer categoryId, String responseFields) - { - UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseFields}"); - formatter.formatUrl("categoryId", categoryId); - formatter.formatUrl("responseFields", responseFields); - return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; - } - - /** - * Get Resource Url for GetCategory - * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return String Resource Url - */ - public static MozuUrl getCategoryUrl(Integer categoryId, String responseFields) - { - UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?responseFields={responseFields}"); - formatter.formatUrl("categoryId", categoryId); - formatter.formatUrl("responseFields", responseFields); - return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; - } - - /** - * Get Resource Url for AddCategory - * @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. - * @param responseFields Use this field to include those fields which are not included by default. - * @return String Resource Url - */ - public static MozuUrl addCategoryUrl(Boolean incrementSequence, String responseFields) - { - UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?incrementSequence={incrementSequence}&responseFields={responseFields}"); - formatter.formatUrl("incrementSequence", incrementSequence); - formatter.formatUrl("responseFields", responseFields); - return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; - } - - /** - * Get Resource Url for UpdateCategory - * @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. Default: False. - * @param categoryId Unique identifier of the category to modify. - * @param responseFields Use this field to include those fields which are not included by default. - * @return String Resource Url - */ - public static MozuUrl updateCategoryUrl(Boolean cascadeVisibility, Integer categoryId, String responseFields) - { - UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?cascadeVisibility={cascadeVisibility}&responseFields={responseFields}"); - formatter.formatUrl("cascadeVisibility", cascadeVisibility); - formatter.formatUrl("categoryId", categoryId); - formatter.formatUrl("responseFields", responseFields); - return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; - } - - /** - * Get Resource Url for DeleteCategoryById - * @param cascadeDelete If true, also delete all subcategories associated with the specified category. - * @param categoryId Unique identifier of the category to modify. - * @return String Resource Url - */ - public static MozuUrl deleteCategoryByIdUrl(Boolean cascadeDelete, Integer categoryId) - { - UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/?cascadeDelete={cascadeDelete}"); - formatter.formatUrl("cascadeDelete", cascadeDelete); - formatter.formatUrl("categoryId", categoryId); - return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; - } - -} - +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.urls.commerce.catalog.admin; + +import com.mozu.api.MozuUrl; +import com.mozu.api.utils.UrlFormatter; + + +public class CategoryUrl +{ + + /** + * Get Resource Url for GetCategories + * @param filter 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. + * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. + * @param responseFields Use this field to include those fields which are not included by default. + * @param sortBy + * @param startIndex + * @return String Resource Url + */ + public static MozuUrl getCategoriesUrl(String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex) + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}"); + formatter.formatUrl("filter", filter); + formatter.formatUrl("pageSize", pageSize); + formatter.formatUrl("responseFields", responseFields); + formatter.formatUrl("sortBy", sortBy); + formatter.formatUrl("startIndex", startIndex); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + + /** + * Get Resource Url for GetChildCategories + * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return String Resource Url + */ + public static MozuUrl getChildCategoriesUrl(Integer categoryId, String responseFields) + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseFields}"); + formatter.formatUrl("categoryId", categoryId); + formatter.formatUrl("responseFields", responseFields); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + + /** + * Get Resource Url for GetCategory + * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return String Resource Url + */ + public static MozuUrl getCategoryUrl(Integer categoryId, String responseFields) + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?responseFields={responseFields}"); + formatter.formatUrl("categoryId", categoryId); + formatter.formatUrl("responseFields", responseFields); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + + /** + * Get Resource Url for AddCategory + * @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. + * @param responseFields Use this field to include those fields which are not included by default. + * @return String Resource Url + */ + public static MozuUrl addCategoryUrl(Boolean incrementSequence, String responseFields) + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?incrementSequence={incrementSequence}&responseFields={responseFields}"); + formatter.formatUrl("incrementSequence", incrementSequence); + formatter.formatUrl("responseFields", responseFields); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + + /** + * Get Resource Url for UpdateCategory + * @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. Default: False. + * @param categoryId Unique identifier of the category to modify. + * @param responseFields Use this field to include those fields which are not included by default. + * @return String Resource Url + */ + public static MozuUrl updateCategoryUrl(Boolean cascadeVisibility, Integer categoryId, String responseFields) + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?cascadeVisibility={cascadeVisibility}&responseFields={responseFields}"); + formatter.formatUrl("cascadeVisibility", cascadeVisibility); + formatter.formatUrl("categoryId", categoryId); + formatter.formatUrl("responseFields", responseFields); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + + /** + * Get Resource Url for DeleteCategoryById + * @param cascadeDelete If true, also delete all subcategories associated with the specified category. + * @param categoryId Unique identifier of the category to modify. + * @param forceDelete + * @param reassignToParent + * @return String Resource Url + */ + public static MozuUrl deleteCategoryByIdUrl(Boolean cascadeDelete, Integer categoryId, Boolean forceDelete, Boolean reassignToParent) + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/?cascadeDelete={cascadeDelete}&forceDelete={forceDelete}&reassignToParent={reassignToParent}"); + formatter.formatUrl("cascadeDelete", cascadeDelete); + formatter.formatUrl("categoryId", categoryId); + formatter.formatUrl("forceDelete", forceDelete); + formatter.formatUrl("reassignToParent", reassignToParent); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + +} + diff --git a/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java b/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java index d83780fc..7458cf3d 100644 --- a/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java +++ b/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java @@ -67,6 +67,16 @@ public static MozuUrl convertToProductReservationUrl() return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } + /** + * Get Resource Url for RenewSoftAllocations + * @return String Resource Url + */ + public static MozuUrl renewSoftAllocationsUrl() + { + UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/renew"); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; + } + /** * Get Resource Url for UpdateSoftAllocations * @return String Resource Url diff --git a/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java b/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java new file mode 100644 index 00000000..81202c5a --- /dev/null +++ b/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java @@ -0,0 +1,51 @@ +/** + * This code was auto-generated by a Codezu. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. + */ +package com.mozu.api.urls.commerce.payments; + +import com.mozu.api.MozuUrl; +import com.mozu.api.utils.UrlFormatter; + + +public class PublicCardUrl +{ + + /** + * Get Resource Url for Create + * @return String Resource Url + */ + public static MozuUrl createUrl() + { + UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/"); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ; + } + + /** + * Get Resource Url for Update + * @param cardId + * @return String Resource Url + */ + public static MozuUrl updateUrl(String cardId) + { + UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}"); + formatter.formatUrl("cardId", cardId); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ; + } + + /** + * Get Resource Url for Delete + * @param cardId + * @return String Resource Url + */ + public static MozuUrl deleteUrl(String cardId) + { + UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}"); + formatter.formatUrl("cardId", cardId); + return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ; + } + +} + diff --git a/mozu-java-sdk/src/main/java/com/mozu/client/MozuClientImpl.java b/mozu-java-sdk/src/main/java/com/mozu/client/MozuClientImpl.java index 28161afa..cebbd9fa 100644 --- a/mozu-java-sdk/src/main/java/com/mozu/client/MozuClientImpl.java +++ b/mozu-java-sdk/src/main/java/com/mozu/client/MozuClientImpl.java @@ -449,6 +449,7 @@ protected void ensureSuccess(HttpResponse response, RequestLine requestLine ) th else if (!StringUtils.isEmpty(correlationId)) { try { apiError = mapper.readValue(stringContent(), ApiError.class); + apiError.setCorrelationId(correlationId); if (apiError.getErrorCode().equals("ITEM_NOT_FOUND") && statusCode == 404 && StringUtils.endsWithIgnoreCase("get",requestLine.getMethod())) return; } catch (JsonProcessingException jpe) { throw new ApiException("An error has occurred. Status Code: " + statusCode diff --git a/mozu-java-test/src/main/java/com/mozu/test/framework/core/MozuApiTestBase.java b/mozu-java-test/src/main/java/com/mozu/test/framework/core/MozuApiTestBase.java index e1de719e..17649948 100644 --- a/mozu-java-test/src/main/java/com/mozu/test/framework/core/MozuApiTestBase.java +++ b/mozu-java-test/src/main/java/com/mozu/test/framework/core/MozuApiTestBase.java @@ -46,7 +46,9 @@ public MozuApiTestBase() appAuthInfo.setApplicationId(Environment.getConfigValue("AppId")); appAuthInfo.setSharedSecret(Environment.getConfigValue("SharedSecret")); String baseUrl = Environment.getConfigValue("BaseAuthAppUrl"); + String basePciUrl = Environment.getConfigValue("BasePciUrl"); MozuConfig.setBaseUrl(baseUrl); + MozuConfig.setBasePciUrl(basePciUrl); try { AppAuthenticator.initialize(appAuthInfo, null); // RefreshInterval ri = new RefreshInterval(800, 400); @@ -84,7 +86,8 @@ public MozuApiTestBase() email = Environment.getConfigValue("devOwnerEmail"); password = Environment.getConfigValue("devOwnerPassword"); configStr = Environment.getConfigValue("devOwnerId"); - devOwnerId = Integer.parseInt(configStr); + if (StringUtils.isNotEmpty(configStr)) + devOwnerId = Integer.parseInt(configStr); } } diff --git a/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/CategoryFactory.java b/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/CategoryFactory.java index 0ed5d829..bcf02207 100644 --- a/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/CategoryFactory.java +++ b/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/CategoryFactory.java @@ -1,174 +1,174 @@ -/** - * This code was auto-generated by a tool. - * - * Changes to this file may cause incorrect behavior and will be lost if - * the code is regenerated. -*/ -package com.mozu.test.framework.datafactory; - -import java.util.List; -import java.util.ArrayList; -import com.mozu.api.ApiException; -import com.mozu.api.ApiContext; -import com.mozu.test.framework.core.TestFailException; -import com.mozu.api.resources.commerce.catalog.admin.CategoryResource; - -/** - * Use the Categories resource to organize products and control where they appear on the storefront. Create and maintain a hierarchy of categories and subcategories where the site will store properties. - * - */ -public class CategoryFactory -{ - - public static com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories(ApiContext apiContext, int expectedCode, int successCode) throws Exception - { - return getCategories(apiContext, null, null, null, null, null, expectedCode, successCode ); - } - - public static com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories(ApiContext apiContext, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields, int expectedCode, int successCode) throws Exception - { - com.mozu.api.contracts.productadmin.CategoryPagedCollection returnObj = new com.mozu.api.contracts.productadmin.CategoryPagedCollection(); - CategoryResource resource = new CategoryResource(apiContext); - try - { - returnObj = resource.getCategories( startIndex, pageSize, sortBy, filter, responseFields); - } - catch (ApiException e) - { - if(e.getHttpStatusCode() != expectedCode) - throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - else - return null; - } - if(expectedCode != successCode) - throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - return returnObj; - } - - public static com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(ApiContext apiContext, Integer categoryId, int expectedCode, int successCode) throws Exception - { - return getChildCategories(apiContext, categoryId, null, expectedCode, successCode ); - } - - public static com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(ApiContext apiContext, Integer categoryId, String responseFields, int expectedCode, int successCode) throws Exception - { - com.mozu.api.contracts.productadmin.CategoryCollection returnObj = new com.mozu.api.contracts.productadmin.CategoryCollection(); - CategoryResource resource = new CategoryResource(apiContext); - try - { - returnObj = resource.getChildCategories( categoryId, responseFields); - } - catch (ApiException e) - { - if(e.getHttpStatusCode() != expectedCode) - throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - else - return null; - } - if(expectedCode != successCode) - throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - return returnObj; - } - - public static com.mozu.api.contracts.productadmin.Category getCategory(ApiContext apiContext, Integer categoryId, int expectedCode, int successCode) throws Exception - { - return getCategory(apiContext, categoryId, null, expectedCode, successCode ); - } - - public static com.mozu.api.contracts.productadmin.Category getCategory(ApiContext apiContext, Integer categoryId, String responseFields, int expectedCode, int successCode) throws Exception - { - com.mozu.api.contracts.productadmin.Category returnObj = new com.mozu.api.contracts.productadmin.Category(); - CategoryResource resource = new CategoryResource(apiContext); - try - { - returnObj = resource.getCategory( categoryId, responseFields); - } - catch (ApiException e) - { - if(e.getHttpStatusCode() != expectedCode) - throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - else - return null; - } - if(expectedCode != successCode) - throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - return returnObj; - } - - public static com.mozu.api.contracts.productadmin.Category addCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, int expectedCode, int successCode) throws Exception - { - return addCategory(apiContext, category, null, null, expectedCode, successCode ); - } - - public static com.mozu.api.contracts.productadmin.Category addCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, Boolean incrementSequence, String responseFields, int expectedCode, int successCode) throws Exception - { - com.mozu.api.contracts.productadmin.Category returnObj = new com.mozu.api.contracts.productadmin.Category(); - CategoryResource resource = new CategoryResource(apiContext); - try - { - returnObj = resource.addCategory( category, incrementSequence, responseFields); - } - catch (ApiException e) - { - if(e.getHttpStatusCode() != expectedCode) - throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - else - return null; - } - if(expectedCode != successCode) - throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - return returnObj; - } - - public static com.mozu.api.contracts.productadmin.Category updateCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, Integer categoryId, int expectedCode, int successCode) throws Exception - { - return updateCategory(apiContext, category, categoryId, null, null, expectedCode, successCode ); - } - - public static com.mozu.api.contracts.productadmin.Category updateCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, Integer categoryId, Boolean cascadeVisibility, String responseFields, int expectedCode, int successCode) throws Exception - { - com.mozu.api.contracts.productadmin.Category returnObj = new com.mozu.api.contracts.productadmin.Category(); - CategoryResource resource = new CategoryResource(apiContext); - try - { - returnObj = resource.updateCategory( category, categoryId, cascadeVisibility, responseFields); - } - catch (ApiException e) - { - if(e.getHttpStatusCode() != expectedCode) - throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - else - return null; - } - if(expectedCode != successCode) - throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - return returnObj; - } - - public static void deleteCategoryById(ApiContext apiContext, Integer categoryId, int expectedCode, int successCode) throws Exception - { - deleteCategoryById(apiContext, categoryId, null, expectedCode, successCode ); - } - - public static void deleteCategoryById(ApiContext apiContext, Integer categoryId, Boolean cascadeDelete, int expectedCode, int successCode) throws Exception - { - CategoryResource resource = new CategoryResource(apiContext); - try - { - resource.deleteCategoryById( categoryId, cascadeDelete); - } - catch (ApiException e) - { - if(e.getHttpStatusCode() != expectedCode) - throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - else - return; - } - if(expectedCode != successCode) - throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); - } - -} - - - +/** + * This code was auto-generated by a tool. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. +*/ +package com.mozu.test.framework.datafactory; + +import java.util.List; +import java.util.ArrayList; +import com.mozu.api.ApiException; +import com.mozu.api.ApiContext; +import com.mozu.test.framework.core.TestFailException; +import com.mozu.api.resources.commerce.catalog.admin.CategoryResource; + +/** + * Use the Categories resource to organize products and control where they appear on the storefront. Create and maintain a hierarchy of categories and subcategories where the site will store properties. + * + */ +public class CategoryFactory +{ + + public static com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories(ApiContext apiContext, int expectedCode, int successCode) throws Exception + { + return getCategories(apiContext, null, null, null, null, null, expectedCode, successCode ); + } + + public static com.mozu.api.contracts.productadmin.CategoryPagedCollection getCategories(ApiContext apiContext, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.productadmin.CategoryPagedCollection returnObj = new com.mozu.api.contracts.productadmin.CategoryPagedCollection(); + CategoryResource resource = new CategoryResource(apiContext); + try + { + returnObj = resource.getCategories( startIndex, pageSize, sortBy, filter, responseFields); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(ApiContext apiContext, Integer categoryId, int expectedCode, int successCode) throws Exception + { + return getChildCategories(apiContext, categoryId, null, expectedCode, successCode ); + } + + public static com.mozu.api.contracts.productadmin.CategoryCollection getChildCategories(ApiContext apiContext, Integer categoryId, String responseFields, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.productadmin.CategoryCollection returnObj = new com.mozu.api.contracts.productadmin.CategoryCollection(); + CategoryResource resource = new CategoryResource(apiContext); + try + { + returnObj = resource.getChildCategories( categoryId, responseFields); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static com.mozu.api.contracts.productadmin.Category getCategory(ApiContext apiContext, Integer categoryId, int expectedCode, int successCode) throws Exception + { + return getCategory(apiContext, categoryId, null, expectedCode, successCode ); + } + + public static com.mozu.api.contracts.productadmin.Category getCategory(ApiContext apiContext, Integer categoryId, String responseFields, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.productadmin.Category returnObj = new com.mozu.api.contracts.productadmin.Category(); + CategoryResource resource = new CategoryResource(apiContext); + try + { + returnObj = resource.getCategory( categoryId, responseFields); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static com.mozu.api.contracts.productadmin.Category addCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, int expectedCode, int successCode) throws Exception + { + return addCategory(apiContext, category, null, null, expectedCode, successCode ); + } + + public static com.mozu.api.contracts.productadmin.Category addCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, Boolean incrementSequence, String responseFields, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.productadmin.Category returnObj = new com.mozu.api.contracts.productadmin.Category(); + CategoryResource resource = new CategoryResource(apiContext); + try + { + returnObj = resource.addCategory( category, incrementSequence, responseFields); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static com.mozu.api.contracts.productadmin.Category updateCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, Integer categoryId, int expectedCode, int successCode) throws Exception + { + return updateCategory(apiContext, category, categoryId, null, null, expectedCode, successCode ); + } + + public static com.mozu.api.contracts.productadmin.Category updateCategory(ApiContext apiContext, com.mozu.api.contracts.productadmin.Category category, Integer categoryId, Boolean cascadeVisibility, String responseFields, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.productadmin.Category returnObj = new com.mozu.api.contracts.productadmin.Category(); + CategoryResource resource = new CategoryResource(apiContext); + try + { + returnObj = resource.updateCategory( category, categoryId, cascadeVisibility, responseFields); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static void deleteCategoryById(ApiContext apiContext, Integer categoryId, int expectedCode, int successCode) throws Exception + { + deleteCategoryById(apiContext, categoryId, null, null, null, expectedCode, successCode ); + } + + public static void deleteCategoryById(ApiContext apiContext, Integer categoryId, Boolean cascadeDelete, Boolean forceDelete, Boolean reassignToParent, int expectedCode, int successCode) throws Exception + { + CategoryResource resource = new CategoryResource(apiContext); + try + { + resource.deleteCategoryById( categoryId, cascadeDelete, forceDelete, reassignToParent); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + } + +} + + + diff --git a/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/PublicCardFactory.java b/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/PublicCardFactory.java new file mode 100644 index 00000000..128ad864 --- /dev/null +++ b/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/PublicCardFactory.java @@ -0,0 +1,84 @@ +/** + * This code was auto-generated by a tool. + * + * Changes to this file may cause incorrect behavior and will be lost if + * the code is regenerated. +*/ +package com.mozu.test.framework.datafactory; + +import java.util.List; +import java.util.ArrayList; +import com.mozu.api.ApiException; +import com.mozu.api.ApiContext; +import com.mozu.test.framework.core.TestFailException; +import com.mozu.api.resources.commerce.payments.PublicCardResource; + +/** + * + * + */ +public class PublicCardFactory +{ + + public static com.mozu.api.contracts.paymentservice.response.SyncResponse create(ApiContext apiContext, com.mozu.api.contracts.paymentservice.PublicCard request, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.paymentservice.response.SyncResponse returnObj = new com.mozu.api.contracts.paymentservice.response.SyncResponse(); + PublicCardResource resource = new PublicCardResource(apiContext); + try + { + returnObj = resource.create( request); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static com.mozu.api.contracts.paymentservice.response.SyncResponse update(ApiContext apiContext, com.mozu.api.contracts.paymentservice.PublicCard request, String cardId, int expectedCode, int successCode) throws Exception + { + com.mozu.api.contracts.paymentservice.response.SyncResponse returnObj = new com.mozu.api.contracts.paymentservice.response.SyncResponse(); + PublicCardResource resource = new PublicCardResource(apiContext); + try + { + returnObj = resource.update( request, cardId); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + + public static void delete(ApiContext apiContext, String cardId, int expectedCode, int successCode) throws Exception + { + PublicCardResource resource = new PublicCardResource(apiContext); + try + { + resource.delete( cardId); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + } + +} + + + diff --git a/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/SoftAllocationFactory.java b/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/SoftAllocationFactory.java index cef39a15..37f85da4 100644 --- a/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/SoftAllocationFactory.java +++ b/mozu-java-test/src/main/java/com/mozu/test/framework/datafactory/SoftAllocationFactory.java @@ -110,6 +110,26 @@ public static List conve return returnObj; } + public static List renewSoftAllocations(ApiContext apiContext, com.mozu.api.contracts.productadmin.SoftAllocationRenew softAllocationRenew, int expectedCode, int successCode) throws Exception + { + List returnObj = new ArrayList(); + SoftAllocationResource resource = new SoftAllocationResource(apiContext); + try + { + returnObj = resource.renewSoftAllocations( softAllocationRenew); + } + catch (ApiException e) + { + if(e.getHttpStatusCode() != expectedCode) + throw new TestFailException(e.getHttpStatusCode(), Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + else + return null; + } + if(expectedCode != successCode) + throw new TestFailException(successCode, Thread.currentThread().getStackTrace()[2].getMethodName(), expectedCode, ""); + return returnObj; + } + public static List updateSoftAllocations(ApiContext apiContext, List softAllocations, int expectedCode, int successCode) throws Exception { List returnObj = new ArrayList(); diff --git a/mozu-java-test/src/main/resources/mozu_config.properties b/mozu-java-test/src/main/resources/mozu_config.properties index 50975e85..ce6204ad 100644 --- a/mozu-java-test/src/main/resources/mozu_config.properties +++ b/mozu-java-test/src/main/resources/mozu_config.properties @@ -1,13 +1,14 @@ -Environment=Prod - -# prod -TenantId_Prod= -AppId_Prod= -BaseAuthAppUrl_Prod=https://home.mozu.com -SharedSecret_Prod= -devOwnerId_Prod= -devOwnerEmailv= -devOwnerPassword_Prod= - -#proxy.host=localhost -#proxy.port=8888 +Environment=Prod + +# prod +TenantId_Prod= +AppId_Prod= +BaseAuthAppUrl_Prod=https://home.mozu.com +BasePciUrl_Prod=https://crs.mozu.com +SharedSecret_Prod= +devOwnerId_Prod= +devOwnerEmailv= +devOwnerPassword_Prod= + +#proxy.host=localhost +#proxy.port=8888 diff --git a/mozu-java-test/src/test/java/com/mozu/test/PublicCardTest.java b/mozu-java-test/src/test/java/com/mozu/test/PublicCardTest.java new file mode 100644 index 00000000..0804ed0d --- /dev/null +++ b/mozu-java-test/src/test/java/com/mozu/test/PublicCardTest.java @@ -0,0 +1,59 @@ +package com.mozu.test; + +import static org.junit.Assert.*; + +import org.apache.commons.lang.StringUtils; +import org.apache.http.HttpStatus; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Test; + +import com.mozu.api.ApiContext; +import com.mozu.api.DataViewMode; +import com.mozu.api.MozuApiContext; +import com.mozu.api.contracts.paymentservice.PublicCard; +import com.mozu.api.contracts.paymentservice.response.SyncResponse; +import com.mozu.api.resources.commerce.payments.PublicCardResource; +import com.mozu.test.framework.core.MozuApiTestBase; +import com.mozu.test.framework.datafactory.AdminProductFactory; +import com.mozu.test.framework.datafactory.AttributedefinitionAttributeFactory; +import com.mozu.test.framework.datafactory.ProductTypeFactory; + +public class PublicCardTest extends MozuApiTestBase { + private String cardId = StringUtils.EMPTY; + private static ApiContext apiContext; + + public static void setUpBeforeClass() throws Exception { + } + + @AfterClass + public static void tearDownAfterClass() throws Exception { + + } + + @Before + public void setUp() throws Exception { + apiContext = new MozuApiContext(tenantId, null, masterCatalogId, null); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void createProductTest1() throws Exception { + PublicCard card = new PublicCard(); + card.setCardHolderName("test"); + card.setCardIssueMonth(01); + card.setCardIssueYear(2011); + card.setCardNumber("4111111111111111"); + card.setExpireMonth(01); + card.setExpireYear(2020); + card.setCardType("VISA"); + + PublicCardResource resource = new PublicCardResource(apiContext); + SyncResponse response = resource.create(card); + assertTrue(response.getId() != StringUtils.EMPTY); + } +}