forked from lithic-com/lithic-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcard-programs.ts
More file actions
106 lines (91 loc) · 2.8 KB
/
Copy pathcard-programs.ts
File metadata and controls
106 lines (91 loc) · 2.8 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import { CursorPage, type CursorPageParams } from '../pagination';
export class CardPrograms extends APIResource {
/**
* Get card program.
*
* @example
* ```ts
* const cardProgram = await client.cardPrograms.retrieve(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* );
* ```
*/
retrieve(cardProgramToken: string, options?: Core.RequestOptions): Core.APIPromise<CardProgram> {
return this._client.get(`/v1/card_programs/${cardProgramToken}`, options);
}
/**
* List card programs.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const cardProgram of client.cardPrograms.list()) {
* // ...
* }
* ```
*/
list(
query?: CardProgramListParams,
options?: Core.RequestOptions,
): Core.PagePromise<CardProgramsCursorPage, CardProgram>;
list(options?: Core.RequestOptions): Core.PagePromise<CardProgramsCursorPage, CardProgram>;
list(
query: CardProgramListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<CardProgramsCursorPage, CardProgram> {
if (isRequestOptions(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/v1/card_programs', CardProgramsCursorPage, { query, ...options });
}
}
export class CardProgramsCursorPage extends CursorPage<CardProgram> {}
export interface CardProgram {
/**
* Globally unique identifier.
*/
token: string;
/**
* Timestamp of when the card program was created.
*/
created: string;
/**
* The name of the card program.
*/
name: string;
/**
* The first digits of the card number that this card program ends with.
*/
pan_range_end: string;
/**
* The first digits of the card number that this card program starts with.
*/
pan_range_start: string;
/**
* Whether the card program is participating in Account Level Management. Currently
* applicable to Visa card programs only.
*/
account_level_management_enabled?: boolean;
/**
* 3-character alphabetic ISO 4217 code for the currency of the cardholder.
*/
cardholder_currency?: string;
/**
* List of 3-character alphabetic ISO 4217 codes for the currencies that the card
* program supports for settlement.
*/
settlement_currencies?: Array<string>;
}
export interface CardProgramListParams extends CursorPageParams {}
CardPrograms.CardProgramsCursorPage = CardProgramsCursorPage;
export declare namespace CardPrograms {
export {
type CardProgram as CardProgram,
CardProgramsCursorPage as CardProgramsCursorPage,
type CardProgramListParams as CardProgramListParams,
};
}