Correctly implement pattern properties handling by adding those values in a
specific field (ExtraValues
)
Improve how the user-agent is set on requests. Previously it was not set on OAuth requests but only on API requests.
Rewrite of the complete SDK. The SDK is now generated using the commercetools rmf-codegen project instead of our own solution. This should make it easier to keep the SDK in-sync with the other commercetools SDK's and offer support for new API's like the importapi and the history api.
The biggest change is that the client is now using method chaining for executing requests.
For example Client.CartCreate()
is now Client.Carts().Post().Execute()
, it is a bit
more verbose and less explicit but it does allow us to generate an SDK which supports all
the endpoints as defined by the commercetools api specs.
- Upgrade services and types from commercetools-api-reference #59
- Add validation for structs for Update calls
- Enable custom objects endpoint after raml update
- Backwards incompatible: DateOfBirth fields now take a
*Date
instead of aDate
value
- ExtensionNoResponseError.ErrorByExtension
- ExtensionNoResponseError.ExtensionExtraInfo
- ExtensionNoResponseError.LocalizedMessage
- PagedQueryResponse.Facets
- TaxedPriceDraft.UnmarshalJSON()
- StoresAddDistributionChannelsAction renamed to StoreAddDistributionChannelAction
- StoresAddSupplyChannelsAction renamed to StoreAddSupplyChannelAction
- StoresRemoveDistributionChannelsAction renamed to StoreRemoveDistributionChannelAction
- StoresRemoveSupplyChannelsAction renamed to StoreRemoveSupplyChannelAction
- StoresSetDistributionChannelsAction renamed to StoreSetDistributionChannelsAction
- StoresSetSupplyChannelsAction renamed to StoreSetSupplyChannelsAction
struct | old type | new type |
---|---|---|
CartDiscount.Value | CartDiscountValue | CartDiscountValueDraft |
CartDiscountValueGiftLineItemDraft.DistributionChannel | *ChannelReference | *ChannelResourceIdentifier |
CartDiscountValueGiftLineItemDraft.Product | *ProductReference | *ProductResourceIdentifier |
CartDiscountValueGiftLineItemDraft.SupplyChannel | *ChannelReference | *ChannelResourceIdentifier |
CartSetShippingMethodAction.Custom | *CustomFields | *CustomFieldsDraft |
CustomerSignInResult.Cart | interface{} | *Cart |
DeliveryAddedMessage.RemovedImageUrls | []interface{} | []string |
DeliveryItem.Quantity | float64 | int |
FacetResultRange.Total | int | float64 |
MyCartAddLineItemAction.Quantity | float64 | int |
MyCartChangeLineItemQuantityAction.Quantity | float64 | int |
MyCartRemoveLineItemAction.Quantity | float64 | int |
ProductPublishedMessagePayload.RemovedImageUrls | []interface{} | []string |
TaxedPriceDraft.TotalNet | TypedMoneyDraft | *Money |
TaxedPriceDraft.TotalGross | TypedMoneyDraft | *Money |
ShippingMethodDraft.LocalizedDescription | string | *LocalizedDescription |
- Backwards incompatible: Add context parameter to all method calls. (#51)
- Add a more simple Client factory as commercetools.NewClient() (#50)
- Add support for reference expansion by passing a function option as last parameter. For example: client.ProductCreate( ctx, draft, commercetools.WithReferenceExpansion("productType)) See #53 for more information
- Add a GraphQL interface to the client (See #49)
- Improve handling of OAuth2 authentication errors (#48)
First versioned release. Although this library has been in development for nearly 2 years (first commit 2018-06-18) it never was properly tagged since we only used it for our commercetools provider.
The codebase is currently fairly stable so this is a good moment to actually create a tag and start properly updating the changelog.
Note that although all the types (structs) should be up-to-date (autogenerated) some services might not be implemented yet.
For now at least the following services are implemented:
- API clients
- Carts
- Cart discounts
- Categories
- Channels
- Custom objects
- Customers
- Customer groups
- Discount codes
- Extensions
- Inventory
- Messages
- Orders
- Payments
- Products
- Product discounts
- Product types
- Project
- Reviews
- Shipping methods
- Shopping lists
- State machines
- Stores
- Subscriptions
- Tax categories
- Zones