-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathobjects.py
More file actions
176 lines (91 loc) · 3.49 KB
/
objects.py
File metadata and controls
176 lines (91 loc) · 3.49 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
from .arm.object import ARMObject
class AccessToken(ARMObject):
__spec__ = {'object': 'access_token'}
class ClientToken(AccessToken):
__spec__ = {'polymorphic': {'type': 'client'}}
class OAuthToken(ARMObject):
__spec__ = {'endpoint': '/oauth/token', 'object': 'oauth_token'}
class Account(ARMObject):
__spec__ = {'object': 'account'}
class Customer(ARMObject):
__spec__ = {'object': 'customer'}
class ProcessingAccount(ARMObject):
__spec__ = {'object': 'processing_account'}
class Org(ARMObject):
__spec__ = {'endpoint': '/accounts/orgs', 'object': 'org'}
class User(ARMObject):
__spec__ = {'object': 'user'}
class Transaction(ARMObject):
__spec__ = {'endpoint': '/transactions', 'object': 'transaction'}
def void(self):
self.update(status='voided')
return self
class Payment(Transaction):
__spec__ = {'polymorphic': {'type': 'payment'}}
class Refund(Transaction):
__spec__ = {'polymorphic': {'type': 'refund'}}
class Credit(Transaction):
__spec__ = {'polymorphic': {'type': 'credit'}}
class Deposit(Transaction):
__spec__ = {'polymorphic': {'type': 'deposit'}}
class Ledger(ARMObject):
__spec__ = {'object': 'transaction_ledger'}
class PaymentMethod(ARMObject):
__spec__ = {'object': 'payment_method'}
class Card(PaymentMethod):
__spec__ = {'polymorphic': {'type': 'card'}}
field_map = set(['card_number', 'expiry', 'card_code'])
class BankAccount(PaymentMethod):
__spec__ = {'polymorphic': {'type': 'bank_account'}}
field_map = set(['account_number', 'routing_number', 'account_type'])
class BillingSchedule(ARMObject):
__spec__ = {'object': 'billing_schedule'}
class BillingCharge(ARMObject):
__spec__ = {'object': 'billing_charge'}
class Invoice(ARMObject):
__spec__ = {'object': 'invoice'}
class LineItem(ARMObject):
__spec__ = {'object': 'line_item'}
class ChargeItem(LineItem):
__spec__ = {'polymorphic': {'entry_type': 'charge'}}
class PaymentItem(LineItem):
__spec__ = {'polymorphic': {'entry_type': 'payment'}}
class Webhook(ARMObject):
__spec__ = {'object': 'webhook'}
class WebhookLog(ARMObject):
__spec__ = {'object': 'webhook_log'}
class PaymentLink(ARMObject):
__spec__ = {'object': 'payment_link'}
class PaymentActivation(ARMObject):
__spec__ = {'object': 'payment_activation'}
# Introduced in API v2
class Profile(ARMObject):
__spec__ = {'object': 'profile'}
class BillingItem(ARMObject):
__spec__ = {'object': 'billing_item'}
class Intent(ARMObject):
__spec__ = {'object': 'intent'}
class InvoiceAttachment(ARMObject):
__spec__ = {'object': 'invoice_attachment'}
class InvoiceItem(ARMObject):
__spec__ = {'object': 'invoice_item'}
class PaymentAllocation(ARMObject):
__spec__ = {'object': 'payment_allocation'}
class Entity(ARMObject):
__spec__ = {'endpoint': '/entities', 'object': 'entity'}
class Stakeholder(ARMObject):
__spec__ = {'object': 'stakeholder'}
class ProcessingAgreement(ARMObject):
__spec__ = {'object': 'processing_agreement'}
class Transfer(ARMObject):
__spec__ = {'object': 'transfer'}
class TransactionOperation(ARMObject):
__spec__ = {'object': 'transaction_operation'}
class CheckFront(ARMObject):
__spec__ = {'object': 'check_front'}
class CheckBack(ARMObject):
__spec__ = {'object': 'check_back'}
class ProcessingRule(ARMObject):
__spec__ = {'object': 'processing_rule'}
class ProcessingSettings(ARMObject):
__spec__ = {'object': 'processing_settings'}