getAvailableOrderForms()

OrderFormList getAvailableOrderForms()

This method returns information about the order form and plans in each package the API user is authorised to order. Use this method to list the packages that an application can order in the API.

Parameters

This method does not accept any parameters.

Results

This method returns an OrderFormList XML document that lists the plans and order forms in each package the application is authorised to order.

There are no messages defined by this method.

Example: Attributes for fields in an order form

This example shows a snippet of a returned OrderFormList XML document. This snippet describes the attributes for a field in the order form.

The nested elements in the <AttributeType> element specify the format of the field, as follows:
AttributeType
Specifies the database property for the field type. This attribute is for internal use and you can ignore it.
Name
Specifies the code name for the field. Your application must use this attribute when ordering a package.
Label
Specifies the code name label. This attribute is for internal use and you can ignore it.
SmileObjectXMLType
Specifies the object type for the field, as defined in the Smile XSD. Your application must use this attribute when ordering a package.
AttributeTypeProperties
Specifies any objects stored in the field. This attribute maps to the attribute properties field in Smile and lets you attach objects that contain metadata to the order form. Smile does not attach any meaning to objects stored in this field. This attribute lets you store data in Smile, for example, metadata that specifies when a web interface displays the field.
This example shows the attributes for a required username field that accepts any string. The field does not store any objects.
<Attribute>
  <Required>true</Required>
  <Label>Username</Label>
  <Visibility>VisibleAndEditable</Visibility>
  <AttributeType>
    <AttributeType>92</AttributeType>
    <Name>username</Name>
    <Label>Username</Label>
    <SmileObjectXMLType type="String"/>
    <AttributeTypeProperties>
      <Object/>
    </AttributeTypeProperties>
  </AttributeType>
</Attribute>

Example: A returned OrderFormList XML document

This example shows an OrderFormList XML document that contains a single order form. The order form is for a package named ADSL with VOIP Lines, which has a package ID of 192 and contains four plans. The order form contains four fields (username, phone lines, given name and family name).

<OrderFormList xmlns="http://xml.inomial.com/smile/2.xsd">
  <OrderForm>
    <Package>192</Package>
    <Name>ADSL With VOIP Lines</Name>
    <OrderFormType>Subscription</OrderFormType>
    <PackagePlans>
      <PackagePlan>
        <PackagePlan>812</PackagePlan>
        <Name>ADSL1 8000/384</Name>
      </PackagePlan>
      <PackagePlan>
        <PackagePlan>89</PackagePlan>
        <Name>ADSL1 256/64</Name>
      </PackagePlan>
      <PackagePlan>
        <PackagePlan>93</PackagePlan>
        <Name>ADSL1 1500/256</Name>
      </PackagePlan>
      <PackagePlan>
        <PackagePlan>95</PackagePlan>
        <Name>ADSL1 512/512</Name>
      </PackagePlan>
    </PackagePlans>
    <OrderFormDescription>
      <Form>
        <Name>ADSL - Order Form</Name>
        <FormProperties/>
        <Attributes>
          <Attribute>
            <Required>true</Required>
            <Label>Username</Label>
            <Visibility>VisibleAndEditable</Visibility>
            <AttributeType>
              <AttributeType>92</AttributeType>
              <Name>username</Name>
              <Label>Username</Label>
              <SmileObjectXMLType type="String"/>
              <AttributeTypeProperties>
                <Object/>
              </AttributeTypeProperties>
            </AttributeType>
          </Attribute>
          <Attribute>  
            <Required>true</Required>
            <Label>Phone Lines</Label>
            <Visibility>VisibleAndEditable</Visibility>
            <AttributeType>
              <AttributeType>91</AttributeType>
              <Name>phoneLines</Name>
              <Label>Phone Lines</Label>
              <SmileObjectXMLType type="Integer"/>
              <AttributeTypeProperties>
                <Object/>
              </AttributeTypeProperties>
            </AttributeType>
          </Attribute>
          <Attribute>
            <Required>true</Required>
            <Label>Contact's Given Name</Label>
            <Visibility>VisibleAndEditable</Visibility>
            <AttributeType>
              <AttributeType>90</AttributeType>
              <Name>contactGiven</Name>
              <Label>Contact's Given Name</Label>
              <SmileObjectXMLType type="String"/>
              <AttributeTypeProperties>
                <Object/>
              </AttributeTypeProperties>
            </AttributeType>
          </Attribute>
          <Attribute>
            <Required>true</Required>
            <Label>Contact's Family Name</Label>
            <Visibility>VisibleAndEditable</Visibility>
            <AttributeType>
              <AttributeType>89</AttributeType>
              <Name>contactFamily</Name>
              <Label>Contact's Family Name</Label>
              <SmileObjectXMLType type="String"/>
              <AttributeTypeProperties>
                <Object/>
              </AttributeTypeProperties>
            </AttributeType>
          </Attribute>  
        </Attributes>
      </Form>
    </OrderFormDescription>
  </OrderForm>  
</OrderFormList>

Faults

OrderException

This fault is returned when the caller does not have permission to access any order forms.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetAvailableOrderForms

This class name does not accept any parameters.

Note: For more information about the Java client and the options it accepts, see Java client syntax.