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 shipping label purchase action to WooShippingStore #14490

Open rachelmcr opened 11 hours ago

rachelmcr commented 11 hours ago

Closes: #14424 Closes: #14053 ⚠️ Depends on https://github.com/woocommerce/woocommerce-ios/pull/14488 ⚠️

Description

This adds an action in the Yosemite layer to purchase a shipping label. It uses the endpoints for purchasing a shipping label and polling for a shipping label status, to check when the purchase is complete and return the purchased label.

How

Here is the polling strategy we're using:

image

This is essentially the same action we already have in ShippingLabelStore, with some small adjustments due to differences in the new endpoint request/response schemas.

Testing information

TBD: I plan to test this action before merging it, to confirm the actual requests/responses work 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:

wpmobilebot commented 11 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 Numberpr14490-e0aaa21
Version21.1
Bundle IDcom.automattic.alpha.woocommerce
Commite0aaa2122714e64fdec13b1ba7ccd98781ff87f2
App Center BuildWooCommerce - Prototype Builds #11719

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