<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    Mage
 * @package     Mage_Downloadable
 * @copyright   Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<config>
    <api>
        <resources>
            <catalog_product_downloadable_link translate="title" module="downloadable">
                <model>downloadable/link_api</model>
                <title>Category API</title>
                <acl>downloadable/link</acl>
                <methods>
                    <add translate="title" module="downloadable">
                        <title>Add links and samples to downloadable product</title>
                        <method>add</method>
                        <acl>downloadable/link/add</acl>
                    </add>
                    <list translate="title" module="downloadable">
                        <title>Retrieve links and samples list from downloadable product</title>
                        <method>items</method>
                        <acl>downloadable/link/list</acl>
                    </list>
                    <remove translate="title" module="downloadable">
                        <title>Remove links and samples from downloadable product</title>
                        <acl>downloadable/link/remove</acl>
                    </remove>
                </methods>
                <faults module="downloadable">
                    <store_not_exists>
                        <code>100</code>
                        <message>Store with requested code/id does not exist.</message>
                    </store_not_exists>
                    <product_not_exists>
                        <code>101</code>
                        <message>Product with requested id does not exist.</message>
                    </product_not_exists>
                    <links_and_samples_allowed>
                        <code>401</code>
                        <message>Incorrect resourceType, only "links" and "samples" allowed.</message>
                    </links_and_samples_allowed>
                    <empty_url>
                        <code>402</code>
                        <message>URL cannot be empty.</message>
                    </empty_url>
                    <no_filename>
                        <code>403</code>
                        <message>Filename was omitted, or contains unallowed characters.</message>
                    </no_filename>
                    <no_file_base64_content>
                        <code>404</code>
                        <message>File content should be passed as base64 string. For details, please see http://en.wikipedia.org/wiki/Base64</message>
                    </no_file_base64_content>
                    <no_title>
                        <code>405</code>
                        <message>Title cannot be empty.</message>
                    </no_title>
                    <unknown_resource_type>
                        <code>406</code>
                        <message>Incorrect content type only "link", "link_samples" and "sample" allowed.</message>
                    </unknown_resource_type>
                    <product_not_downloadable>
                        <code>408</code>
                        <message>Incorrect product type. Downloadable content, can be added only to "downloadable" products.</message>
                    </product_not_downloadable>
                    <incorect_file_extension>
                        <code>409</code>
                        <message>Incorrect extension of filename.</message>
                    </incorect_file_extension>
                    <file_size_is_to_big>
                        <code>410</code>
                        <message>Uploaded file is too big.</message>
                    </file_size_is_to_big>
                    <tmp_dir_is_not_writeable>
                        <code>411</code>
                        <message>Has no permissions for writing to temporary folder.</message>
                    </tmp_dir_is_not_writeable>
                    <can_not_create_sub_tmp_folder>
                        <code>411</code>
                        <message>Cannot create sub folder in temporary folder.</message>
                    </can_not_create_sub_tmp_folder>
                    <link_was_not_found>
                        <code>412</code>
                        <message>Link or sample with specified ID was not found.</message>
                    </link_was_not_found>
                    <incorrect_resource_type>
                        <code>413</code>
                        <message>An allowed resource type values for remove method is: "links" and "samples".</message>
                    </incorrect_resource_type>
                    <save_error>
                        <code>414</code>
                        <message>Unable to save action. Details in error message.</message>
                    </save_error>
                    <validation_error>
                        <code>415</code>
                        <message>Validation error has occurred.</message>
                    </validation_error>
                    <remove_error>
                        <code>416</code>
                        <message>Unable to remove link. Details in error message.</message>
                    </remove_error>
                </faults>
            </catalog_product_downloadable_link>
        </resources>
        <resources_alias>
            <product_downloadable_link>catalog_product_downloadable_link</product_downloadable_link>
        </resources_alias>
        <v2>
            <resources_function_prefix>
                <product_downloadable_link>catalogProductDownloadableLink</product_downloadable_link>
            </resources_function_prefix>
        </v2>
        <acl>
            <resources>
                <catalog>
                    <product>
                        <downloadable_link translate="title" module="downloadable">
                            <title>Product downloadable links</title>
                            <add translate="title" module="downloadable">
                                <title>Add</title>
                            </add>
                            <list translate="title" module="downloadable">
                                <title>List</title>
                            </list>
                            <remove translate="title" module="downloadable">
                                <title>Remove</title>
                            </remove>
                        </downloadable_link>
                    </product>
                </catalog>
            </resources>
        </acl>
    </api>
</config>
