api1: title: 查询当前月度套餐种类 url: /api/v1/businessPlan/getBasicPlan?planType=1&v=${v} method: get set_value: {"ProPlanId" : "$.data.basicPlanList[?(@.name == 'Pro')].id" , "FreePlanId" : "$.data.basicPlanList[?(@.name == 'Free')].id"} expected: - eq: {"$.code": 0} api2: title: 查询当前年度套餐种类 url: /api/v1/businessPlan/getBasicPlan?planType=3&v=${v} method: get expected: - eq: {"$.code": 0} api3: title: 订阅免费套餐 url: /api/v1/businessPlan/buyBasicPlan method: post before_sql: billing/buyPlan_deleteNowPlan.py data: {"shopId":"${shopId}","planId":"${FreePlanId}","v":"${v}","openedAi": false} expected: - eq: {"$.code": 0} api4: title: 检查是否切为免费套餐 url: /api/v1/businessPlan/getCompanyCurrentPlan?v=${v} method: get expected: - eq: {"$.code": 0} - eq: {"$.data.planId": "${FreePlanId}"} - eq: {"$.data.price": "0.00"} - eq: {"$.data.companyBasicPlanItem[?(@.itemId == 1)].amount": 20} - eq: {"$.data.companyBasicPlanItem[?(@.itemId == 2)].amount": 20} - eq: {"$.data.companyBasicPlanItem[?(@.itemId == 10)].amount": 1} - eq: {"$.data.companyBasicPlanItem[?(@.itemId == 3)].amount": -1} - eq: {"$.data.createAtFormat": "${today}"} - eq: {"$.data.expireAtFormat": "${next_month}"} api5: title: 获取折扣信息 url: /api/v1/businessPlan/getPlanActive method: post data: {"v":"${v}"} expected: - eq: {"$.code": 0} # - eq: {"$.data.discount": 5.1} api6: title: 购买付费套餐 - 检查是否返回shopify付款链接 url: /api/v1/businessPlan/buyBasicPlan method: post data: { "shopId": "${shopId}","planId": "${ProPlanId}","v": "${v}","openedAi": false,"selectedItems":[{"itemId":1,"id":4044},{"itemId":2,"id":4062},{"itemId":6,"id":4323}]} expected: - eq: { "$.code": 0 } - in: { "$.data.confirmationUrl" : "https://zhs-test.myshopify.com/admin/charges/4794771/"} api7: title: 检查是否切为付费套餐(仅校验了额度,没有校验planid) url: /api/v1/businessPlan/getCompanyCurrentPlan?v=${v} method: get before_sql: billing/buyPlan_updateToPro.py expected: - eq: { "$.code": 0 } # - eq: { "$.data.planId": "${ProPlanId}" } - eq: { "$.data.companyBasicPlanItem[?(@.itemId == 1)].amount": 2000 } - eq: { "$.data.companyBasicPlanItem[?(@.itemId == 2)].amount": 2000 } - eq: { "$.data.companyBasicPlanItem[?(@.itemId == 10)].amount": 2000 } - eq: { "$.data.companyBasicPlanItem[?(@.itemId == 3)].amount": -1 } - eq: { "$.data.createAtFormat": "${today}" } - eq: { "$.data.expireAtFormat": "${next_month}" } api8: title: 买WhatsApp一次性额度 url: api/v1/businessPlan/buyOneTimePlan method: post data: {"shopId":"${shopId}","planId":2,"v":"${v}"} expected: - eq: {"$.code": 0} - in: { "$.data.confirmationUrl" : "https://zhs-test.myshopify.com/admin/charges/4794771/"}