woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
314 stars 113 forks source link

[Shipping labels] Add support for Woo Shipping label purchase endpoint in Networking layer #14474

Closed rachelmcr closed 16 hours ago

rachelmcr commented 1 day ago

Closes: #14423 ⚠️ Depends on #14455 ⚠️

Description

This adds support in the Networking layer for purchasing a label in the Woo Shipping label flow.

How

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:

  1. Disable the feature flag revampedShippingLabelCreation.
  2. Build and run the app.
  3. Go to the Orders tab and select an order eligible for shipping label creation.
  4. Tap "Create Shipping Label."
  5. Go through each step of the shipping label flow and purchase a shipping label, confirming there are no errors and the label can be viewed/printed as expected.

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:

dangermattic commented 20 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

rachelmcr commented 20 hours ago

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.

wpmobilebot commented 20 hours ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14474-997e863
Version21.1
Bundle IDcom.automattic.alpha.woocommerce
Commit997e86397d70a8c56b53d1e6817bc51db5a908d6
App Center BuildWooCommerce - Prototype Builds #11716

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.