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

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

The 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 com.softlayer.api.service.container.product.order.Network;
import com.softlayer.api.service.container.product.order.Receipt;
import com.softlayer.api.service.container.product.order.network.Vlans;
import com.softlayer.api.service.container.tax.Cache;
import com.softlayer.api.service.product.Item;
import com.softlayer.api.service.product.item.Price;
import java.util.List;
import java.util.concurrent.Future;

/**
 * All orders (servers, virtual servers and services) pass through the [[SoftLayer_Product_Order]] service. This service provides the entry point for placing orders and quotes with SoftLayer. To place orders using these services, you must provide the appropriate container type as defined by [[SoftLayer_Container_Product_Order]]. For server orders, you would use [[SoftLayer_Container_Product_Order_Hardware_Server]]. For virtual server orders, you would use [[SoftLayer_Container_Product_Order_Virtual_Guest]]. For additional service orders, it will depend on the additional service (e.g., network attached storage, object storage) being purchased. See the data types documentation to get a list of all the available container types beginning with `SoftLayer_Container_Product_Order_*`. 
*
* There are several main entry points associated with ordering:
*
* - [[SoftLayer_Product_Order/placeOrder]] Order servers and services. Your credit card or PayPal account will get charged when successfully placed.
*
* - [[SoftLayer_Product_Order/verifyOrder]] Run verification on your order before it's actually placed to get additional information, like your total monthly or hourly recurring charges. You may also call this service to help ensure that your call to [[SoftLayer_Product_Order/placeOrder]] will succeed. **This service is called internally, so it is not required to verify before you call `placeOrder`.** No credit card or PayPal charges result from this call.
*
* - [[SoftLayer_Product_Order/placeQuote]] Create a quote only. Subsequent orders may be placed from this quote. See [[SoftLayer_Billing_Order_Quote/placeOrder]] for details on how to order from a quote.
*
* - [[SoftLayer_Product_Order/getVlans]] Get a list of available VLANs that can be supplied when placing an order.
*
* While this service provides detailed customization for ordering, some customers may find the simplified ordering system sufficient for their needs. For more information, see the following:
*
* - [[SoftLayer_Virtual_Guest/createObject]] - Simplified virtual server ordering
*
* - [[SoftLayer_Hardware/createObject]] - Simplified bare metal server ordering * * @see SoftLayer_Product_Order */ @ApiType("SoftLayer_Product_Order") public class Order extends Entity { public static Service service(ApiClient client) { return client.createService(Service.class, null); } /** * All orders (servers, virtual servers and services) pass through the [[SoftLayer_Product_Order]] service. This service provides the entry point for placing orders and quotes with SoftLayer. To place orders using these services, you must provide the appropriate container type as defined by [[SoftLayer_Container_Product_Order]]. For server orders, you would use [[SoftLayer_Container_Product_Order_Hardware_Server]]. For virtual server orders, you would use [[SoftLayer_Container_Product_Order_Virtual_Guest]]. For additional service orders, it will depend on the additional service (e.g., network attached storage, object storage) being purchased. See the data types documentation to get a list of all the available container types beginning with `SoftLayer_Container_Product_Order_*`.
*
* There are several main entry points associated with ordering:
*
* - [[SoftLayer_Product_Order/placeOrder]] Order servers and services. Your credit card or PayPal account will get charged when successfully placed.
*
* - [[SoftLayer_Product_Order/verifyOrder]] Run verification on your order before it's actually placed to get additional information, like your total monthly or hourly recurring charges. You may also call this service to help ensure that your call to [[SoftLayer_Product_Order/placeOrder]] will succeed. **This service is called internally, so it is not required to verify before you call `placeOrder`.** No credit card or PayPal charges result from this call.
*
* - [[SoftLayer_Product_Order/placeQuote]] Create a quote only. Subsequent orders may be placed from this quote. See [[SoftLayer_Billing_Order_Quote/placeOrder]] for details on how to order from a quote.
*
* - [[SoftLayer_Product_Order/getVlans]] Get a list of available VLANs that can be supplied when placing an order.
*
* While this service provides detailed customization for ordering, some customers may find the simplified ordering system sufficient for their needs. For more information, see the following:
*
* - [[SoftLayer_Virtual_Guest/createObject]] - Simplified virtual server ordering
*
* - [[SoftLayer_Hardware/createObject]] - Simplified bare metal server ordering * * @see SoftLayer_Product_Order */ @com.softlayer.api.annotation.ApiService("SoftLayer_Product_Order") public static interface Service extends com.softlayer.api.Service { public ServiceAsync asAsync(); public Mask withNewMask(); public Mask withMask(); public void setMask(Mask mask); /** * @see SoftLayer_Product_Order::checkItemAvailability */ @ApiMethod public Boolean checkItemAvailability(List itemPrices, Long accountId, List availabilityTypeKeyNames); /** * @see SoftLayer_Product_Order::checkItemAvailabilityForImageTemplate */ @ApiMethod public Boolean checkItemAvailabilityForImageTemplate(Long imageTemplateId, Long accountId, Long packageId, List availabilityTypeKeyNames); /** * Check order items for conflicts * * @see SoftLayer_Product_Order::checkItemConflicts */ @ApiMethod public Boolean checkItemConflicts(List itemPrices); /** * This method simply returns a receipt for a previously finalized payment authorization from PayPal. The response matches the response returned from placeOrder when the order was originally placed with PayPal as the payment type. * * @see SoftLayer_Product_Order::getExternalPaymentAuthorizationReceipt */ @ApiMethod public Receipt getExternalPaymentAuthorizationReceipt(String token, String payerId); /** * This method is deprecated and always returns nothing. * * @see SoftLayer_Product_Order::getNetworks */ @Deprecated @ApiMethod public List getNetworks(Long locationId, Long packageId, Long accountId); /** * When the account is on an external reseller brand, this service will provide a SoftLayer_Product_Order with the the pricing adjusted by the external reseller. * * @see SoftLayer_Product_Order::getResellerOrder */ @ApiMethod public com.softlayer.api.service.container.product.Order getResellerOrder(com.softlayer.api.service.container.product.Order orderContainer); /** * Sometimes taxes cannot be calculated immediately, so we start the calculations and let them run in the background. This method will return the current progress and information related to a specific tax calculation, which allows real-time progress updates on tax calculations. * * @see SoftLayer_Product_Order::getTaxCalculationResult */ @ApiMethod public Cache getTaxCalculationResult(String orderHash); /** * Return collections of public and private VLANs that are available during ordering. If a location ID is provided, the resulting VLANs will be limited to that location. If the Virtual Server package id (46) is provided, the VLANs will be narrowed down to those locations that contain routers with the VIRTUAL_IMAGE_STORE data attribute.
*
* For the selectedItems parameter, this is a comma-separated string of category codes and item values. For example:
*
* - `port_speed=10,guest_disk0=LOCAL_DISK`
*
* - `port_speed=100,disk0=SAN_DISK`
*
* - `port_speed=100,private_network_only=1,guest_disk0=LOCAL_DISK`
*
* This parameter is used to narrow the available results down even further. It's not necessary when selecting a VLAN, but it will help avoid errors when attempting to place an order. The only acceptable category codes are:
*
* - `port_speed`
*
* - A disk category, such as `guest_disk0` or `disk0`, with values of either `LOCAL_DISK` or `SAN_DISK`
*
* - `private_network_only`
*
* - `dual_path_network`
*
* For most customers, it's sufficient to only provide the first 2 parameters. * * @see SoftLayer_Product_Order::getVlans */ @ApiMethod public Vlans getVlans(Long locationId, Long packageId, String selectedItems, List vlanIds, List subnetIds, Long accountId, com.softlayer.api.service.container.product.Order orderContainer, Boolean hardwareFirewallOrderedFlag); /** *
* Use this method to place bare metal server, virtual server and additional service orders with SoftLayer.
* Upon success, your credit card or PayPal account will incur charges for the monthly order total
* (or prorated value if ordered mid billing cycle). If all products on the order are only billed hourly,
* you will be charged on your billing anniversary date, which occurs monthly on the day you ordered your first
* service with SoftLayer. For new customers, you are required to provide billing information when you place an order.
* For existing customers, the credit card on file will be charged. If you're a PayPal customer, a URL will be
* returned from the call to [[SoftLayer_Product_Order/placeOrder]] which is to be used to finish the authorization
* process. This authorization tells PayPal that you indeed want to place an order with SoftLayer.
* From PayPal's web site, you will be redirected back to SoftLayer for your order receipt.
*
*
* When an order is placed, your order will be in a "pending approval" state. When all internal checks pass,
* your order will be automatically approved. For orders that may need extra attention, a Sales representative
* will review the order and contact you if necessary. Once the order is approved, your server or service will
* be provisioned and available to you shortly thereafter. Depending on the type of server or service ordered,
* provisioning times will vary.
*
*
* ## Order Containers
*
*
*
* When placing API orders, it's important to order your server and services on the appropriate
* [[SoftLayer_Container_Product_Order]]. Failing to provide the correct container may delay your server or service
* from being provisioned in a timely manner. Some common order containers are included below.
*
*
* **Note:** `SoftLayer_Container_Product_Order_` has been removed from the containers in the table below for readability.
*
*
* | Product | Order Container | Package Type |
* | ------- | --------------- | ------------ |
* | Bare metal server by CPU | [[SoftLayer_Container_Product_Order_Hardware_Server]] | BARE_METAL_CPU |
* | Bare metal server by core | [[SoftLayer_Container_Product_Order_Hardware_Server]] | BARE_METAL_CORE |
* | Virtual server | [[SoftLayer_Container_Product_Order_Virtual_Guest]] | VIRTUAL_SERVER_INSTANCE |
* | DNS domain registration | [[SoftLayer_Container_Product_Order_Dns_Domain_Registrationn]] | ADDITIONAL_SERVICES |
* | Local & dedicated load balancers | [[SoftLayer_Container_Product_Order_Network_LoadBalancer]] | ADDITIONAL_SERVICES_LOAD_BALANCER |
* | Content delivery network | [[SoftLayer_Container_Product_Order_Network_ContentDelivery_Account]] | ADDITIONAL_SERVICES_CDN |
* | Content delivery network Addon | [[SoftLayer_Container_Product_Order_Network_ContentDelivery_Account_Addon]] | ADDITIONAL_SERVICES_CDN_ADDON |
* | Hardware & software firewalls | [[SoftLayer_Container_Product_Order_Network_Protection_Firewall]] | ADDITIONAL_SERVICES_FIREWALL |
* | Dedicated firewall | [[SoftLayer_Container_Product_Order_Network_Protection_Firewall_Dedicated]] | ADDITIONAL_SERVICES_FIREWALL |
* | Object storage | [[SoftLayer_Container_Product_Order_Network_Storage_Object]] | ADDITIONAL_SERVICES_OBJECT_STORAGE |
* | Object storage (hub) | [[SoftLayer_Container_Product_Order_Network_Storage_Hub]] | ADDITIONAL_SERVICES_OBJECT_STORAGE |
* | Network attached storage | [[SoftLayer_Container_Product_Order_Network_Storage_Nas]] | ADDITIONAL_SERVICES_NETWORK_ATTACHED_STORAGE |
* | Iscsi storage | [[SoftLayer_Container_Product_Order_Network_Storage_Iscsi]] | ADDITIONAL_SERVICES_ISCSI_STORAGE |
* | Evault | [[SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Vault]] | ADDITIONAL_SERVICES |
* | Evault Plugin | [[SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Plugin]] | ADDITIONAL_SERVICES |
* | Application delivery appliance | [[SoftLayer_Container_Product_Order_Network_Application_Delivery_Controller]] | ADDITIONAL_SERVICES_APPLICATION_DELIVERY_APPLIANCE |
* | Network subnet | [[SoftLayer_Container_Product_Order_Network_Subnet]] | ADDITIONAL_SERVICES |
* | Global IPv4 | [[SoftLayer_Container_Product_Order_Network_Subnet]] | ADDITIONAL_SERVICES_GLOBAL_IP_ADDRESSES |
* | Global IPv6 | [[SoftLayer_Container_Product_Order_Network_Subnet]] | ADDITIONAL_SERVICES_GLOBAL_IP_ADDRESSES |
* | Network VLAN | [[SoftLayer_Container_Product_Order_Network_Vlan]] | ADDITIONAL_SERVICES_NETWORK_VLAN |
* | Portable storage | [[SoftLayer_Container_Product_Order_Virtual_Disk_Image]] | ADDITIONAL_SERVICES_PORTABLE_STORAGE |
* | SSL certificate | [[SoftLayer_Container_Product_Order_Security_Certificate]] | ADDITIONAL_SERVICES_SSL_CERTIFICATE |
* | External authentication | [[SoftLayer_Container_Product_Order_User_Customer_External_Binding]] | ADDITIONAL_SERVICES |
* | Dedicated Host | [[SoftLayer_Container_Product_Order_Virtual_DedicatedHost]] | DEDICATED_HOST |
*
*
* ## Server example
*
*
*
* This example includes a single bare metal server being ordered with monthly billing.
*
*
* **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the
*
* available prices from the bare metal server [[SoftLayer_Product_Package/getAllObjects]], which have a
* [[SoftLayer_Product_Package_Type]] of `BARE_METAL_CPU` or `BARE_METAL_CORE`. You can get a full list of
* package types with [[SoftLayer_Product_Package_Type/getAllObjects]].
*
*
* ### Bare Metal Ordering
*
* ```xml
*
*
*
* your username
* your api key
*

*

*
*
*
*
*
* example.com
* server1
*

*

* 138124
* 142
*
*
* 58
*

*
* 22337
*

*
* 21189
*

*
* 876
*

*
* 57
*

*
* 55
*

*
* 21190
*

*
* 36381
*

*
* 21
*

*
* 22013
*

*
* 906
*

*
* 420
*

*
* 418
*

*
* 342
*

*

* false
*

*
*

*

*

* ```
*
*
* ## Virtual server example
*
*
*
* This example includes 2 identical virtual servers (except for hostname) being ordered for hourly billing.
* It includes an optional image template id and VLAN data specified on the virtualGuest objects -
* `primaryBackendNetworkComponent` and `primaryNetworkComponent`.
*
*
* **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the
*
* available prices from the virtual server package with [[SoftLayer_Product_Package/getAllObjects]],
* which has a [[SoftLayer_Product_Package_Type]] of `VIRTUAL_SERVER_INSTANCE`.
*
*
* #### Virtual Ordering
*
* ```xml
*
*
*
* your username
* your api key
*

*

*
*
*
* 13251
* 37473
* 46
*
*
* 2159
*

*
* 55
*

*
* 13754
*

*
* 1641
*

*
* 905
*

*
* 1800
*

*
* 58
*

*
* 21
*

*
* 1645
*

*
* 272
*

*
* 57
*

*
* 418
*

*
* 420
*

*

* 2
* true
*
*
* example.com
* server1
*
*
* 12345
*

*

*
*
* 67890
*

*

*

*
* example.com
* server2
*
*
* 12345
*

*

*
*
* 67890
*

*

*

*

*

*
*

*

*

* ```
*
*
* ## VLAN example
*
*
* **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the
*
* available prices from the additional services pacakge with [[SoftLayer_Product_Package/getAllObjects]],
* which has a [[SoftLayer_Product_Package_Type]] of `ADDITIONAL_SERVICES`.
* You can get a full list of [[SoftLayer_Product_Package_Type/getAllObjects|]] to find other available additional
* service packages.


*
*
* ### VLAN Ordering
*
* ```xml
*
*
*
* your username
* your api key
*

*

*
*
*
* 154820
* 0
*
*
* 2021
*

*
* 2018
*

*

* true
*

*
*

*

*

* ```
*
*
* ## Multiple products example
*
*
*
* This example includes a combination of the above examples in a single order. Note that all the configuration
* options for each individual order container are the same as above, except now we encapsulate each one within
* the `orderContainers` property on the base [[SoftLayer_Container_Product_Order]].
*
*
* **Warning:** not all products are available to be ordered with other products. For example, since
*
* SSL certificates require validation from a 3rd party, the approval process may take days or even weeks,
* and this would not be acceptable when you need your hourly virtual server right now. To better accommodate
* customers, we restrict several products to be ordered individually.
*
*
* ### Bare metal server + virtual server + VLAN
*
*
*
* ```xml
*
*
*
* your username
* your api key
*

*

*
*
*
*
*
* ...
*

*
* ...
*

*
* ...
*

*

*

*
*

*

*

* ```
*
* * * @see SoftLayer_Product_Order::placeOrder */ @ApiMethod public Receipt placeOrder(com.softlayer.api.service.container.product.Order orderData, Boolean saveAsQuote); /** * Use this method for placing server quotes and additional services quotes. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server quotes. After placing the quote, you must go to this URL to finish the order process. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process. After this, it will go to sales for final approval. * * @see SoftLayer_Product_Order::placeQuote */ @ApiMethod public Receipt placeQuote(com.softlayer.api.service.container.product.Order orderData); /** * This method simply finalizes an authorization from PayPal. It tells SoftLayer that the customer has completed the PayPal process. This is ONLY needed if you, the customer, have your own API into PayPal and wish to automate authorizations from PayPal and our system. For most, this method will not be needed. Once an order is placed using placeOrder() for PayPal customers, a URL is given back to the customer. In it is the token and PayerID. If you want to systematically pay with PayPal, do so then call this method with the token and PayerID. * * @see SoftLayer_Product_Order::processExternalPaymentAuthorization */ @ApiMethod public com.softlayer.api.service.container.product.Order processExternalPaymentAuthorization(String token, String payerId); /** * Get list of items that are required with the item prices provided * * @see SoftLayer_Product_Order::requiredItems */ @ApiMethod public List requiredItems(List itemPrices); /** * This service is used to verify that an order meets all the necessary requirements to purchase a server, virtual server or service from SoftLayer. It will verify that the products requested do not conflict. For example, you cannot order a Windows firewall with a Linux operating system. It will also check to make sure you have provided all the products that are required for the [[SoftLayer_Product_Package_Order_Configuration]] associated with the [[SoftLayer_Product_Package]] on each of the [[SoftLayer_Container_Product_Order]] specified.


*
* This service returns the same container that was provided, but with additional information that can be used for debugging or validation. It will also contain pricing information (prorated if applicable) for each of the products on the order. If an exception occurs during verification, a container with the SoftLayer_Exception_Order exception type will be specified in the result.


*
* verifyOrder accepts the same [[SoftLayer_Container_Product_Order]] as placeOrder, so see [[SoftLayer_Product_Order/placeOrder]] for more details.
*
* * * @see SoftLayer_Product_Order::verifyOrder */ @ApiMethod public com.softlayer.api.service.container.product.Order verifyOrder(com.softlayer.api.service.container.product.Order orderData); } 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#checkItemAvailability} */ public Future checkItemAvailability(List itemPrices, Long accountId, List availabilityTypeKeyNames); public Future checkItemAvailability(List itemPrices, Long accountId, List availabilityTypeKeyNames, ResponseHandler callback); /** * Async version of {@link Service#checkItemAvailabilityForImageTemplate} */ public Future checkItemAvailabilityForImageTemplate(Long imageTemplateId, Long accountId, Long packageId, List availabilityTypeKeyNames); public Future checkItemAvailabilityForImageTemplate(Long imageTemplateId, Long accountId, Long packageId, List availabilityTypeKeyNames, ResponseHandler callback); /** * Async version of {@link Service#checkItemConflicts} */ public Future checkItemConflicts(List itemPrices); public Future checkItemConflicts(List itemPrices, ResponseHandler callback); /** * Async version of {@link Service#getExternalPaymentAuthorizationReceipt} */ public Future getExternalPaymentAuthorizationReceipt(String token, String payerId); public Future getExternalPaymentAuthorizationReceipt(String token, String payerId, ResponseHandler callback); /** * Async version of {@link Service#getNetworks} */ @Deprecated public Future> getNetworks(Long locationId, Long packageId, Long accountId); @Deprecated public Future getNetworks(Long locationId, Long packageId, Long accountId, ResponseHandler> callback); /** * Async version of {@link Service#getResellerOrder} */ public Future getResellerOrder(com.softlayer.api.service.container.product.Order orderContainer); public Future getResellerOrder(com.softlayer.api.service.container.product.Order orderContainer, ResponseHandler callback); /** * Async version of {@link Service#getTaxCalculationResult} */ public Future getTaxCalculationResult(String orderHash); public Future getTaxCalculationResult(String orderHash, ResponseHandler callback); /** * Async version of {@link Service#getVlans} */ public Future getVlans(Long locationId, Long packageId, String selectedItems, List vlanIds, List subnetIds, Long accountId, com.softlayer.api.service.container.product.Order orderContainer, Boolean hardwareFirewallOrderedFlag); public Future getVlans(Long locationId, Long packageId, String selectedItems, List vlanIds, List subnetIds, Long accountId, com.softlayer.api.service.container.product.Order orderContainer, Boolean hardwareFirewallOrderedFlag, ResponseHandler callback); /** * Async version of {@link Service#placeOrder} */ public Future placeOrder(com.softlayer.api.service.container.product.Order orderData, Boolean saveAsQuote); public Future placeOrder(com.softlayer.api.service.container.product.Order orderData, Boolean saveAsQuote, ResponseHandler callback); /** * Async version of {@link Service#placeQuote} */ public Future placeQuote(com.softlayer.api.service.container.product.Order orderData); public Future placeQuote(com.softlayer.api.service.container.product.Order orderData, ResponseHandler callback); /** * Async version of {@link Service#processExternalPaymentAuthorization} */ public Future processExternalPaymentAuthorization(String token, String payerId); public Future processExternalPaymentAuthorization(String token, String payerId, ResponseHandler callback); /** * Async version of {@link Service#requiredItems} */ public Future> requiredItems(List itemPrices); public Future requiredItems(List itemPrices, ResponseHandler> callback); /** * Async version of {@link Service#verifyOrder} */ public Future verifyOrder(com.softlayer.api.service.container.product.Order orderData); public Future verifyOrder(com.softlayer.api.service.container.product.Order orderData, ResponseHandler callback); } public static class Mask extends com.softlayer.api.service.Entity.Mask { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy