com.youcruit.billogram.client.CustomerClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of billogram-v2-api-java-lib Show documentation
Show all versions of billogram-v2-api-java-lib Show documentation
Library for connecting to the Billogram v2 API
package com.youcruit.billogram.client;
import java.io.IOException;
import com.youcruit.billogram.client.http.HttpClient;
import com.youcruit.billogram.objects.request.Search;
import com.youcruit.billogram.objects.request.customer.CustomerFilterField;
import com.youcruit.billogram.objects.request.customer.CustomerOrderField;
import com.youcruit.billogram.objects.response.customer.Customer;
import com.youcruit.billogram.objects.response.customer.CustomerResponse;
import com.youcruit.billogram.objects.response.customer.CustomerSearchResponse;
public class CustomerClient extends AbstractRestClient {
public CustomerClient(HttpClient httpClient) {
super(httpClient, "customer", CustomerSearchResponse.class, CustomerResponse.class);
}
@Override
protected String getId(Customer fullCustomer) {
return fullCustomer.getCustomerNo().toString();
}
@Override
public CustomerResponse create(Customer fullCustomer) throws IOException {
return super.create(fullCustomer);
}
@Override
public void createAsync(Customer fullCustomer, BillogramCallback callback) {
super.createAsync(fullCustomer, callback);
}
public CustomerResponse get(Integer id) throws IOException {
return super.get(String.valueOf(id));
}
public void getAsync(Integer id, BillogramCallback callback) {
super.getAsync(String.valueOf(id), callback);
}
@Override
public CustomerSearchResponse search(Search search) throws IOException {
return super.search(search);
}
@Override
public void searchAsync(Search search, BillogramCallback callback) {
super.searchAsync(search, callback);
}
@Override
public CustomerResponse update(Customer fullCustomer) throws IOException {
return super.update(fullCustomer);
}
@Override
public void updateAsync(Customer fullCustomer, BillogramCallback callback) {
super.updateAsync(fullCustomer, callback);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy