#include "components/autofill/core/browser/payments/payments_requests/migrate_cards_request.h"
#include <string>
#include <utility>
#include "base/containers/span.h"
#include "base/json/json_writer.h"
#include "base/strings/escape.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/payments/local_card_migration_manager.h"
namespace autofill::payments {
namespace {
constexpr char kMigrateCardsRequestPath[] = …;
constexpr char kMigrateCardsRequestFormat[] = …;
}
MigrateCardsRequest::MigrateCardsRequest(
const PaymentsNetworkInterface::MigrationRequestDetails& request_details,
base::span<const MigratableCreditCard> migratable_credit_cards,
const bool full_sync_enabled,
MigrateCardsCallback callback)
: … { … }
MigrateCardsRequest::~MigrateCardsRequest() = default;
std::string MigrateCardsRequest::GetRequestUrlPath() { … }
std::string MigrateCardsRequest::GetRequestContentType() { … }
std::string MigrateCardsRequest::GetRequestContent() { … }
void MigrateCardsRequest::ParseResponse(const base::Value::Dict& response) { … }
bool MigrateCardsRequest::IsResponseComplete() { … }
void MigrateCardsRequest::RespondToDelegate(
PaymentsAutofillClient::PaymentsRpcResult result) { … }
std::string MigrateCardsRequest::GetPanFieldName(const size_t& index) { … }
std::string MigrateCardsRequest::GetAppendPan(
const CreditCard& credit_card,
const std::string& app_locale,
const std::string& pan_field_name) { … }
}