Update upstream source from tag 'upstream/1.6.6'
Update to upstream version '1.6.6'
with Debian dir 52de744ac439410cc59a9a1dff5ac14224206425
Scott Kitterman
4 years ago
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: chargebee |
2 | Version: 1.6.4 | |
2 | Version: 1.6.6 | |
3 | 3 | Summary: Python wrapper for the ChargeBee Subscription Billing API |
4 | 4 | Home-page: https://apidocs.chargebee.com/docs/api?lang=python |
5 | 5 | Author: ChargeBee |
19 | 19 | return request.send('post', request.uri_path("customers",id,"credit_card"), params, env, headers) |
20 | 20 | |
21 | 21 | @staticmethod |
22 | def update_card_for_customer_using_payment_intent(id, params, env=None, headers=None): | |
22 | def update_card_for_customer_using_payment_intent(id, params=None, env=None, headers=None): | |
23 | 23 | return request.send('post', request.uri_path("customers",id,"credit_card_using_payment_intent"), params, env, headers) |
24 | 24 | |
25 | 25 | @staticmethod |
0 | import json | |
1 | from chargebee.model import Model | |
2 | from chargebee import request | |
3 | from chargebee import APIError | |
4 | ||
5 | class PaymentIntent(Model): | |
6 | class PaymentAttempt(Model): | |
7 | fields = ["id", "status", "id_at_gateway", "error_code", "error_text", "created_at", "modified_at"] | |
8 | pass | |
9 | ||
10 | fields = ["id", "status", "currency_code", "amount", "gateway_account_id", "expires_at", \ | |
11 | "reference_id", "created_at", "modified_at", "customer_id", "gateway", "active_payment_attempt"] | |
12 | ||
13 | ||
14 | @staticmethod | |
15 | def create(params, env=None, headers=None): | |
16 | return request.send('post', request.uri_path("payment_intents"), params, env, headers) | |
17 | ||
18 | @staticmethod | |
19 | def update(id, params=None, env=None, headers=None): | |
20 | return request.send('post', request.uri_path("payment_intents",id), params, env, headers) | |
21 | ||
22 | @staticmethod | |
23 | def retrieve(id, env=None, headers=None): | |
24 | return request.send('get', request.uri_path("payment_intents",id), None, env, headers) |
82 | 82 | return self._get('portal_session', PortalSession, |
83 | 83 | {'linked_customers' : PortalSession.LinkedCustomer}); |
84 | 84 | |
85 | @property | |
86 | def payment_intent(self): | |
87 | return self._get('payment_intent', PaymentIntent, | |
88 | {'payment_attempt' : PaymentIntent.PaymentAttempt}); | |
89 | ||
85 | 90 | |
86 | 91 | |
87 | 92 | def _get(self, type, cls, sub_types=None): |