{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/comments/62955264","id":62955264,"diff_hunk":"@@ -0,0 +1,391 @@\n+package com.shopify.buy.utils;\n+\n+/*\n+ * The MIT License (MIT)\n+ *\n+ * Copyright (c) 2015 Shopify\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ *\n+ */\n+\n+import android.content.Context;\n+import android.support.annotation.NonNull;\n+import android.text.TextUtils;\n+\n+import com.google.android.gms.common.ConnectionResult;\n+import com.google.android.gms.common.GoogleApiAvailability;\n+import com.google.android.gms.common.api.BooleanResult;\n+import com.google.android.gms.common.api.GoogleApiClient;\n+import com.google.android.gms.common.api.ResultCallback;\n+import com.google.android.gms.identity.intents.model.UserAddress;\n+import com.google.android.gms.wallet.Cart;\n+import com.google.android.gms.wallet.FullWalletRequest;\n+import com.google.android.gms.wallet.LineItem;\n+import com.google.android.gms.wallet.MaskedWallet;\n+import com.google.android.gms.wallet.MaskedWalletRequest;\n+import com.google.android.gms.wallet.PaymentMethodTokenizationParameters;\n+import com.google.android.gms.wallet.PaymentMethodTokenizationType;\n+import com.google.android.gms.wallet.Wallet;\n+import com.shopify.buy.dataprovider.BuyClient;\n+import com.shopify.buy.model.Address;\n+import com.shopify.buy.model.Checkout;\n+import com.shopify.buy.model.Shop;\n+\n+import java.math.BigDecimal;\n+\n+\n+/**\n+ * Contains utility functions to help with Android Pay\n+ */\n+\n+public class AndroidPayHelper {\n+\n+    private static final int FIRST_NAME_PART = 0;\n+    private static final int LAST_NAME_PART = 1;\n+\n+    public static final int REQUEST_CODE_MASKED_WALLET = 500;\n+    public static final int REQUEST_CODE_CHANGE_MASKED_WALLET = 501;\n+    public static final int REQUEST_CODE_FULL_WALLET = 502;\n+\n+    /**\n+     * Creates a Wallet Cart from a Shopify Cart for use in Wallet Requests.\n+     *\n+     * @param shopifyCart The {@link com.shopify.buy.model.Cart} to convert, not Null.\n+     * @param shop        The {@link Shop}, not null.\n+     * @return A {@link Cart}\n+     */\n+    public static Cart createWalletCart(com.shopify.buy.model.Cart shopifyCart, Shop shop) {\n+        if (shopifyCart == null) {\n+            throw new NullPointerException(\"shopifyCart cannot be null\");\n+        }\n+        if (shop == null) {\n+            throw new NullPointerException(\"shop cannot be null\");\n+        }\n+\n+        Cart.Builder builder = Cart.newBuilder();\n+        builder.setCurrencyCode(shop.getCurrency());\n+        BigDecimal totalPrice = new BigDecimal(0);\n+        for (com.shopify.buy.model.LineItem shopifyLineItem : shopifyCart.getLineItems()) {\n+            LineItem lineItem = createWalletLineItem(shopifyLineItem, shop.getCurrency());\n+            totalPrice = totalPrice.add(new BigDecimal(lineItem.getTotalPrice()));\n+            builder.addLineItem(lineItem);\n+        }\n+        builder.setTotalPrice(totalPrice.toString());\n+        return builder.build();\n+    }\n+\n+    /**\n+     * Creates a {@link Cart} from a {@link Checkout} for use in Wallet Requests. This is the preferred way to create a Wallet for use in {@link FullWalletRequest}\n+     *\n+     * @param checkout The Checkout to convert, not null.\n+     * @return A {@link Cart}\n+     */\n+    public static Cart createWalletCart(Checkout checkout) {\n+        if (checkout == null) {\n+            throw new NullPointerException(\"checkout cannot be null\");\n+        }\n+\n+        Cart.Builder builder = Cart.newBuilder();\n+        builder.setCurrencyCode(checkout.getCurrency());\n+        for (com.shopify.buy.model.LineItem shopifyLineItem : checkout.getLineItems()) {\n+            LineItem lineItem = createWalletLineItem(shopifyLineItem, checkout.getCurrency());\n+            builder.addLineItem(lineItem);\n+        }\n+        builder.setTotalPrice(checkout.getTotalPrice());\n+        return builder.build();\n+    }\n+\n+    private static LineItem createWalletLineItem(com.shopify.buy.model.LineItem shopifyLineItem, String currencyCode) {\n+        BigDecimal lineTotal = new BigDecimal(shopifyLineItem.getPrice()).multiply(new BigDecimal(shopifyLineItem.getQuantity()));\n+        return LineItem.newBuilder().setQuantity(Long.toString(shopifyLineItem.getQuantity()))\n+                .setUnitPrice(shopifyLineItem.getPrice())\n+                .setTotalPrice(lineTotal.toString())\n+                .setDescription(shopifyLineItem.getTitle())\n+                .setCurrencyCode(currencyCode)\n+                .build();\n+    }\n+\n+    /**\n+     * Creates a Shopify Address from a Wallet Address\n+     *\n+     * @param walletUserAddress {@link UserAddress} to convert, not null\n+     * @return {@link Address}\n+     */\n+    public static Address createShopifyAddress(UserAddress walletUserAddress) {\n+        if (walletUserAddress == null) {\n+            throw new NullPointerException(\"walletUserAddress cannot be null\");\n+        }\n+\n+        Address address = new Address();\n+\n+        String[] nameParts = extractFirstAndLastNames(walletUserAddress.getName());\n+        address.setFirstName(nameParts[FIRST_NAME_PART]);\n+        address.setLastName(nameParts[LAST_NAME_PART]);\n+\n+        address.setAddress1(walletUserAddress.getAddress1());\n+\n+        // Google Wallet address has 5 address lines.\n+        // Convert to 2 address lines\n+        StringBuilder address2 = new StringBuilder();\n+        address2.append(walletUserAddress.getAddress2());\n+\n+        if (!TextUtils.isEmpty(walletUserAddress.getAddress3())) {\n+            address2.append(walletUserAddress.getAddress3());\n+            address2.append(\", \");\n+        }\n+        if (!TextUtils.isEmpty(walletUserAddress.getAddress4())) {\n+            address2.append(walletUserAddress.getAddress4());\n+            address2.append(\", \");\n+        }\n+        if (!TextUtils.isEmpty(walletUserAddress.getAddress4())) {\n+            address2.append(walletUserAddress.getAddress4());\n+            address2.append(\", \");\n+        }\n+        if (!TextUtils.isEmpty(walletUserAddress.getAddress5())) {\n+            address2.append(walletUserAddress.getAddress5());\n+        }\n+\n+        address.setAddress2(address2.toString());\n+\n+        address.setZip(walletUserAddress.getPostalCode());\n+        address.setCity(walletUserAddress.getLocality());\n+        address.setCountryCode(walletUserAddress.getCountryCode());\n+        address.setProvinceCode(walletUserAddress.getAdministrativeArea());\n+        address.setPhone(walletUserAddress.getPhoneNumber());\n+        return address;\n+    }\n+\n+    private static String[] extractFirstAndLastNames(String name) {\n+        String[] firstAndLastName = new String[2];\n+        String[] nameParts = name.split(\" \");\n+        if (nameParts.length > 0) {\n+            firstAndLastName[FIRST_NAME_PART] = (nameParts[FIRST_NAME_PART]);\n+        }\n+        int nameIndex = 1;\n+        String lastName = \"\";\n+        while (nameParts.length > nameIndex) {\n+            lastName += nameParts[nameIndex++];\n+        }\n+        firstAndLastName[LAST_NAME_PART] = lastName.trim();\n+        return firstAndLastName;\n+    }\n+\n+    /**\n+     * Creates a Masked Wallet Request from a Shopify Checkout\n+     *\n+     * @param merchantName        The merchant name to show on the Android Pay dialogs, not null or empty\n+     * @param checkout            The {@link Checkout} to use, not null.\n+     * @param buyClient           The {@link BuyClient} to use, not null.  Must have previously had Android Pay enabled via {@link BuyClient#enableAndroidPay(String)}\n+     * @param phoneNumberRequired If true, the phone number will be required as part of the Shipping Address in Android Pay\n+     * @return A {@link MaskedWalletRequest}\n+     */\n+    public static MaskedWalletRequest createMaskedWalletRequest(String merchantName, Checkout checkout, BuyClient buyClient, boolean phoneNumberRequired) {\n+        if (checkout == null) {\n+            throw new NullPointerException(\"checkout cannot be null\");\n+        }\n+\n+        if (buyClient == null) {\n+            throw new NullPointerException(\"buyClient cannot be null\");\n+        }\n+\n+        if (TextUtils.isEmpty(merchantName)) {\n+            throw new IllegalArgumentException(\"merchantName cannot be empty\");\n+        }\n+\n+        // Create the parameters that will be used for encrypting Network Tokens.\n+        PaymentMethodTokenizationParameters parameters =\n+                PaymentMethodTokenizationParameters.newBuilder()\n+                        .setPaymentMethodTokenizationType(PaymentMethodTokenizationType.NETWORK_TOKEN)\n+                        .addParameter(\"publicKey\", buyClient.getAndroidPayPublicKey())\n+                        .build();\n+\n+        // Create a Wallet cart from our Checkout.\n+        Cart walletCart = createWalletCart(checkout);\n+\n+        // These settings should be updated to reflect the requirements of the app.\n+        // The merchant name will be shown on the top of the Android Pay dialogs\n+        return MaskedWalletRequest.newBuilder()\n+                .setMerchantName(merchantName)\n+                .setPhoneNumberRequired(phoneNumberRequired)\n+                .setShippingAddressRequired(checkout.isRequiresShipping())\n+                .setCurrencyCode(checkout.getCurrency())\n+                .setEstimatedTotalPrice(checkout.getTotalPrice())\n+                .setPaymentMethodTokenizationParameters(parameters)\n+                .setCart(walletCart)\n+                .setPhoneNumberRequired(phoneNumberRequired)\n+                .build();\n+    }\n+\n+    /**\n+     * Creates a Full Wallet Request from a Shopify Checkout\n+     *\n+     * @param checkout     The {@link Checkout} to use, not null.\n+     * @param maskedWallet A {@link MaskedWallet} returned from a previous {@link MaskedWalletRequest} sent to Android Pay\n+     * @return A {@link FullWalletRequest} for use in retrieving a {@link com.google.android.gms.wallet.FullWallet}\n+     */\n+    public static FullWalletRequest createFullWalletRequest(Checkout checkout, MaskedWallet maskedWallet) {\n+        if (checkout == null) {\n+            throw new NullPointerException(\"checkout cannot be null\");\n+        }\n+\n+        if (maskedWallet == null) {\n+            throw new NullPointerException(\"maskedWallet cannot be null\");\n+        }\n+\n+        return FullWalletRequest.newBuilder()\n+                .setGoogleTransactionId(maskedWallet.getGoogleTransactionId())\n+                .setCart(createWalletCart(checkout))\n+                .build();\n+    }\n+\n+    /**\n+     * Will update the local checkout with the Addresses and email from a Masked Wallet.\n+     * If any of the City, Country Code, Province Code, or ZIP code have changed any shipping rate previously set\n+     * on the Checkout will be invalid and set to null. The checkout should be updated on Shopify using {@link BuyClient#updateCheckout(Checkout, Callback)},\n+     * and the shipping rate will need to be fetched again using {@link BuyClient#getShippingRates(String, Callback)}\n+     *\n+     * @param checkout     The {@link Checkout} to update\n+     * @param maskedWallet The {@link MaskedWallet} to use the address from\n+     */\n+    public static void updateCheckoutAddressAndEmail(Checkout checkout, MaskedWallet maskedWallet) {\n+        if (checkout == null) {\n+            throw new NullPointerException(\"checkout cannot be null\");\n+        }\n+\n+        if (maskedWallet == null) {\n+            throw new NullPointerException(\"maskedWallet cannot be null\");\n+        }\n+\n+        Address shippingAddress = createShopifyAddress(maskedWallet.getBuyerShippingAddress());\n+        Address billingAddress = createShopifyAddress(maskedWallet.getBuyerBillingAddress());\n+\n+        // If the location has changed, we need to invalidate the shipping address\n+        if (!shippingAddress.locationsAreEqual(checkout.getShippingAddress())) {\n+            checkout.setShippingRate(null);\n+        }\n+\n+        checkout.setShippingAddress(shippingAddress);\n+        checkout.setBillingAddress(billingAddress);\n+        checkout.setEmail(maskedWallet.getEmail());\n+    }\n+\n+    /**\n+     * Checks to see if Android Pay is available on device.\n+     *\n+     * It will check that:\n+     * 1) Play Services are available using {@link AndroidPayHelper#hasGooglePlayServices(Context)}\n+     * 2) The BuyClient has Android Pay enabled using {@link BuyClient#androidPayIsEnabled()}\n+     * 3) The Android Pay application is installed on device, and user has setup a valid card for In App Purchase using {@link AndroidPayHelper#isReadyToPay(GoogleApiClient, AndroidPayAvailableResponse)}\n+     *\n+     * @param context\n+     * @param buyClient The {@link BuyClient} to use, not null\n+     * @param apiClient The {@link GoogleApiClient}, not null\n+     * @param delegate  The {@link AndroidPayAvailableResponse} delegate for receiving the result\n+     */\n+    public static void androidPayIsAvailable(final Context context, final BuyClient buyClient, final GoogleApiClient apiClient, final AndroidPayAvailableResponse delegate) {","path":"MobileBuy/buy/src/main/java/com/shopify/buy/utils/AndroidPayHelper.java","position":302,"original_position":302,"commit_id":"75612e35dc1900faaa074829dd4a3dd1df9fe22f","original_commit_id":"0f18547ed7128b9f4a712e6896419cafec617ad1","user":{"login":"krisorr","id":1737920,"avatar_url":"https://avatars.githubusercontent.com/u/1737920?v=3","gravatar_id":"","url":"https://api.github.com/users/krisorr","html_url":"https://github.com/krisorr","followers_url":"https://api.github.com/users/krisorr/followers","following_url":"https://api.github.com/users/krisorr/following{/other_user}","gists_url":"https://api.github.com/users/krisorr/gists{/gist_id}","starred_url":"https://api.github.com/users/krisorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krisorr/subscriptions","organizations_url":"https://api.github.com/users/krisorr/orgs","repos_url":"https://api.github.com/users/krisorr/repos","events_url":"https://api.github.com/users/krisorr/events{/privacy}","received_events_url":"https://api.github.com/users/krisorr/received_events","type":"User","site_admin":false},"body":"okay, sounds good, will update.","created_at":"2016-05-12T01:53:38Z","updated_at":"2016-05-12T01:53:38Z","html_url":"https://github.com/Shopify/mobile-buy-sdk-android/pull/110#discussion_r62955264","pull_request_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/comments/62955264"},"html":{"href":"https://github.com/Shopify/mobile-buy-sdk-android/pull/110#discussion_r62955264"},"pull_request":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110","id":69712836,"html_url":"https://github.com/Shopify/mobile-buy-sdk-android/pull/110","diff_url":"https://github.com/Shopify/mobile-buy-sdk-android/pull/110.diff","patch_url":"https://github.com/Shopify/mobile-buy-sdk-android/pull/110.patch","issue_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/110","number":110,"state":"open","locked":false,"title":"Task/android pay v2","user":{"login":"krisorr","id":1737920,"avatar_url":"https://avatars.githubusercontent.com/u/1737920?v=3","gravatar_id":"","url":"https://api.github.com/users/krisorr","html_url":"https://github.com/krisorr","followers_url":"https://api.github.com/users/krisorr/followers","following_url":"https://api.github.com/users/krisorr/following{/other_user}","gists_url":"https://api.github.com/users/krisorr/gists{/gist_id}","starred_url":"https://api.github.com/users/krisorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krisorr/subscriptions","organizations_url":"https://api.github.com/users/krisorr/orgs","repos_url":"https://api.github.com/users/krisorr/repos","events_url":"https://api.github.com/users/krisorr/events{/privacy}","received_events_url":"https://api.github.com/users/krisorr/received_events","type":"User","site_admin":false},"body":"# What this does\r\n* adds Android Pay support to the API #63 \r\n* adds Android Pay to sample #64 \r\n\r\n# TBD\r\n* re-enable AndroidPay specific tests and augment them.  This is dependant on a subsequent PR changing some of the checkout apis #109\r\n\r\n@sav007 @yervantk please review","created_at":"2016-05-11T17:42:36Z","updated_at":"2016-05-12T01:53:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5cdb0b3cc11266ca12267f9428505efe9a57aca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110/commits","review_comments_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110/comments","review_comment_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/110/comments","statuses_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/statuses/75612e35dc1900faaa074829dd4a3dd1df9fe22f","head":{"label":"Shopify:task/android_pay_v2","ref":"task/android_pay_v2","sha":"75612e35dc1900faaa074829dd4a3dd1df9fe22f","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":43315252,"name":"mobile-buy-sdk-android","full_name":"Shopify/mobile-buy-sdk-android","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/mobile-buy-sdk-android","description":"Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using their credit card.","fork":false,"url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android","forks_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/forks","keys_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/teams","hooks_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/hooks","issue_events_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/events","assignees_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/tags","blobs_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/languages","stargazers_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/stargazers","contributors_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/contributors","subscribers_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/subscribers","subscription_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/subscription","commits_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/merges","archive_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/downloads","issues_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/deployments","created_at":"2015-09-28T17:19:37Z","updated_at":"2016-05-10T05:38:56Z","pushed_at":"2016-05-12T01:25:42Z","git_url":"git://github.com/Shopify/mobile-buy-sdk-android.git","ssh_url":"git@github.com:Shopify/mobile-buy-sdk-android.git","clone_url":"https://github.com/Shopify/mobile-buy-sdk-android.git","svn_url":"https://github.com/Shopify/mobile-buy-sdk-android","homepage":"","size":1773,"stargazers_count":18,"watchers_count":18,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":27,"forks":11,"open_issues":27,"watchers":18,"default_branch":"master"}},"base":{"label":"Shopify:version-2","ref":"version-2","sha":"ef471737e7217a63076655a75776e5fd8bd8b8e0","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":43315252,"name":"mobile-buy-sdk-android","full_name":"Shopify/mobile-buy-sdk-android","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/mobile-buy-sdk-android","description":"Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using their credit card.","fork":false,"url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android","forks_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/forks","keys_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/teams","hooks_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/hooks","issue_events_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/events","assignees_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/tags","blobs_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/languages","stargazers_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/stargazers","contributors_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/contributors","subscribers_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/subscribers","subscription_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/subscription","commits_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/merges","archive_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/downloads","issues_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/deployments","created_at":"2015-09-28T17:19:37Z","updated_at":"2016-05-10T05:38:56Z","pushed_at":"2016-05-12T01:25:42Z","git_url":"git://github.com/Shopify/mobile-buy-sdk-android.git","ssh_url":"git@github.com:Shopify/mobile-buy-sdk-android.git","clone_url":"https://github.com/Shopify/mobile-buy-sdk-android.git","svn_url":"https://github.com/Shopify/mobile-buy-sdk-android","homepage":"","size":1773,"stargazers_count":18,"watchers_count":18,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":27,"forks":11,"open_issues":27,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110"},"html":{"href":"https://github.com/Shopify/mobile-buy-sdk-android/pull/110"},"issue":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/110"},"comments":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/mobile-buy-sdk-android/statuses/75612e35dc1900faaa074829dd4a3dd1df9fe22f"}}}}