UNPKG

paypal-custom-sdk

Version:

a minimalistic paypal sdk for custom integrations

81 lines (80 loc) 2.02 kB
import { BillingCycle, ClientMetadata, Link, PaymentPreferences, PurchaseUnit, ShippingAddress, ShippingAmount, Subscriber, Taxes } from './Commons'; export interface GenerateAccessTokenResponse { scope: string; access_token: string; token_type: string; app_id: string; expires_in: number; supported_authn_schemes: string[]; nonce: string; client_metadata: ClientMetadata; } export interface CreatePlanResponse { id: string; product_id: string; name: string; status: string; description: string; usage_type: string; billing_cycles: BillingCycle[]; payment_preferences: PaymentPreferences; taxes: Taxes; quantity_supported: boolean; create_time: string; update_time: string; links: Link[]; } export interface CreateSubscriptionResponse { id: string; status: string; status_update_time: string; plan_id: string; plan_overridden: boolean; start_time: string; quantity: string; shipping_amount: ShippingAmount; subscriber: Subscriber; create_time: string; links: Link[]; } export interface ReviseSubscriptionResponse { plan_id: string; plan_overridden: boolean; shipping_amount: ShippingAmount; shipping_address: ShippingAddress; links: Link[]; } export interface CreateOrderResponse { id: string; intent: string; status: string; purchase_units: PurchaseUnit[]; create_time: string; links: Link[]; } export interface UpdateOrderResponse { id: string; intent: string; status: string; purchase_units: PurchaseUnit[]; create_time: string; links: Link[]; } export interface CaptureOrderResponse { id: string; status: string; purchase_units: PurchaseUnit[]; create_time: string; links: Link[]; } export interface RefundResponse { id: string; status: string; links: Link[]; amount?: { value: string; currency_code: string; }; create_time: string; update_time: string; }