-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathcustomer_bank_account.py
More file actions
121 lines (60 loc) · 2.03 KB
/
Copy pathcustomer_bank_account.py
File metadata and controls
121 lines (60 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# WARNING: Do not edit by hand, this file was generated by Crank:
#
# https://github.com/gocardless/crank
#
class CustomerBankAccount(object):
"""A thin wrapper around a customer_bank_account, providing easy access to its
attributes.
Example:
customer_bank_account = client.customer_bank_accounts.get()
customer_bank_account.id
"""
def __init__(self, attributes, api_response):
self.attributes = attributes
self.api_response = api_response
@property
def account_holder_name(self):
return self.attributes.get('account_holder_name')
@property
def account_number_ending(self):
return self.attributes.get('account_number_ending')
@property
def account_type(self):
return self.attributes.get('account_type')
@property
def bank_account_token(self):
return self.attributes.get('bank_account_token')
@property
def bank_name(self):
return self.attributes.get('bank_name')
@property
def country_code(self):
return self.attributes.get('country_code')
@property
def created_at(self):
return self.attributes.get('created_at')
@property
def currency(self):
return self.attributes.get('currency')
@property
def enabled(self):
return self.attributes.get('enabled')
@property
def id(self):
return self.attributes.get('id')
@property
def links(self):
return self.Links(self.attributes.get('links'))
@property
def metadata(self):
return self.attributes.get('metadata')
@property
def trusted_recipient(self):
return self.attributes.get('trusted_recipient')
class Links(object):
"""Wrapper for the response's 'links' attribute."""
def __init__(self, attributes):
self.attributes = attributes
@property
def customer(self):
return self.attributes.get('customer')