import { ApiError, ApiErrorResponse, ApiResponse } from './Api'; export type GetPaymentMethodRequest = undefined; export type GetPaymentMethodError = ApiError; export type GetPaymentMethodErrorResponse = ApiErrorResponse< GetPaymentMethodError >; export type GetPaymentMethodResponse = ApiResponse<{ payment_methods: PaymentMethodResponse[]; }>; export type GetPaymentMethod = ApiResponse<{ paymentMethods: PaymentMethod[]; }>; export type BillingAddress = { billingFirstName?: string; billingLastName?: string; billingStreet: string; billingCity: string; billingState: string; billingPostalCode: string; billingCountry: string; }; export type BillingAccountInfoResponse = { billing_company?: string; billing_first_name: string; billing_last_name: string; billing_email?: string; billing_phone?: string; billing_street_2: string; billing_street: string; billing_city: string; billing_state: string; billing_postal_code: string; billing_country: string; }; export type BillingAddressRequest = BillingAccountInfoResponse; export type AddPaymentMethodRequest = BillingAddressRequest & { card_expiration_month: string; card_expiration_year: string; card_last_four: string; card_type: PaymentMethodCardType; name_on_card: string; nick_name: string; notes: string; payment_gateway_token: string; payment_type: PaymentMethodType; }; export type AddPaymentMethodError = ApiError; export type AddPaymentMethodErrorResponse = ApiErrorResponse< AddPaymentMethodError >; export type AddPaymentMethodResponse = ApiResponse<{ message: string; payment_method_id: string; }>; export type AddPaymentMethod = ApiResponse<{ message: string; paymentMethodId: string; }>; export enum PaymentMethodCardType { AMEX = 'american express', DISCOVER = 'discover', MASTER_CARD = 'mastercard', MAESTRO = 'maestro', VISA = 'visa', } export enum PaymentMethodType { ACH = 'ACH', CHECK = 'Check', CREDIT_CARD = 'Credit Card', } export enum PaymentMethodCardStatus { APPROVED = 'Approved', } export type PaymentMethodResponse = { id: string; name_on_card: string; status: PaymentMethodCardStatus; billing_company: string; billing_country: string; billing_city: string; billing_email: string; billing_first_name: string; billing_phone: string; billing_last_name: string; billing_street: string; billing_state: string; billing_postal_code: string; card_last_four: string; card_expiration_month: string; card_expiration_year: string; card_type: PaymentMethodCardType; is_active: boolean; billing_street_2: string; payment_type: PaymentMethodType; }; export type PaymentMethod = { id: string; nameOnCard: string; status: PaymentMethodCardStatus; billingFirstName: string; billingLastName: string; billingCompany: string; billingCountry: string; billingCity: string; billingEmail: string; billingPhone: string; billingStreet: string; billingState: string; billingPostalCode: string; cardLastFour: string; cardExpirationMonth: string; cardExpirationYear: string; cardType: PaymentMethodCardType; isActive: boolean; billingStreet2: string; paymentType: PaymentMethodType; };