API Module Extension retrieveExtensionRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Created page with '==Module Extension > Retrieve== {| border="1" cellpadding="4" |- style="background-color:#BBBBBB;" |'''Module''' |extension |- style="background-color:#EEEEEE;" |'''Command name'…')
Line 35: Line 35:
==Examples==
==Examples==
===Using PHP class===
===Using PHP class===
-
  to do
+
  $request = new OP_Request;
 +
$request->setCommand('retrieveExtensionRequest')
 +
  ->setAuth(array('username' => 'username', 'password' => 'password'))
 +
  ->setArgs(array(
 +
    'withDescription' => 0,
 +
    'withDiscounts' => 0,
 +
    'name' => 'co.uk',
 +
  ));
===Raw XML===
===Raw XML===
-
  to do
+
  <?xml version="1.0" encoding="UTF-8"?>
 +
  <openxml>
 +
  <credentials>
 +
    <username>username</username>
 +
    <password>password</password>
 +
  </credentials>
 +
  <retrieveextensionrequest>
 +
    <withdescription>0</withdescription>
 +
    <withdiscounts>1</withdiscounts>
 +
    <name>co.uk</name>
 +
  </retrieveextensionrequest>
 +
</openxml>
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<openxml>
 +
  <reply>
 +
    <code>0</code>
 +
    <desc></desc>
 +
    <data>
 +
      <name>co.uk</name>
 +
      <transferavailable>1</transferavailable>
 +
      <istransferauthcoderequired>0</istransferauthcoderequired>
 +
      <domicileavailable>0</domicileavailable>
 +
      <usagecount>0</usagecount>
 +
      <prices>
 +
        <setupprice>0</setupprice>
 +
        <domicileprice>0</domicileprice>
 +
        <minperiod>2</minperiod>
 +
        <maxperiod>2</maxperiod>
 +
        <resellerprice>10.00</resellerprice>
 +
        <prices>
 +
          <array>
 +
            <item>
 +
              <price>10.00</price>
 +
              <startbound>1</startbound>
 +
              <finishbound>24</finishbound>
 +
            </item>
 +
            <item>
 +
              <price>9.50</price>
 +
              <startbound>25</startbound>
 +
              <finishbound>49</finishbound>
 +
            </item>
 +
            <item>
 +
              <price>9.00</price>
 +
              <startbound>50</startbound>
 +
              <finishbound>149</finishbound>
 +
            </item>
 +
            <item>
 +
              <price>8.50</price>
 +
              <startbound>150</startbound>
 +
              <finishbound>0</finishbound>
 +
            </item>
 +
          </array>
 +
        </prices>
 +
      </prices>
 +
    </data>
 +
  </reply>
 +
</openxml>

Revision as of 04:34, 16 April 2010

Contents

Module Extension > Retrieve

Module extension
Command name retrieveExtensionRequest
Use Retrieves information about a specified extension
Input
  • name
  • withDescription
  • withPrice
  • withUsageCount
Output Overview of extension details:
  • name
  • transferAvailable
  • isTransferAuthCodeRequired
  • domicileAvailable
  • usageCount
  • description
  • prices
  • isAuthorizationCodeRequired
  • isLockingAllowed
  • isTradeAllowed
  • restorePrice

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('retrieveExtensionRequest')
  ->setAuth(array('username' => 'username', 'password' => 'password'))
  ->setArgs(array(
    'withDescription' => 0,
    'withDiscounts' => 0,
    'name' => 'co.uk',
  ));

Raw XML

 <?xml version="1.0" encoding="UTF-8"?>
<openxml>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <retrieveextensionrequest>
    <withdescription>0</withdescription>
    <withdiscounts>1</withdiscounts>
    <name>co.uk</name>
  </retrieveextensionrequest>
</openxml>

<?xml version="1.0" encoding="UTF-8"?>
<openxml>
  <reply>
    0
    <desc></desc>
    <data>
      <name>co.uk</name>
      <transferavailable>1</transferavailable>
      <istransferauthcoderequired>0</istransferauthcoderequired>
      <domicileavailable>0</domicileavailable>
      <usagecount>0</usagecount>
      <prices>
        <setupprice>0</setupprice>
        <domicileprice>0</domicileprice>
        <minperiod>2</minperiod>
        <maxperiod>2</maxperiod>
        <resellerprice>10.00</resellerprice>
        <prices>
          <array>
            <item>
              <price>10.00</price>
              <startbound>1</startbound>
              <finishbound>24</finishbound>
            </item>
            <item>
              <price>9.50</price>
              <startbound>25</startbound>
              <finishbound>49</finishbound>
            </item>
            <item>
              <price>9.00</price>
              <startbound>50</startbound>
              <finishbound>149</finishbound>
            </item>
            <item>
              <price>8.50</price>
              <startbound>150</startbound>
              <finishbound>0</finishbound>
            </item>
          </array>
        </prices>
      </prices>
    </data>
  </reply>
</openxml>
Views
Personal tools