智简魔方文档

添加供应商

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\SupplierModel::createSupplier
所属业务上下游
来源模块/系统供应商模型

功能说明

添加供应商

调用示例

$type = 'string';
$name = '示例名称';
$url = 'https://example.com/callback';
$username = '示例名称';
$token = 'example-token';
$secret = 'example-token';
$contact = 'string';
$notes = '示例说明';
$result = (new \app\common\model\SupplierModel())->createSupplier($type, $name, $url, $username, $token, $secret, $contact, $notes);

参数

参数类型必填默认值校验规则说明
typestringrequired供应商类型default默认业务系统whmcs财务系统finance魔方财务
namestringrequired名称
urlstringrequired链接地址
usernamestringrequired用户名
tokenstringrequiredAPI密钥
secretstringrequiredAPI私钥
contactstring联系方式
notesstring备注

返回值

返回项类型说明
statusint状态码,200成功,400失败
msgstring提示信息

正常返回

{
  "status": 1,
  "msg": "string"
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。