import { MakeKeysRequired } from "./types"; import { wallet } from "./models/wallet"; import { user } from "./models/user"; import { address } from "./models/address"; import { base } from "./base"; import MangoPay = require("./index"); export namespace Models { import EntityBase = MangoPay.models.EntityBase; import ModelMethods = MangoPay.models.ModelMethods; import DependsObject = base.DependsObject; class Model implements ModelMethods { initialize(): void; getData(attribute: K): T[K]; setData(attribute: K, value: T[K]): this; setData(attribute: Partial): this; setData(attribute: any, value?: any): this; getReadOnlyProperties(): Array; getDependsObjects(): DependsObject[]; parse(): void; constructor(data: T); } class Address extends EntityBase { constructor(data: Partial | address.CreateAddress); } class BankAccountDetails { constructor(data: any); } class Wallet extends EntityBase { constructor(data: wallet.CreateWallet | wallet.UpdateWallet); } class UserLegal extends EntityBase { PersonType: "LEGAL"; constructor( data: MakeKeysRequired, user.RequiredUserLegalData> ); /** * Sets the person type for the model * @param personType */ setPersonType(type: user.PersonType): void; } class UserNatural extends EntityBase { PersonType: "NATURAL"; constructor( data: MakeKeysRequired, user.RequiredUserNaturalData> ); /** * Sets the person type for the model * @param personType */ setPersonType(type: user.PersonType): void; } }