@@ -54,6 +54,11 @@ export class Credits extends APIResource {
5454 *
5555 * Note that `currency` defaults to credits if not specified. To use a real world
5656 * currency, set `currency` to an ISO 4217 string.
57+ *
58+ * Results can be filtered by the block's `effective_date` using the
59+ * `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
60+ * `effective_date[lte]` query parameters. This filters on when the credit block
61+ * becomes effective, which may differ from creation time for backdated credits.
5762 */
5863 list (
5964 customerId : string ,
@@ -86,6 +91,11 @@ export class Credits extends APIResource {
8691 *
8792 * Note that `currency` defaults to credits if not specified. To use a real world
8893 * currency, set `currency` to an ISO 4217 string.
94+ *
95+ * Results can be filtered by the block's `effective_date` using the
96+ * `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
97+ * `effective_date[lte]` query parameters. This filters on when the credit block
98+ * becomes effective, which may differ from creation time for backdated credits.
8999 */
90100 listByExternalId (
91101 externalCustomerId : string ,
@@ -129,6 +139,14 @@ export interface CreditListResponse {
129139
130140 maximum_initial_balance : number | null ;
131141
142+ /**
143+ * User specified key-value pairs for the resource. If not present, this defaults
144+ * to an empty dictionary. Individual keys can be removed by setting the value to
145+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
146+ * `null`.
147+ */
148+ metadata : { [ key : string ] : string } ;
149+
132150 per_unit_cost_basis : string | null ;
133151
134152 status : 'active' | 'pending_payment' ;
@@ -169,6 +187,14 @@ export interface CreditListByExternalIDResponse {
169187
170188 maximum_initial_balance : number | null ;
171189
190+ /**
191+ * User specified key-value pairs for the resource. If not present, this defaults
192+ * to an empty dictionary. Individual keys can be removed by setting the value to
193+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
194+ * `null`.
195+ */
196+ metadata : { [ key : string ] : string } ;
197+
172198 per_unit_cost_basis : string | null ;
173199
174200 status : 'active' | 'pending_payment' ;
@@ -202,6 +228,14 @@ export interface CreditListParams extends PageParams {
202228 */
203229 currency ?: string | null ;
204230
231+ 'effective_date[gt]' ?: string | null ;
232+
233+ 'effective_date[gte]' ?: string | null ;
234+
235+ 'effective_date[lt]' ?: string | null ;
236+
237+ 'effective_date[lte]' ?: string | null ;
238+
205239 /**
206240 * If set to True, all expired and depleted blocks, as well as active block will be
207241 * returned.
@@ -215,6 +249,14 @@ export interface CreditListByExternalIDParams extends PageParams {
215249 */
216250 currency ?: string | null ;
217251
252+ 'effective_date[gt]' ?: string | null ;
253+
254+ 'effective_date[gte]' ?: string | null ;
255+
256+ 'effective_date[lt]' ?: string | null ;
257+
258+ 'effective_date[lte]' ?: string | null ;
259+
218260 /**
219261 * If set to True, all expired and depleted blocks, as well as active block will be
220262 * returned.
0 commit comments