stripe_decode.cpp 530 B

1234567891011121314151617181920212223
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #include "stripe/stripe_decode.h"
  8. namespace Stripe {
  9. [[nodiscard]] bool ContainsFields(
  10. const QJsonObject &object,
  11. std::vector<QStringView> keys) {
  12. for (const auto &key : keys) {
  13. if (object.value(key).isUndefined()) {
  14. return false;
  15. }
  16. }
  17. return true;
  18. }
  19. } // namespace Stripe