wallee
Version:
TypeScript/JavaScript client for wallee
148 lines (147 loc) • 5.09 kB
TypeScript
import type { Transaction } from './Transaction';
import type { SubscriptionLedgerEntry } from './SubscriptionLedgerEntry';
import type { Subscription } from './Subscription';
import type { SubscriptionChargeState } from './SubscriptionChargeState';
import type { SubscriptionChargeProcessingType } from './SubscriptionChargeProcessingType';
import type { SubscriptionChargeType } from './SubscriptionChargeType';
/**
* The subscription charge represents a single charge carried out for a particular subscription.
* @export
* @interface SubscriptionCharge
*/
export interface SubscriptionCharge {
/**
* The date and time when the charge was discarded.
* @type {Date}
* @memberof SubscriptionCharge
*/
readonly discardedOn?: Date;
/**
* The date and time when the execution of the charge is planned.
* @type {Date}
* @memberof SubscriptionCharge
*/
readonly plannedExecutionDate?: Date;
/**
*
* @type {SubscriptionChargeProcessingType}
* @memberof SubscriptionCharge
*/
processingType?: SubscriptionChargeProcessingType;
/**
* The ledger entries that belong to the charge.
* @type {Set<SubscriptionLedgerEntry>}
* @memberof SubscriptionCharge
*/
readonly ledgerEntries?: Set<SubscriptionLedgerEntry>;
/**
* The ID of the user the charge was discarded by.
* @type {number}
* @memberof SubscriptionCharge
*/
readonly discardedBy?: number;
/**
* The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.
* @type {Date}
* @memberof SubscriptionCharge
*/
readonly plannedPurgeDate?: Date;
/**
* A client-generated nonce which uniquely identifies some action to be executed. Subsequent requests with the same external ID do not execute the action again, but return the original result.
* @type {string}
* @memberof SubscriptionCharge
*/
readonly externalId?: string;
/**
* The URL to redirect the customer back to after they successfully authenticated their payment.
* @type {string}
* @memberof SubscriptionCharge
*/
readonly successUrl?: string;
/**
* The language that is linked to the object.
* @type {string}
* @memberof SubscriptionCharge
*/
readonly language?: string;
/**
*
* @type {Subscription}
* @memberof SubscriptionCharge
*/
subscription?: Subscription;
/**
*
* @type {SubscriptionChargeType}
* @memberof SubscriptionCharge
*/
type?: SubscriptionChargeType;
/**
* The date and time when the charge was created.
* @type {Date}
* @memberof SubscriptionCharge
*/
readonly createdOn?: Date;
/**
* The version is used for optimistic locking and incremented whenever the object is updated.
* @type {number}
* @memberof SubscriptionCharge
*/
readonly version?: number;
/**
* The merchant's reference used to identify the charge.
* @type {string}
* @memberof SubscriptionCharge
*/
readonly reference?: string;
/**
* The ID of the space this object belongs to.
* @type {number}
* @memberof SubscriptionCharge
*/
readonly linkedSpaceId?: number;
/**
* A unique identifier for the object.
* @type {number}
* @memberof SubscriptionCharge
*/
readonly id?: number;
/**
*
* @type {SubscriptionChargeState}
* @memberof SubscriptionCharge
*/
state?: SubscriptionChargeState;
/**
* The date and time when the charge failed.
* @type {Date}
* @memberof SubscriptionCharge
*/
readonly failedOn?: Date;
/**
*
* @type {Transaction}
* @memberof SubscriptionCharge
*/
transaction?: Transaction;
/**
* The URL to redirect the customer back to after they canceled or failed to authenticated their payment.
* @type {string}
* @memberof SubscriptionCharge
*/
readonly failedUrl?: string;
/**
* The date and time when the charge succeeded.
* @type {Date}
* @memberof SubscriptionCharge
*/
readonly succeedOn?: Date;
}
/**
* Check if a given object implements the SubscriptionCharge interface.
*/
export declare function instanceOfSubscriptionCharge(value: object): value is SubscriptionCharge;
export declare function SubscriptionChargeFromJSON(json: any): SubscriptionCharge;
export declare function SubscriptionChargeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCharge;
export declare function SubscriptionChargeToJSON(json: any): SubscriptionCharge;
export declare function SubscriptionChargeToJSONTyped(value?: Omit<SubscriptionCharge, 'discardedOn' | 'plannedExecutionDate' | 'ledgerEntries' | 'discardedBy' | 'plannedPurgeDate' | 'externalId' | 'successUrl' | 'language' | 'createdOn' | 'version' | 'reference' | 'linkedSpaceId' | 'id' | 'failedOn' | 'failedUrl' | 'succeedOn'> | null, ignoreDiscriminator?: boolean): any;