Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jul 12, 2024
1 parent ec3e02b commit 138d1f2
Show file tree
Hide file tree
Showing 39 changed files with 600 additions and 30 deletions.
3 changes: 3 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
- added property `variants` to type `ProductTailoringData`
- added property `variants` to type `ProductTailoringDraft`
- added property `variants` to type `ProductTailoringInStoreDraft`
- added property `active` to type `ShippingMethod`
- added property `active` to type `ShippingMethodDraft`
- added property `store` to type `StagedQuote`
</details>

Expand Down Expand Up @@ -156,6 +158,7 @@
- added type `ProductTailoringSetImageLabelAction`
- added type `CustomerSearchStatus`
- added type `ProjectChangeCustomerSearchStatusAction`
- added type `ShippingMethodChangeActiveAction`
</details>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,10 @@ input ChangeQuoteState {
quoteState: QuoteState!
}

input ChangeShippingMethodActive {
active: Boolean!
}

input ChangeShippingMethodIsDefault {
isDefault: Boolean!
}
Expand Down Expand Up @@ -13044,6 +13048,7 @@ input ShippingInfoImportDraft {
type ShippingMethod implements Versioned & ReferenceExpandable {
name: String!
zoneRates: [ZoneRate!]!
active: Boolean!
isDefault: Boolean!
predicate: String
key: String
Expand Down Expand Up @@ -13081,6 +13086,7 @@ input ShippingMethodDraft {
localizedDescription: [LocalizedStringItemInputType!]
taxCategory: ResourceIdentifierInput!
zoneRates: [ZoneRateDraft!] = []
active: Boolean
isDefault: Boolean!
predicate: String
key: String
Expand Down Expand Up @@ -13115,6 +13121,7 @@ enum ShippingMethodState {
input ShippingMethodUpdateAction {
addShippingRate: AddShippingMethodShippingRate
addZone: AddShippingMethodZone
changeActive: ChangeShippingMethodActive
changeIsDefault: ChangeShippingMethodIsDefault
changeName: ChangeShippingMethodName
changeTaxCategory: ChangeShippingMethodTaxCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Creating a Cart fails with an InvalidOperation error if the ShippingMethod referenced in the CartDraft has a <code>predicate</code> that does not match the Cart.</p>
* <p>If the referenced ShippingMethod in the CartDraft has a predicate that does not match, or if the Shipping Method is not active, an InvalidOperation error is returned.</p>
* <p>Specific Error Codes:</p>
* <ul>
* <li>DiscountCodeNonApplicable</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Creating a Cart fails with an InvalidOperation error if the ShippingMethod referenced in the CartDraft has a <code>predicate</code> that does not match the Cart.</p>
* <p>If the referenced ShippingMethod in the CartDraft has a predicate that does not match, or if the Shipping Method is not active, an InvalidOperation error is returned.</p>
* <p>Specific Error Codes:</p>
* <ul>
* <li>DiscountCodeNonApplicable</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Creates a Cart in the Store specified by <code>storeKey</code>. When using this endpoint the Cart's <code>store</code> field is always set to the Store specified in the path parameter. If the referenced ShippingMethod in the CartDraft has a predicate that does not match, an InvalidOperation error is returned.</p>
* <p>Creates a Cart in the Store specified by <code>storeKey</code>. When using this endpoint the Cart's <code>store</code> field is always set to the Store specified in the path parameter. If the referenced ShippingMethod in the CartDraft has a predicate that does not match, or if the Shipping Method is not active, an InvalidOperation error is returned.</p>
* <p>Specific Error Codes:</p>
* <ul>
* <li>DiscountCodeNonApplicable</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Creates a Cart in the Store specified by <code>storeKey</code>. When using this endpoint the Cart's <code>store</code> field is always set to the Store specified in the path parameter. If the referenced ShippingMethod in the CartDraft has a predicate that does not match, an InvalidOperation error is returned.</p>
* <p>Creates a Cart in the Store specified by <code>storeKey</code>. When using this endpoint the Cart's <code>store</code> field is always set to the Store specified in the path parameter. If the referenced ShippingMethod in the CartDraft has a predicate that does not match, or if the Shipping Method is not active, an InvalidOperation error is returned.</p>
* <p>Specific Error Codes:</p>
* <ul>
* <li>DiscountCodeNonApplicable</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* <li>DiscountCodeNonApplicable</li>
* <li>ShippingMethodDoesNotMatchCart</li>
* <li>InvalidItemShippingDetails</li>
* <li>InvalidOperation</li>
* <li>MatchingPriceNotFound</li>
* <li>MissingTaxRateForCountry</li>
* <li>CountryNotConfiguredInStore</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* <li>DiscountCodeNonApplicable</li>
* <li>ShippingMethodDoesNotMatchCart</li>
* <li>InvalidItemShippingDetails</li>
* <li>InvalidOperation</li>
* <li>MatchingPriceNotFound</li>
* <li>MissingTaxRateForCountry</li>
* <li>CountryNotConfiguredInStore</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all the ShippingMethods that can ship to the shipping address of the given Cart in a given Store. Each ShippingMethod contains exactly one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. This ShippingRate is used when the ShippingMethod is added to the Cart.</p>
* <p>Retrieves all the active ShippingMethods that can ship to the shipping address of the given Cart in a given Store. Each ShippingMethod contains exactly one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. This ShippingRate is used when the ShippingMethod is added to the Cart.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks if a ShippingMethod that can ship to the shipping address of the given Cart exists in the given Store. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
* <p>Checks if an active ShippingMethod that can ship to the shipping address of the given Cart exists in the given Store. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* <li>DiscountCodeNonApplicable</li>
* <li>ShippingMethodDoesNotMatchCart</li>
* <li>InvalidItemShippingDetails</li>
* <li>InvalidOperation</li>
* <li>MatchingPriceNotFound</li>
* <li>MissingTaxRateForCountry</li>
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* <li>DiscountCodeNonApplicable</li>
* <li>ShippingMethodDoesNotMatchCart</li>
* <li>InvalidItemShippingDetails</li>
* <li>InvalidOperation</li>
* <li>MatchingPriceNotFound</li>
* <li>MissingTaxRateForCountry</li>
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all the ShippingMethods that can ship to the shipping address of the given Cart. Each ShippingMethod contains exactly one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. This ShippingRate is used when the ShippingMethod is added to the Cart.</p>
* <p>Retrieves all the active ShippingMethods that can ship to the shipping address of the given Cart. Each ShippingMethod contains exactly one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. This ShippingRate is used when the ShippingMethod is added to the Cart.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks if a ShippingMethod exists for the given Cart. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
* <p>Checks if an active ShippingMethod exists for the given Cart. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all the ShippingMethods that can ship to the given Location with a <code>predicate</code> that matches the given Cart. Each ShippingMethod contains exactly one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. This ShippingRate is used when the ShippingMethod is added to the Cart.</p>
* <p>Retrieves all the active ShippingMethods that can ship to the given Location with a <code>predicate</code> that matches the given Cart. Each ShippingMethod contains exactly one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. This ShippingRate is used when the ShippingMethod is added to the Cart.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks if a ShippingMethod that can ship to the given Location exists for the given Cart. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
* <p>Checks if an active ShippingMethod that can ship to the given Location exists for the given Cart. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all the ShippingMethods that can ship to the given Location. ShippingMethods that have a <code>predicate</code> defined are automatically disqualified. If the <code>currency</code> parameter is given, then the ShippingMethods must also have a rate defined in the specified currency. Each ShippingMethod contains at least one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. If the <code>currency</code> parameter is given, exactly one ShippingRate will contain it.</p>
* <p>Retrieves all the active ShippingMethods that can ship to the given Location. ShippingMethods that have a <code>predicate</code> defined are automatically disqualified. If the <code>currency</code> parameter is given, then the ShippingMethods must also have a rate defined in the specified currency. Each ShippingMethod contains at least one ShippingRate with the flag <code>isMatching</code> set to <code>true</code>. If the <code>currency</code> parameter is given, exactly one ShippingRate will contain it.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks if a ShippingMethod that can ship to the given Location exists. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
* <p>Checks if an active ShippingMethod that can ship to the given Location exists. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all the ShippingMethods that can ship to the given Location for an OrderEdit.</p>
* <p>Retrieves all the active ShippingMethods that can ship to the given Location for an OrderEdit.</p>
* <p>If the OrderEdit preview cannot be generated, an EditPreviewFailed error is returned.</p>
*
* <hr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks if a ShippingMethod that can ship to the given Location exists for the given OrderEdit. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
* <p>Checks if an active ShippingMethod that can ship to the given Location exists for the given OrderEdit. Returns a <code>200 OK</code> status if the ShippingMethod exists or a <code>404 Not Found</code> otherwise.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* .name("{name}")
* .taxCategory(taxCategoryBuilder -> taxCategoryBuilder)
* .plusZoneRates(zoneRatesBuilder -> zoneRatesBuilder)
* .active(true)
* .isDefault(true)
* .build()
* </code></pre>
Expand Down Expand Up @@ -158,7 +159,16 @@ public interface ShippingMethod
public List<ZoneRate> getZoneRates();

/**
* <p>If <code>true</code> this ShippingMethod is the Project's default ShippingMethod.</p>
* <p>Indicates if the ShippingMethod is active.</p>
* <p>If <code>true</code>, the ShippingMethod can be used during the creation or update of a Cart or Order.</p>
* @return active
*/
@NotNull
@JsonProperty("active")
public Boolean getActive();

/**
* <p>If <code>true</code>, this ShippingMethod is the Project's default ShippingMethod.</p>
* @return isDefault
*/
@NotNull
Expand Down Expand Up @@ -281,7 +291,15 @@ public interface ShippingMethod
public void setZoneRates(final List<ZoneRate> zoneRates);

/**
* <p>If <code>true</code> this ShippingMethod is the Project's default ShippingMethod.</p>
* <p>Indicates if the ShippingMethod is active.</p>
* <p>If <code>true</code>, the ShippingMethod can be used during the creation or update of a Cart or Order.</p>
* @param active value to be set
*/

public void setActive(final Boolean active);

/**
* <p>If <code>true</code>, this ShippingMethod is the Project's default ShippingMethod.</p>
* @param isDefault value to be set
*/

Expand Down Expand Up @@ -329,6 +347,7 @@ public static ShippingMethod of(final ShippingMethod template) {
instance.setLocalizedDescription(template.getLocalizedDescription());
instance.setTaxCategory(template.getTaxCategory());
instance.setZoneRates(template.getZoneRates());
instance.setActive(template.getActive());
instance.setIsDefault(template.getIsDefault());
instance.setPredicate(template.getPredicate());
instance.setCustom(template.getCustom());
Expand Down Expand Up @@ -367,6 +386,7 @@ public static ShippingMethod deepCopy(@Nullable final ShippingMethod template) {
.map(com.commercetools.api.models.shipping_method.ZoneRate::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
instance.setActive(template.getActive());
instance.setIsDefault(template.getIsDefault());
instance.setPredicate(template.getPredicate());
instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* .name("{name}")
* .taxCategory(taxCategoryBuilder -> taxCategoryBuilder)
* .plusZoneRates(zoneRatesBuilder -> zoneRatesBuilder)
* .active(true)
* .isDefault(true)
* .build()
* </code></pre>
Expand Down Expand Up @@ -64,6 +65,8 @@ public class ShippingMethodBuilder implements Builder<ShippingMethod> {

private java.util.List<com.commercetools.api.models.shipping_method.ZoneRate> zoneRates;

private Boolean active;

private Boolean isDefault;

@Nullable
Expand Down Expand Up @@ -419,7 +422,19 @@ public ShippingMethodBuilder setZoneRates(
}

/**
* <p>If <code>true</code> this ShippingMethod is the Project's default ShippingMethod.</p>
* <p>Indicates if the ShippingMethod is active.</p>
* <p>If <code>true</code>, the ShippingMethod can be used during the creation or update of a Cart or Order.</p>
* @param active value to be set
* @return Builder
*/

public ShippingMethodBuilder active(final Boolean active) {
this.active = active;
return this;
}

/**
* <p>If <code>true</code>, this ShippingMethod is the Project's default ShippingMethod.</p>
* @param isDefault value to be set
* @return Builder
*/
Expand Down Expand Up @@ -599,7 +614,17 @@ public java.util.List<com.commercetools.api.models.shipping_method.ZoneRate> get
}

/**
* <p>If <code>true</code> this ShippingMethod is the Project's default ShippingMethod.</p>
* <p>Indicates if the ShippingMethod is active.</p>
* <p>If <code>true</code>, the ShippingMethod can be used during the creation or update of a Cart or Order.</p>
* @return active
*/

public Boolean getActive() {
return this.active;
}

/**
* <p>If <code>true</code>, this ShippingMethod is the Project's default ShippingMethod.</p>
* @return isDefault
*/

Expand Down Expand Up @@ -639,9 +664,11 @@ public ShippingMethod build() {
Objects.requireNonNull(name, ShippingMethod.class + ": name is missing");
Objects.requireNonNull(taxCategory, ShippingMethod.class + ": taxCategory is missing");
Objects.requireNonNull(zoneRates, ShippingMethod.class + ": zoneRates is missing");
Objects.requireNonNull(active, ShippingMethod.class + ": active is missing");
Objects.requireNonNull(isDefault, ShippingMethod.class + ": isDefault is missing");
return new ShippingMethodImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, name,
localizedName, description, localizedDescription, taxCategory, zoneRates, isDefault, predicate, custom);
localizedName, description, localizedDescription, taxCategory, zoneRates, active, isDefault, predicate,
custom);
}

/**
Expand All @@ -650,7 +677,8 @@ public ShippingMethod build() {
*/
public ShippingMethod buildUnchecked() {
return new ShippingMethodImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, name,
localizedName, description, localizedDescription, taxCategory, zoneRates, isDefault, predicate, custom);
localizedName, description, localizedDescription, taxCategory, zoneRates, active, isDefault, predicate,
custom);
}

/**
Expand Down Expand Up @@ -681,6 +709,7 @@ public static ShippingMethodBuilder of(final ShippingMethod template) {
builder.localizedDescription = template.getLocalizedDescription();
builder.taxCategory = template.getTaxCategory();
builder.zoneRates = template.getZoneRates();
builder.active = template.getActive();
builder.isDefault = template.getIsDefault();
builder.predicate = template.getPredicate();
builder.custom = template.getCustom();
Expand Down
Loading

0 comments on commit 138d1f2

Please sign in to comment.