コード例 #1
0
    def price_combined_float(self):
        """Float value of the combined seatprice + surcharge
        """

        return to_float_summed(
            self._core_avail_detail.seatprice,
            self._core_avail_detail.surcharge
        )
コード例 #2
0
    def non_offer_combined_float(self):
        """Float value of the combined full_seatprice + full_surcharge.
        Returns None if doesn't exist.
        """

        if self._core_avail_detail.full_seatprice and self._core_avail_detail.full_surcharge:

            return to_float_summed(self._core_avail_detail.full_seatprice, self._core_avail_detail.full_surcharge)

        return None
コード例 #3
0
 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
         )
コード例 #4
0
ファイル: order.py プロジェクト: adamchainz/pyticketswitch
 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
         )
コード例 #5
0
 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
         )