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

com.softlayer.api.service.account.external.Setup Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.account.external;

import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.billing.payment.card.Transaction;
import com.softlayer.api.service.container.account.external.setup.ProvisioningHoldLifted;
import java.util.concurrent.Future;

/**
 * This service class allows the user to set up an account to be billed by an external billing system. 
 *
 * @see SoftLayer_Account_External_Setup
 */
@ApiType("SoftLayer_Account_External_Setup")
public class Setup extends Entity {

    /**
     * The transaction information related to verifying the customer credit card.
     */
    @ApiProperty
    protected Transaction verifyCardTransaction;

    public Transaction getVerifyCardTransaction() {
        return verifyCardTransaction;
    }

    public void setVerifyCardTransaction(Transaction verifyCardTransaction) {
        this.verifyCardTransaction = verifyCardTransaction;
    }

    /**
     * The SoftLayer customer account the request belongs to.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long accountId;

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        accountIdSpecified = true;
        this.accountId = accountId;
    }

    protected boolean accountIdSpecified;

    public boolean isAccountIdSpecified() {
        return accountIdSpecified;
    }

    public void unsetAccountId() {
        accountId = null;
        accountIdSpecified = false;
    }

    /**
     * The currency requested after the billing switch.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long currencyId;

    public Long getCurrencyId() {
        return currencyId;
    }

    public void setCurrencyId(Long currencyId) {
        currencyIdSpecified = true;
        this.currencyId = currencyId;
    }

    protected boolean currencyIdSpecified;

    public boolean isCurrencyIdSpecified() {
        return currencyIdSpecified;
    }

    public void unsetCurrencyId() {
        currencyId = null;
        currencyIdSpecified = false;
    }

    /**
     * The unique identifier for this setup request.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        idSpecified = true;
        this.id = id;
    }

    protected boolean idSpecified;

    public boolean isIdSpecified() {
        return idSpecified;
    }

    public void unsetId() {
        id = null;
        idSpecified = false;
    }

    /**
     * The external system that will handle billing.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long serviceProviderId;

    public Long getServiceProviderId() {
        return serviceProviderId;
    }

    public void setServiceProviderId(Long serviceProviderId) {
        serviceProviderIdSpecified = true;
        this.serviceProviderId = serviceProviderId;
    }

    protected boolean serviceProviderIdSpecified;

    public boolean isServiceProviderIdSpecified() {
        return serviceProviderIdSpecified;
    }

    public void unsetServiceProviderId() {
        serviceProviderId = null;
        serviceProviderIdSpecified = false;
    }

    /**
     * The status of the account setup request.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String statusCode;

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        statusCodeSpecified = true;
        this.statusCode = statusCode;
    }

    protected boolean statusCodeSpecified;

    public boolean isStatusCodeSpecified() {
        return statusCodeSpecified;
    }

    public void unsetStatusCode() {
        statusCode = null;
        statusCodeSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected String typeCode;

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        typeCodeSpecified = true;
        this.typeCode = typeCode;
    }

    protected boolean typeCodeSpecified;

    public boolean isTypeCodeSpecified() {
        return typeCodeSpecified;
    }

    public void unsetTypeCode() {
        typeCode = null;
        typeCodeSpecified = false;
    }

    /**
     * The related credit card transaction record for card verification.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long verifyCardTransactionId;

    public Long getVerifyCardTransactionId() {
        return verifyCardTransactionId;
    }

    public void setVerifyCardTransactionId(Long verifyCardTransactionId) {
        verifyCardTransactionIdSpecified = true;
        this.verifyCardTransactionId = verifyCardTransactionId;
    }

    protected boolean verifyCardTransactionIdSpecified;

    public boolean isVerifyCardTransactionIdSpecified() {
        return verifyCardTransactionIdSpecified;
    }

    public void unsetVerifyCardTransactionId() {
        verifyCardTransactionId = null;
        verifyCardTransactionIdSpecified = false;
    }

    public Service asService(ApiClient client) {
        return service(client, id);
    }

    public static Service service(ApiClient client) {
        return client.createService(Service.class, null);
    }

    public static Service service(ApiClient client, Long id) {
        return client.createService(Service.class, id == null ? null : id.toString());
    }

    /**
     * This service class allows the user to set up an account to be billed by an external billing system. 
     *
     * @see SoftLayer_Account_External_Setup
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Account_External_Setup")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Calling this method signals that the account with the provided account id is ready to be billed by the external billing system. 
         *
         * @see SoftLayer_Account_External_Setup::finalizeExternalBillingForAccount
         */
        @ApiMethod
        public ProvisioningHoldLifted finalizeExternalBillingForAccount(Long accountId);

        /**
         * @see SoftLayer_Account_External_Setup::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Setup getObject();

        /**
         * The transaction information related to verifying the customer credit card.
         *
         * @see SoftLayer_Account_External_Setup::getVerifyCardTransaction
         */
        @ApiMethod(instanceRequired = true)
        public Transaction getVerifyCardTransaction();

    }

    public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {

        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Async version of {@link Service#finalizeExternalBillingForAccount}
         */
        public Future finalizeExternalBillingForAccount(Long accountId);

        public Future finalizeExternalBillingForAccount(Long accountId, ResponseHandler callback);

        /**
         * Async version of {@link Service#getObject}
         */
        public Future getObject();

        public Future getObject(ResponseHandler callback);

        /**
         * Async version of {@link Service#getVerifyCardTransaction}
         */
        public Future getVerifyCardTransaction();

        /**
         * Async callback version of {@link Service#getVerifyCardTransaction}
         */
        public Future getVerifyCardTransaction(ResponseHandler callback);

    }

    public static class Mask extends com.softlayer.api.service.Entity.Mask {

        public com.softlayer.api.service.billing.payment.card.Transaction.Mask verifyCardTransaction() {
            return withSubMask("verifyCardTransaction", com.softlayer.api.service.billing.payment.card.Transaction.Mask.class);
        }

        public Mask accountId() {
            withLocalProperty("accountId");
            return this;
        }

        public Mask currencyId() {
            withLocalProperty("currencyId");
            return this;
        }

        public Mask id() {
            withLocalProperty("id");
            return this;
        }

        public Mask serviceProviderId() {
            withLocalProperty("serviceProviderId");
            return this;
        }

        public Mask statusCode() {
            withLocalProperty("statusCode");
            return this;
        }

        public Mask typeCode() {
            withLocalProperty("typeCode");
            return this;
        }

        public Mask verifyCardTransactionId() {
            withLocalProperty("verifyCardTransactionId");
            return this;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy