buy_sync


Description:

[ Version ( since = "1.3" ) ]
public bool buy_sync (string id, double amount, string currency, Cancellable? cancellable = null) throws Error

Buy a snap from the store.

Once purchased, this snap can be installed with install2_sync.

Parameters:

this

a Client.

id

id of snap to buy.

amount

amount of currency to spend, e.g. 0.99.

currency

the currency to buy with as an ISO 4217 currency code, e.g. "NZD".

cancellable

a Cancellable or null.

Returns:

true on success or false on error.