Pricing

class jelastic.api.pricing.Pricing(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]

Bases: ClientAbstract

>>> from jelastic import Jelastic
>>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f')
>>> jelastic.pricing

Ref: https://docs.jelastic.com/api/private/#!/api/pricing

property Option: _Option
>>> from jelastic import Jelastic
>>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f')
>>> jelastic.pricing.Option

Ref: https://docs.jelastic.com/api/private/#!/api/pricing.Option

property Tariff: _Tariff
>>> from jelastic import Jelastic
>>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f')
>>> jelastic.pricing.Tariff

Ref: https://docs.jelastic.com/api/private/#!/api/pricing.Tariff

class jelastic.api.pricing._Option(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]

Bases: Pricing

Ref: https://docs.jelastic.com/api/private/#!/api/pricing.Option

Create(tariff_option: dict, reseller_id: int | None = None, ruk: str | None = None)[source]

Creates a new tariff option TariffOption for the main platform or reseller. It should be unique by name

Parameters:
  • tariff_option – JSON representation of object which needs to be created.

  • reseller_id – unique identifier of a reseller

Delete(name: str, reseller_id: int | None = None, ruk: str | None = None)[source]

Deletes a tariff option TariffOption for the main platform or reseller.

Parameters:
  • name – name of a tariff option

  • reseller_id – unique identifier of a reseller

Edit(tariff_option: dict, reseller_id: int | None = None, ruk: str | None = None)[source]

Modifies a tariff option TariffOption for the main platform or reseller. It should be unique by name

Parameters:
  • tariff_option – JSON representation of object which needs to be created.

  • reseller_id – unique identifier of a reseller

Get(reseller_id: int | None = None, ruk: str | None = None)[source]
Parameters:

reseller_id – unique identifier of a reseller

class jelastic.api.pricing._Tariff(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]

Bases: Pricing

Ref: https://docs.jelastic.com/api/private/#!/api/pricing.Tariff

CreateGrid(tariff_grid: dict, reseller_id: int | None = None, ruk: str | None = None)[source]

Creates a new tariff grid TariffGrid for the main platform or reseller. It should be unique by name

Parameters:
  • tariff_grid – JSON representation of object which needs to be created.

  • reseller_id – unique identifier of a reseller

CreateGridItem(grid_item: dict, reseller_id: int | None = None, ruk: str | None = None)[source]

Creates a new tariff grid item TariffGridItem for the main platform or reseller. It should be unique by name

Parameters:
  • grid_item – JSON representation of object which needs to be created.

  • reseller_id – unique identifier of a reseller

DeleteGrid(name: str, reseller_id: int | None = None, ruk: str | None = None)[source]

Deletes a tariff grid TariffGrid by its name.

Parameters:
  • name – name of the grid

  • reseller_id – unique identifier of a reseller

DeleteGridItem(name: str, reseller_id: int | None = None, ruk: str | None = None)[source]

Deletes a tariff grid item TariffGridItem by its name.

Parameters:
  • name – name of the grid item

  • reseller_id – unique identifier of a reseller

EditGrid(tariff_grid: dict, reseller_id: int | None = None, ruk: str | None = None)[source]

Modifies a tariff grid TariffGrid for the main platform or reseller. It should be unique by name

Parameters:
  • tariff_grid – JSON representation of object which needs to be created.

  • reseller_id – unique identifier of a reseller

EditGridItem(grid_item: dict, reseller_id: int | None = None, ruk: str | None = None)[source]

Modifies a tariff grid item TariffGridItem for the main platform or reseller. It should be unique by name

Parameters:
  • grid_item – JSON representation of object which needs to be created.

  • reseller_id – unique identifier of a reseller

GetGridItems(name: str, reseller_id: int | None = None, ruk: str | None = None)[source]

Gets a list of tariff grid items TariffGridItem by grid name.

Parameters:
  • name – name of the grid

  • reseller_id – unique identifier of a reseller

GetGrids(names: list[str] | None = None, reseller_id: int | None = None, ruk: str | None = None)[source]

Gets a list of tariff grids TariffGrid for the main platform or reseller.

Parameters:
  • names – name(s) of the grid(s)

  • reseller_id – unique identifier of a reseller