@churchapps/helpers
Version:
Library of helper functions not specific to any one ChurchApps project or framework.
25 lines • 847 B
JavaScript
export class StripePaymentMethod {
id;
type;
name;
last4;
exp_month;
exp_year;
status;
account_holder_name;
account_holder_type;
constructor(obj) {
this.id = obj?.id || null;
this.type =
obj?.type ||
(obj?.object && obj.object === "bank_account" ? "bank" : null);
this.name = obj?.card?.brand || obj?.bank_name || null;
this.last4 = obj?.last4 || obj?.card?.last4 || null;
this.exp_month = obj?.exp_month || obj?.card?.exp_month || null;
this.exp_year = obj?.exp_year || obj?.card?.exp_year || null;
this.status = obj?.status || null;
this.account_holder_name = obj?.account_holder_name || "";
this.account_holder_type = obj?.account_holder_type || "individual";
}
}
//# sourceMappingURL=Donation.js.map