public class AppmarketBillingClient extends Object
| Modifier and Type | Method and Description |
|---|---|
APIResult |
billUsage(String baseAppmarketUrl,
String key,
Usage usage)
Calls the Billing API REST endpoint against an AppMarket instance to bill usage
|
APIResult |
billUsage(String baseAppmarketUrl,
String key,
Usage usage,
boolean isAsync)
Calls the Billing API REST endpoint against an AppMarket instance to bill usage
|
public APIResult billUsage(String baseAppmarketUrl, String key, Usage usage)
baseAppmarketUrl - to which the POST is sentkey - to sign the requestusage - to be billedAPIResult instance representing the marketplace response
throws an ReportUsageException to the client with an error code and a status:
Configuration Error: The JSON sent to the marketplace had wrong parameters.
User Not Found: One of the Usage parameters was not found. Probably the accountIdentifier.
Unknown Error: Error on marketplace side.
public APIResult billUsage(String baseAppmarketUrl, String key, Usage usage, boolean isAsync)
baseAppmarketUrl - to which the POST is sentkey - to sign the requestusage - to be billedisAsync - to send asyncAPIResult instance representing the marketplace response
throws an ReportUsageException to the client with an error code and a status:
Configuration Error: The JSON sent to the marketplace had wrong parameters.
User Not Found: One of the Usage parameters was not found. Probably the accountIdentifier.
Unknown Error: Error on marketplace side.
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.