第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

節(jié)點(diǎn)條帶產(chǎn)品列表返回空

節(jié)點(diǎn)條帶產(chǎn)品列表返回空

jeck貓 2023-07-20 14:24:49
我正在嘗試從 stripe 返回所有產(chǎn)品和計(jì)劃列表。但是,即使active創(chuàng)建了產(chǎn)品,產(chǎn)品列表也會(huì)返回空。function getProductsAndPlans() {    return Promise.all([        stripe.products.list({}),        stripe.plans.list({}),    ]).then(stripeData => {       console.log('products', stripeData[0]) <-- this is empty       console.log('plans', stripeData[1]) <-- this returns plans    }).catch(err => {        console.error('Error fetching Stripe products and plans: ', err);        return [];    });}以下是我的 Stripe 儀表板中的產(chǎn)品:計(jì)劃返回:但產(chǎn)品列表是空的:這是條紋文檔的副本。const stripe = require('stripe')('sk_test_smkOYa912GSsdfdfDDfByiohm');const products = await stripe.products.list({  limit: 3,});我在這里缺少什么?
查看完整描述

1 回答

?
慕沐林林

TA貢獻(xiàn)2016條經(jīng)驗(yàn) 獲得超9個(gè)贊

這很可能與2018-02-05以來(lái)的 API 更改有關(guān),當(dāng)時(shí)默認(rèn)行為從 切換type=goodtype=service,并且您的帳戶(hù)可能具有早于該版本的默認(rèn) API 版本。type=service正如記錄的那樣,默認(rèn)情況下,對(duì)于舊 API 版本的產(chǎn)品列表請(qǐng)求,您的產(chǎn)品可能會(huì)被忽略。

要獲取產(chǎn)品列表請(qǐng)求以包含您在儀表板中使用的產(chǎn)品,您可以執(zhí)行以下操作之一:

  1. 明確請(qǐng)求service產(chǎn)品stripe.products.list({type: 'service'})(如 API 變更日志中所述)

  2. 使用(或任何更高版本)覆蓋該請(qǐng)求的默認(rèn) APIstripe.products.list({}, {apiVersion: '2018-02-05'})

  3. 升級(jí)您的賬戶(hù)默認(rèn)API版本


查看完整回答
反對(duì) 回復(fù) 2023-07-20
  • 1 回答
  • 0 關(guān)注
  • 121 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)