From 144b46ec3b2b9367a03075fac905e975e6399409 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 17 Sep 2018 21:07:26 +0300 Subject: [PATCH] Fix Address.postal_code to/from JSON. GitOrigin-RevId: 757d34d4c79023a9c1503b8075f0a0471673a87f --- td/telegram/Payments.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/Payments.cpp b/td/telegram/Payments.cpp index 13bcbda71..c5ea122fb 100644 --- a/td/telegram/Payments.cpp +++ b/td/telegram/Payments.cpp @@ -625,7 +625,7 @@ string address_to_json(const Address &address) { o("city", address.city); o("street_line1", address.street_line1); o("street_line2", address.street_line2); - o("postal_code", address.postal_code); + o("post_code", address.postal_code); })); } @@ -647,7 +647,7 @@ Result
address_from_json(Slice json) { TRY_RESULT(city, get_json_object_string_field(object, "city", true)); TRY_RESULT(street_line1, get_json_object_string_field(object, "street_line1", true)); TRY_RESULT(street_line2, get_json_object_string_field(object, "street_line2", true)); - TRY_RESULT(postal_code, get_json_object_string_field(object, "postal_code", true)); + TRY_RESULT(postal_code, get_json_object_string_field(object, "post_code", true)); TRY_STATUS(check_country_code(country_code)); TRY_STATUS(check_state(state));