Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apple Pay Essentials

You're reading from  Apple Pay Essentials

Product type Book
Published in Feb 2016
Publisher
ISBN-13 9781785886386
Pages 118 pages
Edition 1st Edition
Languages
Author (1):
Ernest Bruce Ernest Bruce
Profile icon Ernest Bruce

Providing inventory information to clients


The order management system implements three REST APIs (known as middleware in Node.js parlance) to provide inventory and shipping method information to clients. These are as follows:

  • /shipping_methods: This returns the list of supported shipping methods

  • /inventory: This returns the product catalog

  • /product_image/<image_name>: This returns the image used to represent a product to the user

When the client app is launched, it requests the list of shipping methods supported by the system (the application:didFinishLaunchingWithOptions: method in AppDelegate.m). Before displaying the list of the available products in the product list screen, the app requests the product catalog (the viewDidLoad method in ProductList.m). When the app is about to display the card for a particular product (after the user selects a product in the product list screen), it requests the product's image from the server (the viewDidLoad method in ProductCard.m).

Note

For development...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}