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

com.vendasta.sales.v1.internal.SalesHTTPClient Maven / Gradle / Ivy

The newest version!
/**
 Code generated by sdkgen
 Generated on 2020-04-07 19:12:16.797285 +0000 UTC using container gcr.io/repcore-prod/sdkgen:latest
 DO NOT EDIT!
*/

package com.vendasta.sales.v1.internal;

import com.google.protobuf.*;
import com.vendasta.sales.v1.generated.ApiProto;
import com.vendasta.sales.v1.generated.SalespersonProto;
import com.vendasta.vax.RequestOptions;
import com.vendasta.vax.HTTPClient;
import com.vendasta.vax.SDKException;
import java.io.InputStream;


public class SalesHTTPClient extends HTTPClient implements SalesClientInterface {
    public SalesHTTPClient(String host, String scope, boolean secure) {
        super(host, scope, secure);
    }

    public SalesHTTPClient(String host, String scope, boolean secure, float defaultTimeout) {
        super(host, scope, secure, defaultTimeout);
    }

    public SalesHTTPClient(String host, String scope, InputStream serviceAccount, boolean secure, float defaultTimeout) {
        super(host, scope, serviceAccount, secure, defaultTimeout);
    }
    
    public GetAutoAssignConfigResponse GetAutoAssignConfig(GetAutoAssignConfigRequest req, RequestOptions.Builder options) throws SDKException {
        ApiProto.GetAutoAssignConfigResponse.Builder builder = this.doRequest(
            "/sales.v1.Sales/GetAutoAssignConfig",
            req.toProto(),
            ApiProto.GetAutoAssignConfigResponse.newBuilder(),
            options
        );
        return GetAutoAssignConfigResponse.fromProto(builder.build());
    }
    
    public Empty CreateOrUpdateAutoAssignConfig(CreateOrUpdateAutoAssignConfigRequest req, RequestOptions.Builder options) throws SDKException {
        Empty.Builder builder = this.doRequest(
            "/sales.v1.Sales/CreateOrUpdateAutoAssignConfig",
            req.toProto(),
            Empty.newBuilder(),
            options
        );
        return builder.build();
    }
    
    public Salesperson GetSalesperson(GetSalespersonRequest req, RequestOptions.Builder options) throws SDKException {
        SalespersonProto.Salesperson.Builder builder = this.doRequest(
            "/sales.v1.Sales/GetSalesperson",
            req.toProto(),
            SalespersonProto.Salesperson.newBuilder(),
            options
        );
        return Salesperson.fromProto(builder.build());
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy