AI-generated Key Takeaways
-
A PriceItemOperation represents the creation of a new price item.
-
Calling methods like
getErrors,getResult, orisSuccessfulexecutes the operation and creates the price item. -
For efficiency, it's recommended to store operations in an array and call methods only after constructing all operations.
-
The
getErrorsmethod returns errors if the operation failed, whilegetResultreturns the created PriceItem or null. -
The
isSuccessfulmethod indicates if the operation was successful with a boolean value.
Methods:
| Member | Type | Description |
|---|---|---|
| getErrors() | String[] |
Returns an empty array if the operation was successful, otherwise returns the list of errors encountered when trying to create the PriceItem. |
| getResult() | AdsApp.PriceItem |
Returns the newly created PriceItem, or null if
the operation was unsuccessful. |
| isSuccessful() | boolean |
Returns true if the operation was successful. |
getErrors()
Returns an empty array if the operation was successful, otherwise returns
the list of errors encountered when trying to create the PriceItem. Return values:
| Type | Description |
|---|---|
String[] |
The errors that occurred during the PriceItemOperation . |
getResult()
Returns the newly created PriceItem, or null if
the operation was unsuccessful. Return values:
| Type | Description |
|---|---|
AdsApp.PriceItem |
The PriceItem created by the PriceItemOperation. |
isSuccessful()
Returns true if the operation was successful. Return values:
| Type | Description |
|---|---|
boolean |
true if the operation was successful. |