@the-any-thing/mollie-api-client-inline-pem
Version:
Official Mollie API client for Node - inline pem file fork
22 lines (21 loc) • 854 B
TypeScript
import Resource from './Resource';
import Maybe from '../types/Maybe';
export default class ParentedResource<R, T extends R> extends Resource<R, T> {
protected defaultParentId: Maybe<string>;
/**
* Returns the passed parent identifier, or `defaultParentId` as set by `withParent` if the former is `undefined`.
*/
protected getParentId(input: Maybe<string>): Maybe<string>;
/**
* Sets the default parent identifier for future calls to the methods of this resource to the identifier of the
* passed parent object. If `undefined` or `null` or an otherwise falsy value is passed, or an object with a falsy
* identifier, this method is a no-op.
*
* @since 1.1.1
*
* @deprecated 2.0.0. This method is not supported by the v2 API.
*/
withParent(parent: {
id: string;
}): this;
}