OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_ |
| 7 |
| 8 #include <ostream> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/autofill/wallet/wallet_address.h" |
| 15 |
| 16 namespace base { |
| 17 class DictionaryValue; |
| 18 } |
| 19 |
| 20 namespace wallet { |
| 21 |
| 22 class FullWallet { |
| 23 friend std::ostream& operator<<(std::ostream& o, |
| 24 const FullWallet& full_wallet); |
| 25 public: |
| 26 FullWallet(int expiration_month, |
| 27 int expiration_year, |
| 28 const std::string& iin, |
| 29 const std::string& rest, |
| 30 Address* billing_address, |
| 31 Address* shipping_address, |
| 32 const std::vector<std::string> required_actions); |
| 33 ~FullWallet(); |
| 34 static scoped_ptr<FullWallet> FromDictionary( |
| 35 base::DictionaryValue* dictionary); |
| 36 // TODO(ahutter): Should this be int64 |
| 37 const std::string GetPAN(long otp) const; |
| 38 const std::string GetCVN(long otp) const; |
| 39 bool operator==(const FullWallet& other) const; |
| 40 bool operator!=(const FullWallet& other) const; |
| 41 |
| 42 const Address* GetBillingAddress() const { return billing_address_.get(); } |
| 43 const Address* GetShippingAddress() const { return shipping_address_.get(); } |
| 44 const std::vector<std::string> GetRequiredActions() const { |
| 45 return required_actions_; |
| 46 } |
| 47 const int GetExpirationMonth() const { return expiration_month_; } |
| 48 const int GetExpirationYear() const { return expiration_year_; } |
| 49 |
| 50 private: |
| 51 int expiration_month_; |
| 52 int expiration_year_; |
| 53 std::string iin_; |
| 54 std::string rest_; |
| 55 scoped_ptr<Address> billing_address_; |
| 56 scoped_ptr<Address> shipping_address_; |
| 57 std::vector<std::string> required_actions_; |
| 58 DISALLOW_COPY_AND_ASSIGN(FullWallet); |
| 59 }; |
| 60 |
| 61 } // end namespace wallet |
| 62 |
| 63 #endif // CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_ |
OLD | NEW |