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

com.softlayer.api.service.product.Promotion Maven / Gradle / Ivy

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

import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import java.util.concurrent.Future;

/**
 * The promotion web service is used to find information regarding a specific promotion using a promotion code. 
 *
 * @see SoftLayer_Product_Promotion
 */
@ApiType("SoftLayer_Product_Promotion")
public class Promotion extends Entity {

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

    /**
     * The promotion web service is used to find information regarding a specific promotion using a promotion code. 
     *
     * @see SoftLayer_Product_Promotion
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Product_Promotion")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * Retrieves a promotion using its code.
         *
         * @see SoftLayer_Product_Promotion::findByPromoCode
         */
        @ApiMethod
        public com.softlayer.api.service.container.product.Promotion findByPromoCode(String code);

        /**
         * @see SoftLayer_Product_Promotion::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Promotion getObject();

    }

    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#findByPromoCode}
         */
        public Future findByPromoCode(String code);

        public Future findByPromoCode(String code, ResponseHandler callback);

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

        public Future getObject(ResponseHandler callback);

    }

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy