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

com.softlayer.api.service.billing.item.cancellation.Request Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.billing.item.cancellation;

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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.Ticket;
import com.softlayer.api.service.billing.item.cancellation.request.Item;
import com.softlayer.api.service.billing.item.cancellation.request.Status;
import com.softlayer.api.service.user.Customer;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * SoftLayer_Billing_Item_Cancellation_Request data type is used to cancel service billing items. 
 *
 * @see SoftLayer_Billing_Item_Cancellation_Request
 */
@ApiType("SoftLayer_Billing_Item_Cancellation_Request")
public class Request extends Entity {

    /**
     * The SoftLayer account that a service cancellation request belongs to.
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    /**
     * A collection of service cancellation items.
     */
    @ApiProperty
    protected List items;

    public List getItems() {
        if (items == null) {
            items = new ArrayList();
        }
        return items;
    }

    /**
     * The status of a service cancellation request.
     */
    @ApiProperty
    protected Status status;

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    /**
     * The ticket that is associated with the service cancellation request.
     */
    @ApiProperty
    protected Ticket ticket;

    public Ticket getTicket() {
        return ticket;
    }

    public void setTicket(Ticket ticket) {
        this.ticket = ticket;
    }

    /**
     * The user that initiated a service cancellation request.
     */
    @ApiProperty
    protected Customer user;

    public Customer getUser() {
        return user;
    }

    public void setUser(Customer user) {
        this.user = user;
    }

    /**
     * The internal identifier of the customer account that a service cancellation record 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 last modified date.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long billingCancelReasonId;

    public Long getBillingCancelReasonId() {
        return billingCancelReasonId;
    }

    public void setBillingCancelReasonId(Long billingCancelReasonId) {
        billingCancelReasonIdSpecified = true;
        this.billingCancelReasonId = billingCancelReasonId;
    }

    protected boolean billingCancelReasonIdSpecified;

    public boolean isBillingCancelReasonIdSpecified() {
        return billingCancelReasonIdSpecified;
    }

    public void unsetBillingCancelReasonId() {
        billingCancelReasonId = null;
        billingCancelReasonIdSpecified = false;
    }

    /**
     * The date that a cancellation request was created.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar createDate;

    public GregorianCalendar getCreateDate() {
        return createDate;
    }

    public void setCreateDate(GregorianCalendar createDate) {
        createDateSpecified = true;
        this.createDate = createDate;
    }

    protected boolean createDateSpecified;

    public boolean isCreateDateSpecified() {
        return createDateSpecified;
    }

    public void unsetCreateDate() {
        createDate = null;
        createDateSpecified = false;
    }

    /**
     * A cancellation record's internal identifier.
     */
    @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 last modified date.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar modifyDate;

    public GregorianCalendar getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(GregorianCalendar modifyDate) {
        modifyDateSpecified = true;
        this.modifyDate = modifyDate;
    }

    protected boolean modifyDateSpecified;

    public boolean isModifyDateSpecified() {
        return modifyDateSpecified;
    }

    public void unsetModifyDate() {
        modifyDate = null;
        modifyDateSpecified = false;
    }

    /**
     * Brief cancellation note. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String notes;

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        notesSpecified = true;
        this.notes = notes;
    }

    protected boolean notesSpecified;

    public boolean isNotesSpecified() {
        return notesSpecified;
    }

    public void unsetNotes() {
        notes = null;
        notesSpecified = false;
    }

    /**
     * An internal identifier of the service cancellation status that this request is associated with. When a service cancellation is submitted, it will be in "Pending" status until SoftLayer Sales team reviews it. The status of a cancellation request will be updated to "Approved" or "Voided" by SoftLayer Sales. 
*
* It will be updated to "Complete" when all services are reclaimed. */ @ApiProperty(canBeNullOrNotSet = true) protected Long statusId; public Long getStatusId() { return statusId; } public void setStatusId(Long statusId) { statusIdSpecified = true; this.statusId = statusId; } protected boolean statusIdSpecified; public boolean isStatusIdSpecified() { return statusIdSpecified; } public void unsetStatusId() { statusId = null; statusIdSpecified = false; } /** * An internal identifier of the ticket that is associated with a service cancellation request. When a service cancellation is submitted, a support ticket will be created. This ticket contains details on your service cancellation details and SoftLayer Sales team will use it to further communicate with you. */ @ApiProperty(canBeNullOrNotSet = true) protected Long ticketId; public Long getTicketId() { return ticketId; } public void setTicketId(Long ticketId) { ticketIdSpecified = true; this.ticketId = ticketId; } protected boolean ticketIdSpecified; public boolean isTicketIdSpecified() { return ticketIdSpecified; } public void unsetTicketId() { ticketId = null; ticketIdSpecified = false; } /** * A count of a collection of service cancellation items. */ @ApiProperty protected Long itemCount; public Long getItemCount() { return itemCount; } public void setItemCount(Long itemCount) { this.itemCount = itemCount; } 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()); } /** * SoftLayer customers can use this API to submit a cancellation request. A single service cancellation can contain multiple cancellation items which contain a billing item. * * @see SoftLayer_Billing_Item_Cancellation_Request */ @com.softlayer.api.annotation.ApiService("SoftLayer_Billing_Item_Cancellation_Request") public static interface Service extends com.softlayer.api.Service { public ServiceAsync asAsync(); public Mask withNewMask(); public Mask withMask(); public void setMask(Mask mask); /** * This method creates a service cancellation request.
*
* You need to have "Cancel Services" privilege to create a cancellation request. You have to provide at least one SoftLayer_Billing_Item_Cancellation_Request_Item in the "items" property. Make sure billing item's category code belongs to the cancelable product codes. You can retrieve the cancelable product category by the [[SoftLayer_Product_Item_Category::getValidCancelableServiceItemCategories|product category]] service. * * @see SoftLayer_Billing_Item_Cancellation_Request::createObject */ @ApiMethod public Request createObject(Request templateObject); /** * This method returns all service cancellation requests.
*
* Make sure to include the "resultLimit" in the SOAP request header for quicker response. If there is no result limit header is passed, it will return the latest 25 results by default. * * @see SoftLayer_Billing_Item_Cancellation_Request::getAllCancellationRequests */ @ApiMethod public List getAllCancellationRequests(); /** * Services can be canceled 2 or 3 days prior to your next bill date. This service returns the time by which a cancellation request submission is permitted in the current billing cycle. If the current time falls into the cut off date, this will return next earliest cancellation cut off date.
*
* Available category codes are: service, server * * @see SoftLayer_Billing_Item_Cancellation_Request::getCancellationCutoffDate */ @ApiMethod public GregorianCalendar getCancellationCutoffDate(Long accountId, String categoryCode); /** * getObject retrieves the SoftLayer_Billing_Item_Cancellation_Request object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item_Cancellation_Request service. You can only retrieve cancellation request records that are assigned to your SoftLayer account. * * @see SoftLayer_Billing_Item_Cancellation_Request::getObject */ @ApiMethod(instanceRequired = true) public Request getObject(); /** * This method removes a cancellation item from a cancellation request that is in "Pending" or "Approved" status. * * @see SoftLayer_Billing_Item_Cancellation_Request::removeCancellationItem */ @ApiMethod(instanceRequired = true) public Boolean removeCancellationItem(Long itemId); /** * This method examined if a billing item is eligible for cancellation. It checks if the billing item you provided is already in your existing cancellation request. * * @see SoftLayer_Billing_Item_Cancellation_Request::validateBillingItemForCancellation */ @ApiMethod public Boolean validateBillingItemForCancellation(Long billingItemId); /** * This method voids a service cancellation request in "Pending" or "Approved" status. * * @see SoftLayer_Billing_Item_Cancellation_Request::void */ @ApiMethod(value = "void", instanceRequired = true) public Boolean requestVoid(Boolean closeRelatedTicketFlag); /** * The SoftLayer account that a service cancellation request belongs to. * * @see SoftLayer_Billing_Item_Cancellation_Request::getAccount */ @ApiMethod(instanceRequired = true) public Account getAccount(); /** * A collection of service cancellation items. * * @see SoftLayer_Billing_Item_Cancellation_Request::getItems */ @ApiMethod(instanceRequired = true) public List getItems(); /** * The status of a service cancellation request. * * @see SoftLayer_Billing_Item_Cancellation_Request::getStatus */ @ApiMethod(instanceRequired = true) public Status getStatus(); /** * The ticket that is associated with the service cancellation request. * * @see SoftLayer_Billing_Item_Cancellation_Request::getTicket */ @ApiMethod(instanceRequired = true) public Ticket getTicket(); /** * The user that initiated a service cancellation request. * * @see SoftLayer_Billing_Item_Cancellation_Request::getUser */ @ApiMethod(instanceRequired = true) public Customer getUser(); } 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#createObject} */ public Future createObject(Request templateObject); public Future createObject(Request templateObject, ResponseHandler callback); /** * Async version of {@link Service#getAllCancellationRequests} */ public Future> getAllCancellationRequests(); public Future getAllCancellationRequests(ResponseHandler> callback); /** * Async version of {@link Service#getCancellationCutoffDate} */ public Future getCancellationCutoffDate(Long accountId, String categoryCode); public Future getCancellationCutoffDate(Long accountId, String categoryCode, ResponseHandler callback); /** * Async version of {@link Service#getObject} */ public Future getObject(); public Future getObject(ResponseHandler callback); /** * Async version of {@link Service#removeCancellationItem} */ public Future removeCancellationItem(Long itemId); public Future removeCancellationItem(Long itemId, ResponseHandler callback); /** * Async version of {@link Service#validateBillingItemForCancellation} */ public Future validateBillingItemForCancellation(Long billingItemId); public Future validateBillingItemForCancellation(Long billingItemId, ResponseHandler callback); /** * Async version of {@link Service#requestVoid} */ public Future requestVoid(Boolean closeRelatedTicketFlag); public Future requestVoid(Boolean closeRelatedTicketFlag, ResponseHandler callback); /** * Async version of {@link Service#getAccount} */ public Future getAccount(); /** * Async callback version of {@link Service#getAccount} */ public Future getAccount(ResponseHandler callback); /** * Async version of {@link Service#getItems} */ public Future> getItems(); /** * Async callback version of {@link Service#getItems} */ public Future getItems(ResponseHandler> callback); /** * Async version of {@link Service#getStatus} */ public Future getStatus(); /** * Async callback version of {@link Service#getStatus} */ public Future getStatus(ResponseHandler callback); /** * Async version of {@link Service#getTicket} */ public Future getTicket(); /** * Async callback version of {@link Service#getTicket} */ public Future getTicket(ResponseHandler callback); /** * Async version of {@link Service#getUser} */ public Future getUser(); /** * Async callback version of {@link Service#getUser} */ public Future getUser(ResponseHandler callback); } public static class Mask extends com.softlayer.api.service.Entity.Mask { public com.softlayer.api.service.Account.Mask account() { return withSubMask("account", com.softlayer.api.service.Account.Mask.class); } public com.softlayer.api.service.billing.item.cancellation.request.Item.Mask items() { return withSubMask("items", com.softlayer.api.service.billing.item.cancellation.request.Item.Mask.class); } public com.softlayer.api.service.billing.item.cancellation.request.Status.Mask status() { return withSubMask("status", com.softlayer.api.service.billing.item.cancellation.request.Status.Mask.class); } public com.softlayer.api.service.Ticket.Mask ticket() { return withSubMask("ticket", com.softlayer.api.service.Ticket.Mask.class); } public com.softlayer.api.service.user.Customer.Mask user() { return withSubMask("user", com.softlayer.api.service.user.Customer.Mask.class); } public Mask accountId() { withLocalProperty("accountId"); return this; } public Mask billingCancelReasonId() { withLocalProperty("billingCancelReasonId"); return this; } public Mask createDate() { withLocalProperty("createDate"); return this; } public Mask id() { withLocalProperty("id"); return this; } public Mask modifyDate() { withLocalProperty("modifyDate"); return this; } public Mask notes() { withLocalProperty("notes"); return this; } public Mask statusId() { withLocalProperty("statusId"); return this; } public Mask ticketId() { withLocalProperty("ticketId"); return this; } public Mask itemCount() { withLocalProperty("itemCount"); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy