Package com.braintreegateway.exceptions

Examples of com.braintreegateway.exceptions.NotFoundException


     */
    public Result<PaymentMethodNonce> forward(PaymentMethodForwardRequest forwardRequest) {
        String receivingMerchantId = forwardRequest.getReceivingMerchantId();
        String token = forwardRequest.getToken();
        if (token == null || token.trim().equals(""))
            throw new NotFoundException("Token is required");
        if(receivingMerchantId == null || receivingMerchantId.trim().equals(""))
            throw new NotFoundException("Receiving merchant ID is required");

        try {
          NodeWrapper node = http.post("/payment_methods/forward", forwardRequest);
          return new Result<PaymentMethodNonce>(node, PaymentMethodNonce.class);
        } catch (NotFoundException e) {
          throw new NotFoundException("Receiving merchant or payment metod not found");
        }
    }
View Full Code Here


     * @param id the id of the {@link Transaction}.
     * @return the {@link Transaction} or raises a {@link com.braintreegateway.exceptions.NotFoundException}.
     */
    public Transaction find(String id) {
        if(id == null || id.trim().equals(""))
            throw new NotFoundException();
        return new Transaction(http.get("/transactions/" + id));
    }
View Full Code Here

        return new Result<UnknownPaymentMethod>();
    }

    public PaymentMethod find(String token) {
        if(token == null || token.trim().equals(""))
            throw new NotFoundException();

        NodeWrapper response = http.get("/payment_methods/any/" + token);

        if (response.getElementName() == "paypal-account") {
            return new PayPalAccount(response);
View Full Code Here

     * @return the {@link CreditCard} or raises a
     *         {@link com.braintreegateway.exceptions.NotFoundException}.
     */
    public CreditCard find(String token) {
        if(token == null || token.trim().equals(""))
            throw new NotFoundException();

        return new CreditCard(http.get("/payment_methods/credit_card/" + token));
    }
View Full Code Here

        return items;
    }

    public CreditCardVerification find(String id) {
        if(id == null || id.trim().equals(""))
            throw new NotFoundException();

        return new CreditCardVerification(http.get("/verifications/" + id));
    }
View Full Code Here

        return new Result<MerchantAccount>(response, MerchantAccount.class);
    }

    public MerchantAccount find(String id) {
        if(id == null || id.trim().equals(""))
            throw new NotFoundException();
        return new MerchantAccount(http.get("/merchant_accounts/" + id));
    }
View Full Code Here

     * @param id the id of the {@link Address}.
     * @return the {@link Address} or raises a {@link com.braintreegateway.exceptions.NotFoundException}.
     */
    public Address find(String customerId, String id) {
        if(customerId == null || customerId.trim().equals("") || id == null || id.trim().equals(""))
            throw new NotFoundException();

        return new Address(http.get("/customers/" + customerId + "/addresses/" + id));
    }
View Full Code Here

     * @return the {@link CreditCard} or raises a
     *         {@link com.braintreegateway.exceptions.NotFoundException}.
     */
    public CreditCard find(String token) {
        if(token.trim().equals("") || token == null)
            throw new NotFoundException();

        return new CreditCard(http.get("/payment_methods/" + token));
    }
View Full Code Here

     * @param id the id of the {@link Transaction}.
     * @return the {@link Transaction} or raises a {@link com.braintreegateway.exceptions.NotFoundException}.
     */
    public Transaction find(String id) {
        if(id == null || id.trim().equals(""))
            throw new NotFoundException();
        return new Transaction(http.get("/transactions/" + id));
    }
View Full Code Here

     * @param id the id of the {@link Transaction}.
     * @return the {@link Transaction} or raises a {@link com.braintreegateway.exceptions.NotFoundException}.
     */
    public Transaction find(String id) {
        if(id == null || id.trim().equals(""))
            throw new NotFoundException();
        return new Transaction(http.get("/transactions/" + id));
    }
View Full Code Here

TOP

Related Classes of com.braintreegateway.exceptions.NotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.