示例#1
0
        ),
        'deposit_info': fields.List(fields.Nested(DepositTypeList)),
        'withdraw_info': fields.Nested(WithdrawType)
    })

#####################################################
# 商户余额编辑
#####################################################

MerchantBalanceEdit = api.model(
    'MerchantBalanceEdit', {
        'name':
        fields.String(
            required=True,
            description='商户名称',
            example=MerchantEnum.description(),
        ),
        'adjustment_type':
        fields.String(
            required=True,
            description='调整类型',
            example=ManualAdjustmentType.description(),
        ),
        'amount':
        fields.String(
            required=True,
            description='调整金额(浮点数转为字符串)',
            example="500.34",
        ),
        'reason':
        fields.String(required=True, description='原因说明', example="原因说明.....")
示例#2
0
from app.enums.balance import ManualAdjustmentType
from app.enums.trade import PaymentFeeTypeEnum, PayMethodEnum, OrderSourceEnum, OrderStateEnum, DeliverTypeEnum, \
    DeliverStateEnum, PaymentBankEnum, PayTypeEnum
from app.extensions.ext_api import api_backoffice as api
from app.libs.error_code import ResponseSuccess
from config import MerchantEnum

###################################################
# withdraw list
###################################################

NameTypePair = api.model(
    "NameTypePair", {
        "name":
        fields.String(
            description=MerchantEnum.description(),
            example=MerchantEnum.QF2.name,
        ),
        "type":
        fields.String(
            description=MerchantTypeEnum.description(),
            example=MerchantTypeEnum.NORMAL.value,
        )
    })

DescValuePair = api.model(
    "DescValuePair", {
        "desc":
        fields.String(
            description="支付方式描述",
            example=PayMethodEnum.WEIXIN_H5.desc,