zulip/stubs/stripe/__init__.pyi

123 lines
2.8 KiB
Python
Raw Normal View History

import stripe.error as error
import stripe.util as util
import stripe.api_requestor as api_requestor
from stripe.api_resources.list_object import SubscriptionListObject
2018-08-31 20:09:36 +02:00
from typing import Optional, Any, Dict, List, Union
api_key: Optional[str]
class Customer:
default_source: Source
created: int
id: str
source: str
subscriptions: SubscriptionListObject
2018-08-23 07:45:19 +02:00
coupon: str
2018-08-31 20:09:36 +02:00
account_balance: int
email: str
description: str
discount: Optional[Discount]
metadata: Dict[str, str]
@staticmethod
def retrieve(customer_id: str=..., expand: Optional[List[str]]=...) -> Customer:
...
@staticmethod
def create(description: str=..., email: str=..., metadata: Dict[str, Any]=...,
source: Optional[str]=..., coupon: Optional[str]=...) -> Customer:
...
@staticmethod
def save(customer: Customer) -> Customer:
...
@staticmethod
def delete_discount(customer: Customer) -> None:
...
@staticmethod
def list(limit: Optional[int]=...) -> List[Customer]:
...
class Invoice:
auto_advance: bool
amount_due: int
billing: str
billing_reason: str
default_source: Source
status: str
2018-08-31 20:09:36 +02:00
total: int
@staticmethod
2018-08-31 20:09:36 +02:00
def upcoming(customer: str=..., subscription: str=...,
subscription_items: List[Dict[str, Union[str, int]]]=...) -> Invoice:
...
@staticmethod
def list(customer: str=..., limit: Optional[int]=...) -> List[Invoice]:
...
class Subscription:
created: int
status: str
canceled_at: int
cancel_at_period_end: bool
days_until_due: Optional[int]
2018-07-03 21:49:55 +02:00
proration_date: int
quantity: int
@staticmethod
def create(customer: str=..., billing: str=..., days_until_due: Optional[int]=...,
items: List[Dict[str, Any]]=...,
prorate: bool=..., tax_percent: float=...) -> Subscription:
...
@staticmethod
def save(subscription: Subscription, idempotency_key: str=...) -> Subscription:
...
class Source:
id: str
object: str
type: str
class Card:
id: str
last4: str
object: str
class Plan:
id: str
@staticmethod
def create(currency: str=..., interval: str=..., product: str=..., amount: int=...,
billing_scheme: str=..., nickname: str=..., usage_type: str=...) -> Plan:
...
class Product:
id: str
@staticmethod
def create(name: str=..., type: str=..., statement_descriptor: str=..., unit_label: str=...) -> Product:
...
2018-08-23 07:45:19 +02:00
class Discount:
coupon: Coupon
2018-08-23 07:45:19 +02:00
class Coupon:
id: str
percent_off: int
2018-08-23 07:45:19 +02:00
@staticmethod
def create(duration: str=..., name: str=..., percent_off: int=...) -> Coupon:
2018-08-23 07:45:19 +02:00
...
class Token:
id: str
@staticmethod
def create(card: Dict[str, Any]) -> Token:
...