Snapd.Price

g GObject.Object GObject.Object Snapd.Price Snapd.Price GObject.Object->Snapd.Price

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_amount ()

get_currency ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

amount

float

r/w/co

Amount of price

currency

str

r/w/co

Currency amount is in

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Snapd.Price(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Snapd.PriceClass

Snapd.Price contains pricing information.

New in version 1.0.

get_amount()
Returns:

a currency amount.

Return type:

float

Get the currency amount for this price, e.g. 0.99.

New in version 1.0.

get_currency()
Returns:

an ISO 4217 currency code.

Return type:

str

Get the currency this price is in, e.g. “NZD”.

New in version 1.0.

Property Details

Snapd.Price.props.amount
Name:

amount

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Amount of price

Snapd.Price.props.currency
Name:

currency

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Currency amount is in