Prestashop-PSWebServiceLibrary-Webservice CRUD属性完整列表

问题描述 投票:0回答:1

我想知道是否有Webservice CRUD属性的完整列表?

例如,如果要添加新客户(使用PSWebServiceLibrary),请遵循文档http://doc.prestashop.com/display/PS16/Web+service+tutorial,并且属性为:

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
    <customer>
        <id_default_group/>
        <id_lang format="isUnsignedId"/>
        <newsletter_date_add/>
        <ip_registration_newsletter/>
        <last_passwd_gen readOnly="true"/>
        <secure_key format="isMd5" readOnly="true"/>
        <deleted format="isBool"/>
        <passwd required="true" maxSize="255" format="isPasswd"/>
        <lastname required="true" maxSize="255" format="isCustomerName"/>
        <firstname required="true" maxSize="255" format="isCustomerName"/>
        <email required="true" maxSize="255" format="isEmail"/>
        <id_gender format="isUnsignedId"/>
        <birthday format="isBirthDate"/>
        <newsletter format="isBool"/>
        <optin format="isBool"/>
        <website format="isUrl"/>
        <company format="isGenericName"/>
        <siret format="isGenericName"/>
        <ape format="isApe"/>
        <outstanding_allow_amount format="isFloat"/>
        <show_public_prices format="isBool"/>
        <id_risk format="isUnsignedInt"/>
        <max_payment_days format="isUnsignedInt"/>
        <active format="isBool"/>
        <note maxSize="65000" format="isCleanHtml"/>
        <is_guest format="isBool"/>
        <id_shop format="isUnsignedId"/>
        <id_shop_group format="isUnsignedId"/>
        <date_add format="isDate"/>
        <date_upd format="isDate"/>
        <reset_password_token maxSize="40" format="isSha1"/>
        <reset_password_validity format="isDateOrNull"/>
        <associations>
            <groups nodeType="group" api="groups">
                <group>
                    <id/>
                </group>
            </groups>
        </associations>
    </customer>
</prestashop>

在这里我可以看到一些属性:

  1. 为必填项(必填=“ true”)
  2. 具有最大大小(maxSize =“ 255”)
  3. 是布尔值(format =“ isBool”)
  4. ecc ...

但是有些其他我不理解的东西,例如:

  1. format =“ isBirthDate”是aaaa-mm-dd或dd / mm / aaaa?
  2. format =“ isDate”是否与“ isBirthDate”相同?
  3. 格式“ isGenericName”或“ isCustomerName”是否接受所有字符?
  4. format =“ isApe”是什么?
  5. format =“ isFloat”是0.00还是0.000或0,00?
  6. ecc ...

我在网上找不到解释每个属性的文档,有人知道那里是否存在?

web-services prestashop prestashop-1.7
1个回答
0
投票

它们是来自验证类的方法。

来源:https://github.com/pal/prestashop/blob/master/classes/Validate.php

isBirthDate“是aaaa-mm-dd或dd / mm / aaaa?

aaaa-mm-dd

“ isDate()”是否与“ isBirthDate()”相同?

没有isDate()使用checkdate()函数(https://www.php.net/manual/en/function.checkdate.php)来检查日期的有效性

isBirthDate()检查birthDate的有效性,并检查是否可以出生年份

格式“ isGenericName”或“ isCustomerName”是否接受所有字符?

isApe()

这是验证公司编号(https://github.com/PrestaShop/PrestaShop-1.5/blob/master/classes/Validate.php)的旧方法

isFloat()

检查浮点数的有效性

© www.soinside.com 2019 - 2024. All rights reserved.