Android Open Source - Android-Print-SDK Kite Print S D K






From Project

Back to project page Android-Print-SDK.

License

The source code is released under:

MIT License

If you think the Android project Android-Print-SDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ly.kite.print;
// w ww  .  j  ava  2s .c o  m
import com.paypal.android.sdk.payments.PaymentActivity;

/**
 * Created by deonbotha on 29/01/2014.
 */
public class KitePrintSDK {

    private static final String PAYPAL_CLIENT_ID_SANDBOX = "Aa5nsBDntBpozWQykoxQXoHFOqs551hTNt0B8LQXTudoh8bD0nT1F735c_Fh";
    private static final String PAYPAL_RECIPIENT_SANDBOX = "hello-facilitator@psilov.eu";
    private static final String PAYPAL_CLIENT_ID_LIVE = "AT2JfBAmXD-CHGJnUb05ik4J-GrCi4XxjY9_grfCFjreYaLrNswj8uzhuWyj";
    private static final String PAYPAL_RECIPIENT_LIVE = "deon@oceanlabs.co";

    public static enum Environment {
        LIVE("https://api.kite.ly", PaymentActivity.ENVIRONMENT_LIVE, PAYPAL_CLIENT_ID_LIVE, PAYPAL_RECIPIENT_LIVE),
        TEST("https://api.kite.ly", PaymentActivity.ENVIRONMENT_SANDBOX, PAYPAL_CLIENT_ID_SANDBOX, PAYPAL_RECIPIENT_SANDBOX),
        STAGING("http://staging.api.kite.ly", PaymentActivity.ENVIRONMENT_SANDBOX, PAYPAL_CLIENT_ID_SANDBOX, PAYPAL_RECIPIENT_SANDBOX); /* private environment intended only for Ocean Labs use, hands off :) */

        private final String apiEndpoint;
        private final String payPalEnvironment;
        private final String payPalClientId;
        private final String payPalRecipient;

        private Environment(String apiEndpoint, String payPalEnvironment, String payPalClientId, String payPalRecipient) {
            this.apiEndpoint = apiEndpoint;
            this.payPalEnvironment = payPalEnvironment;
            this.payPalClientId = payPalClientId;
            this.payPalRecipient = payPalRecipient;
        }

        public String getPrintAPIEndpoint() {
            return apiEndpoint;
        }

        public String getPayPalClientId() {
            return payPalClientId;
        }

        public String getPayPalEnvironment() {
            return payPalEnvironment;
        }

        public String getPayPalReceiverEmail() {
            return payPalRecipient;
        }
    }

    private static String apiKey;
    private static Environment environment;

    public static void initialize(String apiKey) {
        KitePrintSDK.apiKey = apiKey;
        KitePrintSDK.environment = Environment.LIVE;
    }

    public static void initialize(String apiKey, Environment env) {
        KitePrintSDK.apiKey = apiKey;
        KitePrintSDK.environment = env;
    }

    public static String getAPIKey() {
        return apiKey;
    }

    public static Environment getEnvironment() {
        return environment;
    }
}




Java Source Code List

co.oceanlabs.sample.MainActivity.java
ly.kite.address.AddressBookActivity.java
ly.kite.address.AddressEditActivity.java
ly.kite.address.AddressSearchActivity.java
ly.kite.address.AddressSearchRequestListener.java
ly.kite.address.AddressSearchRequest.java
ly.kite.address.Address.java
ly.kite.address.Country.java
ly.kite.checkout.CheckoutActivity.java
ly.kite.checkout.OrderReceiptActivity.java
ly.kite.checkout.PaymentActivity.java
ly.kite.checkout.PrintOrderSummaryListAdapter.java
ly.kite.payment.CheckPromoCodeRequestListener.java
ly.kite.payment.CheckPromoRequest.java
ly.kite.payment.PayPalCardChargeListener.java
ly.kite.payment.PayPalCardVaultStorageListener.java
ly.kite.payment.PayPalCard.java
ly.kite.print.ApplyPromoCodeListener.java
ly.kite.print.AssetGetBytesLengthListener.java
ly.kite.print.AssetGetBytesListener.java
ly.kite.print.AssetUploadRequestListener.java
ly.kite.print.AssetUploadRequest.java
ly.kite.print.Asset.java
ly.kite.print.BaseRequest.java
ly.kite.print.KitePrintSDKException.java
ly.kite.print.KitePrintSDK.java
ly.kite.print.PrintJob.java
ly.kite.print.PrintOrderSubmissionListener.java
ly.kite.print.PrintOrder.java
ly.kite.print.PrintsPrintJob.java
ly.kite.print.ProductType.java
ly.kite.print.SubmitPrintOrderRequestListener.java
ly.kite.print.SubmitPrintOrderRequest.java