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

com.youcruit.billogram.client.CustomerClient Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
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