Closed rachelmcr closed 16 hours ago
2 Warnings | |
---|---|
:warning: | This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
:warning: | This PR is assigned to the milestone 21.2. This milestone is due in less than 2 days. Please make sure to get it merged by then or assign it to a milestone with a later deadline. |
Generated by :no_entry_sign: Danger
This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
Just a note that 200+ lines of changes are from testing mocks and generated fake/copy methods for unit testing. I considered trying to split up some of the changes to the networking models here into a separate PR from the WooShippingRemote
changes, but I think these changes make more sense in context.
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
App Name | WooCommerce iOS | |
Build Number | pr14474-997e863 | |
Version | 21.1 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 997e86397d70a8c56b53d1e6817bc51db5a908d6 | |
App Center Build | WooCommerce - Prototype Builds #11716 |
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
Closes: #14423 ⚠️ Depends on #14455 ⚠️
Description
This adds support in the Networking layer for purchasing a label in the Woo Shipping label flow.
How
WooShippingPackagePurchase
to represent the package data needed in the purchase request.packages
request parameter.ShippingLabelCarrierRate
andShippingLabelCarriersAndRates
to handle different key strategies for decoding and encoding:Codable
but we didn't encode them directly for any requests.) However, the purchase request requires encoding these entities with camel case keys.WooShippingRemote
, along with the corresponding mock response and unit tests.A note on the number of changes in this PR: 200+ lines of changes are from testing mocks and generated fake/copy methods for unit testing. I considered trying to split up some of the changes to the networking models here into a separate PR from the WooShippingRemote changes, but I think these changes make more sense in context.
Testing information
Testing steps to confirm these changes don't change the legacy shipping labels flow:
revampedShippingLabelCreation
.RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: