Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: components/payments/core/payment_address.h

Issue 2733953003: [Payments] Return a basic card response (Closed)
Patch Set: addressed comments from anthony Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_ADDRESS_H_
6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_ADDRESS_H_
7
8 #include <memory>
9 #include <vector>
10
11 #include "base/strings/string16.h"
12
13 // C++ bindings for the PaymentRequest API PaymentAddress. Conforms to the
14 // following spec:
15 // https://w3c.github.io/browser-payment-api/#paymentaddress-interface
16
17 namespace base {
18 class DictionaryValue;
19 }
20
21 namespace payments {
22
23 // A shipping or billing address.
24 struct PaymentAddress {
25 public:
26 PaymentAddress();
27 PaymentAddress(const PaymentAddress& other);
28 ~PaymentAddress();
29
30 bool operator==(const PaymentAddress& other) const;
31 bool operator!=(const PaymentAddress& other) const;
32
33 // Populates |value| with the properties of this PaymentAddress.
34 std::unique_ptr<base::DictionaryValue> ToDictionaryValue() const;
35
36 // The CLDR (Common Locale Data Repository) region code. For example, US, GB,
37 // CN, or JP.
38 base::string16 country;
39
40 // The most specific part of the address. It can include, for example, a
41 // street name, a house number, apartment number, a rural delivery route,
42 // descriptive instructions, or a post office box number.
43 std::vector<base::string16> address_line;
44
45 // The top level administrative subdivision of the country. For example, this
46 // can be a state, a province, an oblast, or a prefecture.
47 base::string16 region;
48
49 // The city/town portion of the address.
50 base::string16 city;
51
52 // The dependent locality or sublocality within a city. For example, used for
53 // neighborhoods, boroughs, districts, or UK dependent localities.
54 base::string16 dependent_locality;
55
56 // The postal code or ZIP code, also known as PIN code in India.
57 base::string16 postal_code;
58
59 // The sorting code as used in, for example, France.
60 base::string16 sorting_code;
61
62 // The BCP-47 language code for the address. It's used to determine the field
63 // separators and the order of fields when formatting the address for display.
64 base::string16 language_code;
65
66 // The organization, firm, company, or institution at this address.
67 base::string16 organization;
68
69 // The name of the recipient or contact person.
70 base::string16 recipient;
71
72 // The phone number of the recipient or contact person.
73 base::string16 phone;
74 };
75
76 } // namespace payments
77
78 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_ADDRESS_H_
OLDNEW
« no previous file with comments | « components/payments/core/basic_card_response_unittest.cc ('k') | components/payments/core/payment_address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698