Method: monetization.subscriptions.patch
HTTP 请求
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscription.packageName}/subscriptions/{subscription.productId}
网址采用 gRPC 转码语法。
路径参数
参数 |
subscription.packageName |
string
不可变。父级应用的软件包名称。
|
subscription.productId |
string
不可变。商品的唯一商品 ID。在父级应用内具有唯一性。商品 ID 必须由以下字符组成:小写字母 (a-z)、数字 (0-9)、下划线 (_) 和句点 (.)。此外,商品 ID 必须以小写字母或数字开头,长度介于 1 和 40 个字符之间(含边界值)。
|
查询参数
参数 |
updateMask |
string (FieldMask format)
必需。要更新的字段的列表。 这是完全限定字段名称的逗号分隔列表。示例:"user.displayName,photo" 。
|
regionsVersion |
object (RegionsVersion )
必需。当前用于订阅的可用地区的版本。
|
allowMissing |
boolean
可选。如果设置为 true,且不存在具有指定 packageName 和 productId 的订阅,则系统将创建该订阅。 如果系统创建了新订阅,则会忽略 updateMask。
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
可选。相应商品更新的传播延迟容忍度。默认设置为对延迟敏感。
|
请求正文
请求正文包含一个 Subscription
实例。
响应正文
如果成功,则响应正文包含一个 Subscription
实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidpublisher
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-17。
[null,null,["最后更新时间 (UTC):2024-12-17。"],[[["Updates an existing subscription, or creates a new one if it doesn't exist and `allowMissing` is set to true."],["Uses `PATCH` HTTP request with specified path and query parameters to update the subscription details."],["Requires providing the `packageName`, `productId`, `updateMask`, and `regionsVersion` for updates."],["Request and response bodies contain a `Subscription` object, allowing access to subscription data."],["Needs `https://www.googleapis.com/auth/androidpublisher` authorization scope for access."]]],["This document outlines the process for updating an existing subscription via a `PATCH` HTTP request to the Android Publisher API. Key actions include specifying the subscription to update using `packageName` and `productId` in the URL path. Required `updateMask` and `regionsVersion` query parameters detail the fields to modify and the region version. The request body uses the `Subscription` resource. Optional parameters `allowMissing` allows creating missing subscriptions, and `latencyTolerance` adjusts update propagation. Successful requests return an updated `Subscription` resource. The process requires `androidpublisher` authorization scope.\n"]]