All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taxjar.net.Endpoints Maven / Gradle / Ivy

There is a newer version: 5.0.3
Show newest version
package com.taxjar.net;

import com.taxjar.model.categories.CategoryResponse;
import com.taxjar.model.customers.CustomerResponse;
import com.taxjar.model.customers.CustomersResponse;
import com.taxjar.model.nexus.RegionResponse;
import com.taxjar.model.rates.RateResponse;
import com.taxjar.model.summarized_rates.SummaryRateResponse;
import com.taxjar.model.taxes.TaxResponse;
import com.taxjar.model.transactions.OrderResponse;
import com.taxjar.model.transactions.OrdersResponse;
import com.taxjar.model.transactions.RefundResponse;
import com.taxjar.model.transactions.RefundsResponse;
import com.taxjar.model.validations.AddressResponse;
import com.taxjar.model.validations.ValidationResponse;

import retrofit2.Call;
import retrofit2.http.*;

import java.util.Map;

public interface Endpoints
{
    @GET("categories")
    Call getCategories();

    @GET("rates/{zip}")
    Call getRate(@Path("zip") String zip);

    @GET("rates/{zip}")
    Call getRate(@Path("zip") String zip, @QueryMap Map params);

    @POST("taxes")
    Call getTax(@Body Map params);

    @GET("transactions/orders")
    Call getOrders();

    @GET("transactions/orders")
    Call getOrders(@QueryMap Map params);

    @GET("transactions/orders/{transactionId}")
    Call getOrder(@Path("transactionId") String transactionId);

    @POST("transactions/orders")
    Call createOrder(@Body Map params);

    @PUT("transactions/orders/{transactionId}")
    Call updateOrder(@Path("transactionId") String transactionId, @Body Map params);

    @DELETE("transactions/orders/{transactionId}")
    Call deleteOrder(@Path("transactionId") String transactionId);

    @GET("transactions/refunds")
    Call getRefunds();

    @GET("transactions/refunds")
    Call getRefunds(@QueryMap Map params);

    @GET("transactions/refunds/{transactionId}")
    Call getRefund(@Path("transactionId") String transactionId);

    @POST("transactions/refunds")
    Call createRefund(@Body Map params);

    @PUT("transactions/refunds/{transactionId}")
    Call updateRefund(@Path("transactionId") String transactionId, @Body Map params);

    @DELETE("transactions/refunds/{transactionId}")
    Call deleteRefund(@Path("transactionId") String transactionId);

    @GET("customers")
    Call getCustomers();

    @GET("customers")
    Call getCustomers(@QueryMap Map params);

    @GET("customers/{customerId}")
    Call getCustomer(@Path("customerId") String customerId);

    @POST("customers")
    Call createCustomer(@Body Map params);

    @PUT("customers/{customerId}")
    Call updateCustomer(@Path("customerId") String customerId, @Body Map params);

    @DELETE("customers/{customerId}")
    Call deleteCustomer(@Path("customerId") String customerId);

    @GET("nexus/regions")
    Call getRegions();

    @POST("addresses/validate")
    Call getAddresses(@Body Map params);

    @GET("validation")
    Call getValidation(@QueryMap Map params);

    @GET("summary_rates")
    Call getSummaryRates();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy