当前位置: 首页>>代码示例>>Python>>正文


Python util.resolve_boolean函数代码示例

本文整理汇总了Python中pyticketswitch.util.resolve_boolean函数的典型用法代码示例。如果您正苦于以下问题:Python resolve_boolean函数的具体用法?Python resolve_boolean怎么用?Python resolve_boolean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了resolve_boolean函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: supplier_can_use_data

 def supplier_can_use_data(self):
     if self._core_customer:
         return resolve_boolean(
             self._core_customer.dp_supplier
         )
     else:
         if isinstance(self._supplier_can_use_data, bool):
             return self._supplier_can_use_data
         elif isinstance(self._supplier_can_use_data, basestring):
             return resolve_boolean(
                 self._supplier_can_use_data
             )
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:12,代码来源:base.py

示例2: user_can_use_data

 def user_can_use_data(self):
     if self._core_customer:
         return resolve_boolean(
             self._core_customer.dp_user
         )
     else:
         if isinstance(self._user_can_use_data, bool):
             return self._user_can_use_data
         elif isinstance(self._user_can_use_data, six.string_types):
             return resolve_boolean(
                 self._user_can_use_data
             )
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:12,代码来源:base.py

示例3: world_can_use_data

 def world_can_use_data(self):
     if self._core_customer:
         return resolve_boolean(
             self._core_customer.dp_world
         )
     else:
         if isinstance(self._world_can_use_data, bool):
             return self._world_can_use_data
         elif isinstance(self._world_can_use_data, basestring):
             return resolve_boolean(
                 self._world_can_use_data
             )
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:12,代码来源:base.py

示例4: example_seats_are_real

    def example_seats_are_real(self):
        """Boolean to indicate if the example_seats are actual seat numbers.

        If True, the seats in the example_seats list will be the seats that
        are reserved.
        """
        return resolve_boolean(self._core_price_band.example_seats_are_real)
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:7,代码来源:availability.py

示例5: need_departure_date

    def need_departure_date(self):
        """Flag to indicate that a departure date is required.

        Value can be True/False (a departure date is/isn't required)
        or None (the data could not be retrieved/unknown).
        See the API documentation for more information about the
        'need_departure_date' flag.
        """

        if self._need_departure_date is None:
            need_departure_date = self._get_core_event_attr(
                'need_departure_date'
            )

            if need_departure_date:

                self._need_departure_date = resolve_boolean(
                    need_departure_date
                )

            else:
                self.get_performances()

        if self._need_departure_date:
            return self._need_departure_date
        else:
            return None
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:27,代码来源:event.py

示例6: is_purchase_successful

    def is_purchase_successful(self):
        """Boolean indicating if the bundle was purchased successfully

        Will return True if the purchase was successful,
        False if the purchase was not successful and
        None if no purchase was attempted.
        """
        is_success = None

        if self._core_bundle.purchase_result:

            is_success = resolve_boolean(self._core_bundle.purchase_result.success)

        return is_success
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:14,代码来源:bundle.py

示例7: _build_reviews

    def _build_reviews(self):
        self._critic_reviews = []
        self._user_reviews = []
        for r in self._get_core_event_attr('reviews'):

            is_user_bool = resolve_boolean(r.is_user_review)

            review = Review(
                core_review=r, is_user_review=is_user_bool
            )

            if is_user_bool:
                self._user_reviews.append(review)
            else:
                self._critic_reviews.append(review)
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:15,代码来源:event.py

示例8: is_purchase_successful

    def is_purchase_successful(self):
        """Check if the trolley was purchased successfully

        Will return True if the purchase was successful,
        False if the purchase was not successful and
        None if no purchase was attempted.
        """
        is_success = None

        if self._core_trolley.purchase_result:

            is_success = resolve_boolean(
                self._core_trolley.purchase_result.success
            )

        return is_success
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:16,代码来源:trolley.py

示例9: delete

    def delete(self):
        """Cancels this reservation, returns True if successful."""

        crypto_block = self._get_crypto_block_for_object(
            method_name='make_reservation',
            interface_object=self
        )

        resp_dict = self.get_core_api().release_reservation(
            crypto_block=crypto_block,
            upfront_data_token=self.settings['upfront_data_token'],
        )

        return resolve_boolean(
            resp_dict['released_ok']
        )
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:16,代码来源:reservation.py

示例10: needs_agent_reference

 def needs_agent_reference(self):
     return resolve_boolean(
         self._needs_agent_reference
     )
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:4,代码来源:reservation.py

示例11: supports_billing_address

 def supports_billing_address(self):
     """Boolean indicating if billing address can be provided during
     purchase."""
     return resolve_boolean(
         self._supports_billing_address
     )
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:6,代码来源:reservation.py

示例12: needs_email_address

 def needs_email_address(self):
     """Boolean indicating if an email address is required for purchase."""
     return resolve_boolean(
         self._needs_email_address
     )
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:5,代码来源:reservation.py

示例13: supports_https

 def supports_https(self):
     """Boolean flag indicating HTTPS support."""
     return resolve_boolean(
         self._core_video_iframe.video_iframe_supports_https
     )
开发者ID:babbageclunk,项目名称:pyticketswitch,代码行数:5,代码来源:event.py

示例14: failed_3d_secure

 def failed_3d_secure(self):
     """Boolean to indicate if the purchase attempt was marked with a
     3D secure failure."""
     return resolve_boolean(self._failed_3d_secure)
开发者ID:adamchainz,项目名称:pyticketswitch,代码行数:4,代码来源:api_exceptions.py

示例15: is_offer

 def is_offer(self):
     """Boolean to indicate if the default concession for this ticket
     type is a special offer.
     """
     return resolve_boolean(self._core_price_band.is_offer)
开发者ID:KerwinMa,项目名称:pyticketswitch,代码行数:5,代码来源:availability.py


注:本文中的pyticketswitch.util.resolve_boolean函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。