Exemple #1
0
 def amount_including_vat(self):
     """Float value of the commission including VAT"""
     if self._core_commission.amount_including_vat:
         return to_float_or_none(
             self._core_commission.amount_including_vat
         )
     return None
    def non_offer_surcharge_float(self):
        """Float value of the full_surcharge.
        Returns None if doesn't exist.
        """

        if self._core_avail_detail.full_surcharge:
            return to_float_or_none(self._core_avail_detail.full_surcharge)

        return None
    def absolute_saving_float(self):
        """Float value of the absolute_saving.
        Returns None if doesn't exist.
        """

        if self._core_avail_detail.absolute_saving:
            return to_float_or_none(self._core_avail_detail.absolute_saving)

        return None
 def non_offer_combined_float(self):
     """Float value of the original combined price (i.e. if there was no
     offer).
     """
     if self._core_price_band.combined:
         return to_float_or_none(self._core_price_band.non_offer_combined)
     else:
         return to_float_summed(
             self._core_price_band.non_offer_ticket_price, self._core_price_band.non_offer_surcharge
         )
Exemple #5
0
    def min_seatprice_float(self):
        """Float value of the minumum seat price."""
        fl_sp = None

        cost_range = self._get_core_cost_range()

        if cost_range:
            fl_sp = to_float_or_none(
                cost_range.min_seatprice
            )
        return fl_sp
 def price_combined_float(self):
     """Float value of the combined price."""
     if self._core_price_band.combined:
         return to_float_or_none(
             self._core_price_band.combined
         )
     else:
         return to_float_summed(
             self._core_price_band.ticket_price,
             self._core_price_band.surcharge
         )
Exemple #7
0
    def max_combined_price_float(self):
        """Float value of the maximum combined price."""
        fl_sp = None

        cost_range = self._get_core_cost_range()

        if cost_range:
            fl_sp = to_float_or_none(
                cost_range.max_combined
            )
        return fl_sp
Exemple #8
0
 def total_combined_float(self):
     """Float value of the total combined price."""
     if self._core_order.total_combined:
         return to_float_or_none(
             self._core_order.total_combined
         )
     else:
         return to_float_summed(
             self._core_order.total_seatprice,
             self._core_order.total_surcharge
         )
    def commission_ex_vat(self):
        """Float value of the user's commission excluding VAT for
        this Concession.

        Only available if requested in get_concessions with the
        include_user_commission flag.
        """
        if self._core_discount.user_commission:

            return to_float_or_none(
                self._core_discount.user_commission.amount_inc_vat
            )

        return None
    def commission_ex_vat(self):
        """Float value of the user's commission excluding VAT for the
        default concession on this TicketType.

        Only available if requested at the availability stage with the
        include_user_commission flag.
        """
        if self._core_price_band.user_commission:

            return to_float_or_none(
                self._core_price_band.user_commission.amount_inc_vat
            )

        return None
Exemple #11
0
    def absolute_saving_float(self):
        """Float value of the absolute saving."""
        ab_val = self._core_offer.get('absolute_saving', None)

        if (
            ab_val is None and
            self.full_combined_price_float is not None and
            self.offer_combined_price_float is not None
        ):
            ab_val = (
                self.full_combined_price_float -
                self.offer_combined_price_float
            )

        return to_float_or_none(ab_val)
Exemple #12
0
 def percentage_saving_float(self):
     """Float value of the percentage saving."""
     return to_float_or_none(
         self._core_offer['percentage_saving']
     )
Exemple #13
0
 def offer_surcharge_price_float(self):
     """Float value of the offer surcharge price."""
     return to_float_or_none(
         self._core_offer['offer_surcharge']
     )
Exemple #14
0
 def offer_seatprice_float(self):
     """Float value of the offer seatprice price."""
     return to_float_or_none(
         self._core_offer['offer_seatprice']
     )
Exemple #15
0
 def offer_combined_price_float(self):
     """Float value of the offer combined price."""
     return to_float_or_none(
         self._core_offer['offer_combined']
     )
Exemple #16
0
 def full_seatprice_float(self):
     """Float value of the full seatprice price."""
     return to_float_or_none(
         self._core_offer['full_seatprice']
     )
 def ticket_price_float(self):
     """Float value of the combined price."""
     return to_float_or_none(self._core_discount.combined)
Exemple #18
0
 def total_cost_float(self):
     """Float value of the total combined price."""
     return to_float_or_none(
         self._core_bundle.bundle_total_cost
     )
 def price_without_surcharge_float(self):
     """Float value of the price excluding surcharge."""
     return to_float_or_none(self._core_price_band.ticket_price)
 def surcharge_float(self):
     """Float value of the surcharge."""
     return to_float_or_none(self._core_discount.surcharge)
 def seatprice_float(self):
     """Float value of the seat price (i.e. without surcharge)."""
     return to_float_or_none(self._core_discount.seatprice)
    def seatprice_float(self):
        """Float value of the seatprice."""

        return to_float_or_none(self._core_avail_detail.seatprice)
 def cost_float(self):
     """Float value of the cost."""
     return to_float_or_none(self._core_despatch_method.despatch_cost)
    def surcharge_float(self):
        """Float value of the surcharge"""

        return to_float_or_none(self._core_avail_detail.surcharge)
 def surcharge_float(self):
     """Float value of the surcharge."""
     return to_float_or_none(self._core_price_band.surcharge)
    def has_no_booking_fee(self):
        """Returns true if the surcharge is zero, false otherwise."""

        surcharge = to_float_or_none(self._core_avail_detail.surcharge)
        return not bool(surcharge)
 def non_offer_surcharge_float(self):
     """Float value of the original surcharge (i.e. if there was no
     offer).
     """
     return to_float_or_none(self._core_price_band.non_offer_surcharge)