PriceAttribute
Stay organized with collections
Save and categorize content based on your preferences.
Price attribute of an order or a line item.
type
enum ( Type
)
Required: type of money attribute.
name
string
Required: User displayed string of the price attribute. This is sent and localized by merchant.
id
string
Optional: Id of the lineitem to which this price corresponds.
state
enum ( State
)
Required: state of the price: Estimate vs Actual.
taxIncluded
boolean
Whether the price is tax included.
Union field spec
. Represents either monetary amount or milli percentage. spec
can be only one of the following:
amount
object ( Money
)
Monetary amount.
amountMillipercentage
(deprecated)
integer
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.
Money
Represents an amount of money with its currency type.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\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. |"]]