docs
  1. Getting Started
  2. SDK Set Up
  3. Migration

Migration

Java SDK v3.x

This migration guide provides details on the breaking changes introduced in Java SDK v3.x.x and the steps required to adapt your code.

Breaking Changes

The enum PromotionEffectBuyXGetYDiscountDistribution has been renamed to PromotionEffectDiscountDistribution .

Affected Models:

  • PromotionEffectAutomaticDiscount
  • PromotionEffectBuyXGetY
  • PromotionEffect

Java SDK v2.x

This migration guide provides details on the breaking changes introduced in Java SDK v2.x.x and the steps required to adapt your code.

Breaking Changes

1. Fields Typed as Instant

All fields of models specified as date-time in the specs are now typed as java.time.Instant.

Code Example:

v1.x.x:

v2.x.x:

Affected Models and Fields:

  • Campaign: startAt, endAt
  • Customer: createdAt, updatedAt
  • CustomerMembership: createdAt, updatedAt
  • EmailKey: createdAt, updatedAt
  • Order: confirmedAt, invoicedAt, createdAt, updatedAt
  • OrderItem: createdAt, updatedAt
  • ProductVariantPrice: validFrom, validTo
  • ProductVariantStock: changedAt
  • PromotionSchedule: from, to
  • Redirect: createdAt, updatedAt
  • Shipment: deliveryDate
  • VoucherConstraintsDate: max, min

2. Enum Fields Typed as Corresponding Enum Classes

All enum fields of models are now typed using their corresponding Java enum classes, replacing the previous String type.

Code Example:

v1.x.x:

v2.x.x:

Affected Models and Fields:

  • Attribute: type
  • AttributeGroup: type, level
  • CustomDataConfigPropertyType: type
  • Customer: gender
  • CustomerAddressRecipient: gender, type
  • CustomerPassword: hashingType
  • MasterCategoryAttribute: type
  • Order: status
  • OrderFee: type
  • OrderPaymentInstallment: type
  • OrderSubsequentDelivery: key
  • OrderVoucher: type
  • Product: state
  • ProductState: state
  • Promotion: status, activationType, level
  • PromotionCondition: level
  • PromotionEffect: type
  • PromotionEffectAutomaticDiscount: type
  • PromotionEffectBuyXGetY: maxCountType
  • PromotionSiblingPromotion: level
  • PromotionUsageLimitPromotionCode: type
  • ShopCountryPriceRounding: precision, roundingType
  • SubscriptionOrderAddressInstance: gender
  • SubscriptionOrderApplication: device
  • Transaction: operationStatus
  • Voucher: status, type
  • VoucherConstraintsApplications: restriction
  • VoucherCriterion: key, type

Summary

To migrate your code from Java SDK v1.x.x to v2.x.x:

  1. Update all date-time fields to use java.time.Instant.
  2. Replace string-based enum values with their corresponding Java enum constants.

PHP SDK v2.x

This migration guide provides details on the breaking changes introduced in PHP SDK v2.x.x and the steps required to adapt your code.

Breaking Changes

  • Dropped support for PHP below version 8.1, only 8.1+ is now supported.
  • Declared strict types in all classes of the SDK.
  • Added type hints and return types.
  • Changed the namespace from AboutYou\Cloud\AdminApi to Scayle\Cloud\AdminApi.

Code Example:

v1.x:

v2.x:

Summary

To migrate your code from PHP SDK v1.x to v2.x:

  1. Adjust the namespaces of all SDK classes you're using.