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

com.tencentcloudapi.ip.v20210409.IpClient Maven / Gradle / Ivy

There is a newer version: 3.0.1034
Show newest version
/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.tencentcloudapi.ip.v20210409;

import java.lang.reflect.Type;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.AbstractClient;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.JsonResponseModel;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.ip.v20210409.models.*;

public class IpClient extends AbstractClient{
    private static String endpoint = "ip.tencentcloudapi.com";
    private static String service = "ip";
    private static String version = "2021-04-09";
    
    public IpClient(Credential credential, String region) {
        this(credential, region, new ClientProfile());
    }

    public IpClient(Credential credential, String region, ClientProfile profile) {
        super(IpClient.endpoint, IpClient.version, credential, region, profile);
    }

    /**
     *This API is used for a partner to set credit for a customer, such as increasing or lowering the credit and setting it to 0.
1. The credit is valid permanently and will not be zeroed regularly.
2. The customer's service will be suspended when its available credit sets to 0, so caution should be exercised with this operation.
3. To prevent the customer from making new purchases without affecting their use of previously purchased products, the partner can set their available credit to 0 after obtaining the non-stop feature privilege from the channel manager.
4. The set credit is an increase to the current available credit and cannot exceed the remaining allocable credit. Setting the credit to a negative value indicates to repossess it. The available credit can be set to 0 at the minimum.
     * @param req AllocateCustomerCreditRequest
     * @return AllocateCustomerCreditResponse
     * @throws TencentCloudSDKException
     */
    public AllocateCustomerCreditResponse AllocateCustomerCredit(AllocateCustomerCreditRequest req) throws TencentCloudSDKException{
        req.setSkipSign(false);
        return this.internalRequest(req, "AllocateCustomerCredit", AllocateCustomerCreditResponse.class);
    }

    /**
     *This API is used to create a Tencent Cloud account in the International Partner platform for a customer. After registration, the customer will be automatically bound to the partner account.

Notes:
1. To create the Tencent Cloud account, the partner should enter and verify the customer’s email address and mobile number.
2. The customer needs to complete personal information after the first login. * @param req CreateAccountRequest * @return CreateAccountResponse * @throws TencentCloudSDKException */ public CreateAccountResponse CreateAccount(CreateAccountRequest req) throws TencentCloudSDKException{ req.setSkipSign(false); return this.internalRequest(req, "CreateAccount", CreateAccountResponse.class); } /** *This API is used to obtain country and region codes. * @param req GetCountryCodesRequest * @return GetCountryCodesResponse * @throws TencentCloudSDKException */ public GetCountryCodesResponse GetCountryCodes(GetCountryCodesRequest req) throws TencentCloudSDKException{ req.setSkipSign(false); return this.internalRequest(req, "GetCountryCodes", GetCountryCodesResponse.class); } /** *This API is used to query all the credit allocation records of a single customer. * @param req QueryCreditAllocationHistoryRequest * @return QueryCreditAllocationHistoryResponse * @throws TencentCloudSDKException */ public QueryCreditAllocationHistoryResponse QueryCreditAllocationHistory(QueryCreditAllocationHistoryRequest req) throws TencentCloudSDKException{ req.setSkipSign(false); return this.internalRequest(req, "QueryCreditAllocationHistory", QueryCreditAllocationHistoryResponse.class); } /** *This API is used for a partner to query a customer's credit and basic information. * @param req QueryCustomersCreditRequest * @return QueryCustomersCreditResponse * @throws TencentCloudSDKException */ public QueryCustomersCreditResponse QueryCustomersCredit(QueryCustomersCreditRequest req) throws TencentCloudSDKException{ req.setSkipSign(false); return this.internalRequest(req, "QueryCustomersCredit", QueryCustomersCreditResponse.class); } /** *This API is used for a partner to query its own total credit, available credit, and used credit in USD. * @param req QueryPartnerCreditRequest * @return QueryPartnerCreditResponse * @throws TencentCloudSDKException */ public QueryPartnerCreditResponse QueryPartnerCredit(QueryPartnerCreditRequest req) throws TencentCloudSDKException{ req.setSkipSign(false); return this.internalRequest(req, "QueryPartnerCredit", QueryPartnerCreditResponse.class); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy