在订阅草稿上更新订阅行-subscriptionDraftLineUpdate mutation

在订阅草稿上更新订阅行。

所需的访问

write_own_subscription_contracts 访问范围。

在本页面

互动范例

这是一个示例变异查询。

突变subscriptionDraftLineUpdate ($ draftId :ID !,$ lineId :ID !,$ input :SubscriptionLineUpdateInput !){ subscriptionDraftLineUpdate (draftId :$ draftId ,lineId :$ lineId ,input :$ input ){
  1. <font style="color:#1F61A0;">草稿</font><font style="color:#555555;">{</font>
  2. <font style="color:#1F61A0;">ID</font>
  3. <font style="color:#555555;">}</font>
  4. <font style="color:#1F61A0;">lineUpdated </font><font style="color:#555555;">{</font>
  5. <font style="color:#1F61A0;">ID</font>
  6. <font style="color:#555555;">}</font>
  7. <font style="color:#1F61A0;">userErrors </font><font style="color:#555555;">{</font>
  8. <font style="color:#1F61A0;">代码</font>
  9. <font style="color:#1F61A0;">场地</font>
  10. <font style="color:#1F61A0;">信息</font>
  11. <font style="color:#555555;">}</font>
} } { “ draftId” :“ Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE =” , “ lineId” :“ Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE =” , “输入” :{} }

争论

争论 描述
draftId
() [ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)

必需的
用来更新订阅行的订阅合同草稿的向导。
input
() [SubscriptionLineUpdateInput!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionlineupdateinput)

必需的
新订阅行的属性。
lineId
() [ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)

必需的
订阅行的向导将更新。

SubscriptionLineUpdateInput字段

  • currentPrice([Decimal](https://shopify.dev/docs/admin-api/graphql/reference/scalar#decimal-2021-01))
    产品的价格。
  • customAttributes([[AttributeInput!]](https://shopify.dev/docs/admin-api/graphql/reference/orders/attributeinput))
    此订阅行的定制属性。
  • 定价政策([SubscriptionPricingPolicyInput](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionpricingpolicyinput))
    描述订购线随时间的预期价格变化。
  • productVariantId([ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
    订阅行引用的产品变体的ID。
  • 数量([Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    产品数量。
  • sellingPlanId([ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
    订阅行的销售计划。
  • sellingPlanName([String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    订阅行的销售计划名称。

返回字段

  • 草稿([SubscriptionDraft](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraft))
    订阅合同草稿对象。
  • lineUpdated([SubscriptionLine](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionline))
    更新的订阅行。
  • userErrors([[SubscriptionDraftUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraftusererror))
    执行突变时发生的错误列表。