Remove use of Klaviyo API v2, use 2024-05-15 revision instead#74
Remove use of Klaviyo API v2, use 2024-05-15 revision instead#74loevgaard merged 6 commits intoSetono:0.4.xfrom
Conversation
|
This has been on my todo list for ages. You are a legend. First quick glance it looks good. Maybe check if you can fix the codestyle and the static analysis warnings. |
2889dc4 to
f7c2598
Compare
|
I've fixed codestyle and i've updated tests to match with new klaviyo's endpoints payload. A maintainer seems to be required to re-run CI checks. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0.4.x #74 +/- ##
============================================
+ Coverage 22.66% 25.68% +3.02%
- Complexity 188 200 +12
============================================
Files 41 44 +3
Lines 675 728 +53
============================================
+ Hits 153 187 +34
- Misses 522 541 +19 ☔ View full report in Codecov by Sentry. |
|
Hi, any help to fix dependency analysis CI checks? |
|
Hi, @lusimeon This is a great PR. Thank you. I will merge it into the branch and work on other improvements in another PR. |
Description
Klaviyo v2 API is EOL : https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy. This PR updates calls to Klaviyo API to be compatible with new API endpoints.
Breaking changes
spatie/data-transfer-objectpackage because not maintained and not used.Setono\SyliusKlaviyoPlugin\Client\RestClientInterface::get()andSetono\SyliusKlaviyoPlugin\Client\RestClientInterface::post()change fromarraytoSymfony\Contracts\HttpClient\ResponseInterface\ResponseInterfaceSetono\SyliusKlaviyoPlugin\DTO\Properties\CustomerPropertiesproperties:zip,city,region,countryproperties inSetono\SyliusKlaviyoPlugin\DTO\Properties\Locationclass and define a new propertylocation.idproperty in favor ofexternalId.exchangeIdproperty.consentproperty in favor ofsubscriptionsproperty (Setono\SyliusKlaviyoPlugin\DTO\Properties\Subscriptions).Setono\SyliusKlaviyoPlugin\DTO\Properties\CustomerProperties::populateFromCustomer()).setono_sylius_klaviyo.event_subscriber.update_customer_properties_from_orderservice constructor require one new servicesetono_sylius_klaviyo.dto.properties.factory.properties.setono_sylius_klaviyo.client.track_identifyservice requiresetono_sylius_klaviyo.client.restservice in constructor instead ofhttp_clientservice.setono_sylius_klaviyo.message.handler.subscribe_customerservice requiresetono_sylius_klaviyo.dto.properties.factory.propertiesandserializerin constructor.close #69