-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcard-programs.ts
85 lines (71 loc) · 2.28 KB
/
card-programs.ts
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
// 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.
*/
retrieve(cardProgramToken: string, options?: Core.RequestOptions): Core.APIPromise<CardProgram> {
return this._client.get(`/v1/card_programs/${cardProgramToken}`, options);
}
/**
* List card programs.
*/
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;
/**
* 3-digit alphabetic ISO 4217 code for the currency of the cardholder.
*/
cardholder_currency?: string;
/**
* List of 3-digit 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,
};
}