PriceAttribute
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"type": enum (Type ),
"name": string,
"id": string,
"state": enum (State ),
"taxIncluded": boolean,
// Union field spec can be only one of the following:
"amount": {
object (Money )
},
"amountMillipercentage": integer
// End of list of possible types for union field spec .
} |
字段 |
type |
enum (Type )
必需属性:money 属性的类型。
|
name |
string
必需:用户显示的价格属性字符串。此信息由商家发送并本地化。
|
id |
string
可选:与此价格对应的订单项的 ID。
|
state |
enum (State )
必需:价格状态:估算价格与实际价格。
|
taxIncluded |
boolean
价格是否含税。
|
联合字段 spec 。表示货币金额或毫百分比。spec 只能是下列其中一项: |
amount |
object (Money )
货币金额。
|
amountMillipercentage (deprecated) |
integer
百分比规范,精确到百分之 1/1000。例如:8.750% 表示为 8750,负百分比表示折扣百分比。弃用此字段。如果需要可靠的应用场景,可以考虑重新添加。
|
金钱
JSON 表示法 |
{
"currencyCode": string,
"amountInMicros": string
} |
字段 |
currencyCode |
string
ISO 4217 中定义的由 3 个字母组成的货币代码。
|
amountInMicros |
string (int64 format)
金额(以微单位表示)。例如,对于 1.99 美元,应将此字段设置为 1990000。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003ePrice attributes provide order and line item pricing details, including type, name, ID, state, tax inclusion, and monetary amount or percentage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePriceAttribute\u003c/code\u003e object uses a \u003ccode\u003espec\u003c/code\u003e field to represent monetary amount through the \u003ccode\u003eamount\u003c/code\u003e object or a milli percentage with \u003ccode\u003eamountMillipercentage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMoney\u003c/code\u003e objects detail an amount with its currency, using \u003ccode\u003ecurrencyCode\u003c/code\u003e and \u003ccode\u003eamountInMicros\u003c/code\u003e for representation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eamountMillipercentage\u003c/code\u003e field within \u003ccode\u003ePriceAttribute\u003c/code\u003e is deprecated and should be avoided if possible.\u003c/p\u003e\n"]]],[],null,["# PriceAttribute\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Money](#Money)\n - [JSON representation](#Money.SCHEMA_REPRESENTATION)\n\nPrice attribute of an order or a line item.\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"type\": enum (`Type`), \"name\": string, \"id\": string, \"state\": enum (/assistant/df-asdk/reference/webhook/rest/Shared.Types/State), \"taxIncluded\": boolean, // Union field `spec` can be only one of the following: \"amount\": { object (/assistant/df-asdk/reference/webhook/rest/Shared.Types/PriceAttribute#Money) }, \"amountMillipercentage\": integer // End of list of possible types for union field `spec`. } ``` |\n\n| Fields ||\n|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| `type` | `enum (``Type``)` Required: type of money attribute. |\n| `name` | `string` Required: User displayed string of the price attribute. This is sent and localized by merchant. |\n| `id` | `string` Optional: Id of the lineitem to which this price corresponds. |\n| `state` | `enum (`[State](/assistant/df-asdk/reference/webhook/rest/Shared.Types/State)`)` Required: state of the price: Estimate vs Actual. |\n| `taxIncluded` | `boolean` Whether the price is tax included. |\n| Union field `spec`. Represents either monetary amount or milli percentage. `spec` can be only one of the following: |||\n| `amount` | `object (`[Money](/assistant/df-asdk/reference/webhook/rest/Shared.Types/PriceAttribute#Money)`)` Monetary amount. |\n| `amountMillipercentage` **(deprecated)** | `integer` | This item is deprecated! The percentage spec, to 1/1000th of a percent. Eg: 8.750% is represented as 8750, negative percentages represent percentage discounts. Deprecating this field. Can consider adding back when a solid usecase is required. |\n\nMoney\n-----\n\nRepresents an amount of money with its currency type.\n\n| JSON representation ||\n|--------------------------------------------------------------|---|\n| ``` { \"currencyCode\": string, \"amountInMicros\": string } ``` |\n\n| Fields ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `currencyCode` | `string` The 3-letter currency code defined in ISO 4217. |\n| `amountInMicros` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Amount in micros. For example, this field should be set as 1990000 for $1.99. |"]]