forked from Increase/increase-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterest-payments.ts
More file actions
45 lines (38 loc) · 1.29 KB
/
interest-payments.ts
File metadata and controls
45 lines (38 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as InterestPaymentsAPI from './interest-payments';
import * as TransactionsAPI from '../transactions';
export class InterestPayments extends APIResource {
/**
* Simulates an interest payment to your account. In production, this happens
* automatically on the first of each month.
*/
create(
body: InterestPaymentCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<TransactionsAPI.Transaction> {
return this._client.post('/simulations/interest_payments', { body, ...options });
}
}
export interface InterestPaymentCreateParams {
/**
* The identifier of the Account Number the Interest Payment is for.
*/
account_id: string;
/**
* The interest amount in cents. Must be positive.
*/
amount: number;
/**
* The end of the interest period. If not provided, defaults to the current time.
*/
period_end?: string;
/**
* The start of the interest period. If not provided, defaults to the current time.
*/
period_start?: string;
}
export namespace InterestPayments {
export import InterestPaymentCreateParams = InterestPaymentsAPI.InterestPaymentCreateParams;
}