@astrada.co/ts-astrada-sdk 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +0 -2
  3. package/dist/apis/CardApi.js +218 -0
  4. package/dist/apis/CardSubscriptionApi.js +268 -0
  5. package/dist/apis/CardholderApi.js +138 -0
  6. package/dist/apis/EnrollmentMethodsApi.js +139 -0
  7. package/dist/apis/NetworkBulkFeedsApi.js +264 -0
  8. package/dist/apis/SubaccountsApi.js +319 -0
  9. package/dist/apis/TransactionMessagesApi.js +138 -0
  10. package/dist/apis/TransactionsApi.js +215 -0
  11. package/dist/apis/WebhooksApi.js +380 -0
  12. package/{lib → dist}/models/Card.js +5 -4
  13. package/{lib → dist}/models/CardLinks.js +3 -2
  14. package/{lib → dist}/models/CardSubscription.js +7 -6
  15. package/{lib → dist}/models/CardSubscriptionLinks.js +3 -2
  16. package/{lib → dist}/models/Cardholder.js +6 -5
  17. package/{lib → dist}/models/CardholderCorporate.js +2 -1
  18. package/{lib → dist}/models/CardholderLinks.js +3 -2
  19. package/{lib → dist}/models/Conflict.js +2 -1
  20. package/{lib → dist}/models/CreateNetworkBulkFeedRequest.js +2 -1
  21. package/{lib → dist}/models/CreateSubaccountRequest.js +3 -2
  22. package/{lib → dist}/models/CreateWebhook201Response.d.ts +2 -0
  23. package/{lib → dist}/models/CreateWebhook201Response.js +8 -5
  24. package/{lib → dist}/models/CreateWebhookRequest.d.ts +2 -0
  25. package/{lib → dist}/models/CreateWebhookRequest.js +5 -2
  26. package/{lib → dist}/models/EnrollmentMethods200Response.js +2 -1
  27. package/dist/models/EnrollmentMethods413Response.d.ts +45 -0
  28. package/dist/models/EnrollmentMethods413Response.js +62 -0
  29. package/{lib → dist}/models/EnrollmentMethodsRequest.js +2 -1
  30. package/dist/models/GetCardSubscription404Response.d.ts +57 -0
  31. package/dist/models/GetCardSubscription404Response.js +66 -0
  32. package/{lib → dist}/models/GetSubaccounts200Response.js +4 -3
  33. package/{lib → dist}/models/GetSubaccounts200ResponseEmbedded.js +3 -2
  34. package/{lib → dist}/models/GetSubaccounts200ResponseLinks.js +3 -2
  35. package/{lib → dist}/models/GetTransactions200Response.js +4 -3
  36. package/{lib → dist}/models/GetTransactions200ResponseEmbedded.js +3 -2
  37. package/{lib → dist}/models/InlineObject.js +3 -2
  38. package/{lib → dist}/models/InlineObject1.js +2 -1
  39. package/{lib → dist}/models/InlineObject2.js +2 -1
  40. package/{lib → dist}/models/InlineObject3.js +2 -1
  41. package/{lib → dist}/models/InlineObject4.js +2 -1
  42. package/{lib → dist}/models/InlineObject5.js +2 -1
  43. package/{lib → dist}/models/InlineObjectErrorsInner.js +2 -1
  44. package/{lib → dist}/models/Link.js +2 -1
  45. package/{lib → dist}/models/ListCardSubscriptions200Response.js +4 -3
  46. package/{lib → dist}/models/ListCardSubscriptions200ResponseEmbedded.js +3 -2
  47. package/{lib → dist}/models/ListCardSubscriptions200ResponseLinks.js +3 -2
  48. package/dist/models/ListCardSubscriptions400Response.d.ts +52 -0
  49. package/dist/models/ListCardSubscriptions400Response.js +65 -0
  50. package/dist/models/ListCardSubscriptions400ResponseErrorsInner.d.ts +38 -0
  51. package/dist/models/ListCardSubscriptions400ResponseErrorsInner.js +55 -0
  52. package/dist/models/ListCardSubscriptions401Response.d.ts +45 -0
  53. package/dist/models/ListCardSubscriptions401Response.js +62 -0
  54. package/dist/models/ListCardSubscriptions403Response.d.ts +45 -0
  55. package/dist/models/ListCardSubscriptions403Response.js +62 -0
  56. package/dist/models/ListCardSubscriptions500Response.d.ts +45 -0
  57. package/dist/models/ListCardSubscriptions500Response.js +62 -0
  58. package/{lib → dist}/models/ListCards200Response.js +4 -3
  59. package/{lib → dist}/models/ListCards200ResponseEmbedded.js +3 -2
  60. package/{lib → dist}/models/ListNetworkBulkFeeds200Response.js +4 -3
  61. package/{lib → dist}/models/ListNetworkBulkFeeds200ResponseEmbedded.js +3 -2
  62. package/{lib → dist}/models/ListWebhooks200Response.js +4 -3
  63. package/{lib → dist}/models/ListWebhooks200ResponseEmbedded.js +3 -2
  64. package/{lib → dist}/models/ListWebhooks200ResponseLinks.js +3 -2
  65. package/{lib → dist}/models/NetworkBulkFeeds.d.ts +16 -1
  66. package/{lib → dist}/models/NetworkBulkFeeds.js +18 -5
  67. package/{lib → dist}/models/Subaccount.js +6 -5
  68. package/{lib → dist}/models/SubaccountConfiguration.js +3 -2
  69. package/{lib → dist}/models/SubaccountConfigurationVISA.js +2 -1
  70. package/{lib → dist}/models/Transaction.js +7 -6
  71. package/{lib → dist}/models/TransactionAcceptor.js +2 -1
  72. package/{lib → dist}/models/TransactionLinks.js +3 -2
  73. package/{lib → dist}/models/TransactionMessage.js +7 -6
  74. package/{lib → dist}/models/TransactionMessageAcceptor.js +2 -1
  75. package/{lib → dist}/models/UnprocessableEntity.js +2 -1
  76. package/{lib → dist}/models/UpdateCardSubscriptionRequest.js +2 -1
  77. package/{lib → dist}/models/UpdateSubaccountRequest.js +3 -2
  78. package/{lib → dist}/models/UpdateWebhookRequest.d.ts +2 -0
  79. package/{lib → dist}/models/UpdateWebhookRequest.js +5 -2
  80. package/{lib → dist}/models/Webhook.d.ts +2 -0
  81. package/{lib → dist}/models/Webhook.js +8 -5
  82. package/{lib → dist}/models/index.d.ts +7 -7
  83. package/{lib → dist}/models/index.js +7 -7
  84. package/dist/runtime.js +638 -0
  85. package/docs/Card.md +54 -0
  86. package/docs/CardApi.md +176 -0
  87. package/docs/CardLinks.md +36 -0
  88. package/docs/CardSubscription.md +56 -0
  89. package/docs/CardSubscriptionApi.md +252 -0
  90. package/docs/CardSubscriptionLinks.md +38 -0
  91. package/docs/Cardholder.md +44 -0
  92. package/docs/CardholderApi.md +85 -0
  93. package/docs/CardholderCorporate.md +37 -0
  94. package/docs/CardholderLinks.md +34 -0
  95. package/docs/Conflict.md +40 -0
  96. package/docs/CreateNetworkBulkFeedRequest.md +38 -0
  97. package/docs/CreateSubaccountRequest.md +36 -0
  98. package/docs/CreateWebhook201Response.md +52 -0
  99. package/docs/CreateWebhookRequest.md +42 -0
  100. package/docs/EnrollmentMethods200Response.md +34 -0
  101. package/docs/EnrollmentMethods413Response.md +36 -0
  102. package/docs/EnrollmentMethodsApi.md +85 -0
  103. package/docs/EnrollmentMethodsRequest.md +34 -0
  104. package/docs/GetCardSubscription404Response.md +40 -0
  105. package/docs/GetSubaccounts200Response.md +36 -0
  106. package/docs/GetSubaccounts200ResponseEmbedded.md +34 -0
  107. package/docs/GetSubaccounts200ResponseLinks.md +36 -0
  108. package/docs/GetTransactions200Response.md +36 -0
  109. package/docs/GetTransactions200ResponseEmbedded.md +34 -0
  110. package/docs/Link.md +48 -0
  111. package/docs/ListCardSubscriptions200Response.md +38 -0
  112. package/docs/ListCardSubscriptions200ResponseEmbedded.md +34 -0
  113. package/docs/ListCardSubscriptions200ResponseLinks.md +42 -0
  114. package/docs/ListCardSubscriptions400Response.md +38 -0
  115. package/docs/ListCardSubscriptions400ResponseErrorsInner.md +36 -0
  116. package/docs/ListCardSubscriptions401Response.md +36 -0
  117. package/docs/ListCardSubscriptions403Response.md +36 -0
  118. package/docs/ListCardSubscriptions500Response.md +36 -0
  119. package/docs/ListCards200Response.md +38 -0
  120. package/docs/ListCards200ResponseEmbedded.md +34 -0
  121. package/docs/ListNetworkBulkFeeds200Response.md +38 -0
  122. package/docs/ListNetworkBulkFeeds200ResponseEmbedded.md +34 -0
  123. package/docs/ListWebhooks200Response.md +37 -0
  124. package/docs/ListWebhooks200ResponseEmbedded.md +34 -0
  125. package/docs/ListWebhooks200ResponseLinks.md +36 -0
  126. package/docs/NetworkBulkFeeds.md +48 -0
  127. package/docs/NetworkBulkFeedsApi.md +247 -0
  128. package/docs/Subaccount.md +46 -0
  129. package/docs/SubaccountConfiguration.md +37 -0
  130. package/docs/SubaccountConfigurationVISA.md +34 -0
  131. package/docs/SubaccountsApi.md +321 -0
  132. package/docs/Transaction.md +66 -0
  133. package/docs/TransactionAcceptor.md +41 -0
  134. package/docs/TransactionLinks.md +40 -0
  135. package/docs/TransactionMessage.md +70 -0
  136. package/docs/TransactionMessageAcceptor.md +47 -0
  137. package/docs/TransactionMessagesApi.md +85 -0
  138. package/docs/TransactionsApi.md +174 -0
  139. package/docs/UnprocessableEntity.md +36 -0
  140. package/docs/UpdateCardSubscriptionRequest.md +34 -0
  141. package/docs/UpdateSubaccountRequest.md +36 -0
  142. package/docs/UpdateWebhookRequest.md +40 -0
  143. package/docs/Webhook.md +51 -0
  144. package/docs/WebhooksApi.md +401 -0
  145. package/openapitools.json +7 -0
  146. package/package.json +10 -10
  147. package/src/apis/CardApi.ts +15 -15
  148. package/src/apis/CardSubscriptionApi.ts +15 -15
  149. package/src/apis/CardholderApi.ts +15 -15
  150. package/src/apis/EnrollmentMethodsApi.ts +15 -15
  151. package/src/apis/NetworkBulkFeedsApi.ts +15 -15
  152. package/src/apis/SubaccountsApi.ts +15 -15
  153. package/src/apis/TransactionMessagesApi.ts +15 -15
  154. package/src/apis/TransactionsApi.ts +15 -15
  155. package/src/apis/WebhooksApi.ts +15 -15
  156. package/src/models/Card.ts +2 -2
  157. package/src/models/CardSubscription.ts +4 -4
  158. package/src/models/Cardholder.ts +2 -2
  159. package/src/models/CreateWebhook201Response.ts +5 -3
  160. package/src/models/CreateWebhookRequest.ts +3 -1
  161. package/src/models/EnrollmentMethods413Response.ts +85 -0
  162. package/src/models/GetCardSubscription404Response.ts +101 -0
  163. package/src/models/ListCardSubscriptions400Response.ts +101 -0
  164. package/src/models/ListCardSubscriptions400ResponseErrorsInner.ts +75 -0
  165. package/src/models/ListCardSubscriptions401Response.ts +85 -0
  166. package/src/models/ListCardSubscriptions403Response.ts +85 -0
  167. package/src/models/ListCardSubscriptions500Response.ts +85 -0
  168. package/src/models/NetworkBulkFeeds.ts +22 -3
  169. package/src/models/Subaccount.ts +2 -2
  170. package/src/models/Transaction.ts +3 -3
  171. package/src/models/TransactionMessage.ts +3 -3
  172. package/src/models/UpdateWebhookRequest.ts +3 -1
  173. package/src/models/Webhook.ts +5 -3
  174. package/src/models/index.ts +7 -7
  175. package/src/runtime.ts +0 -1
  176. package/tsconfig.json +14 -7
  177. package/dist/astrada.co-ts-astrada-sdk-1.2.0.tgz +0 -0
  178. package/lib/apis/CardApi.js +0 -109
  179. package/lib/apis/CardSubscriptionApi.js +0 -133
  180. package/lib/apis/CardholderApi.js +0 -56
  181. package/lib/apis/EnrollmentMethodsApi.js +0 -57
  182. package/lib/apis/NetworkBulkFeedsApi.js +0 -129
  183. package/lib/apis/SubaccountsApi.js +0 -157
  184. package/lib/apis/TransactionMessagesApi.js +0 -56
  185. package/lib/apis/TransactionsApi.js +0 -106
  186. package/lib/apis/WebhooksApi.js +0 -194
  187. package/lib/runtime.js +0 -394
  188. package/openapi-generator/templates/README.mustache +0 -274
  189. package/openapi-generator/templates/npmignore.mustache +0 -2
  190. package/openapi-generator/templates/package.mustache +0 -44
  191. package/openapi-generator/templates/runtime.mustache +0 -515
  192. /package/{lib → dist}/apis/CardApi.d.ts +0 -0
  193. /package/{lib → dist}/apis/CardSubscriptionApi.d.ts +0 -0
  194. /package/{lib → dist}/apis/CardholderApi.d.ts +0 -0
  195. /package/{lib → dist}/apis/EnrollmentMethodsApi.d.ts +0 -0
  196. /package/{lib → dist}/apis/NetworkBulkFeedsApi.d.ts +0 -0
  197. /package/{lib → dist}/apis/SubaccountsApi.d.ts +0 -0
  198. /package/{lib → dist}/apis/TransactionMessagesApi.d.ts +0 -0
  199. /package/{lib → dist}/apis/TransactionsApi.d.ts +0 -0
  200. /package/{lib → dist}/apis/WebhooksApi.d.ts +0 -0
  201. /package/{lib → dist}/apis/index.d.ts +0 -0
  202. /package/{lib → dist}/apis/index.js +0 -0
  203. /package/{lib → dist}/index.d.ts +0 -0
  204. /package/{lib → dist}/index.js +0 -0
  205. /package/{lib → dist}/models/Card.d.ts +0 -0
  206. /package/{lib → dist}/models/CardLinks.d.ts +0 -0
  207. /package/{lib → dist}/models/CardSubscription.d.ts +0 -0
  208. /package/{lib → dist}/models/CardSubscriptionLinks.d.ts +0 -0
  209. /package/{lib → dist}/models/Cardholder.d.ts +0 -0
  210. /package/{lib → dist}/models/CardholderCorporate.d.ts +0 -0
  211. /package/{lib → dist}/models/CardholderLinks.d.ts +0 -0
  212. /package/{lib → dist}/models/Conflict.d.ts +0 -0
  213. /package/{lib → dist}/models/CreateNetworkBulkFeedRequest.d.ts +0 -0
  214. /package/{lib → dist}/models/CreateSubaccountRequest.d.ts +0 -0
  215. /package/{lib → dist}/models/EnrollmentMethods200Response.d.ts +0 -0
  216. /package/{lib → dist}/models/EnrollmentMethodsRequest.d.ts +0 -0
  217. /package/{lib → dist}/models/GetSubaccounts200Response.d.ts +0 -0
  218. /package/{lib → dist}/models/GetSubaccounts200ResponseEmbedded.d.ts +0 -0
  219. /package/{lib → dist}/models/GetSubaccounts200ResponseLinks.d.ts +0 -0
  220. /package/{lib → dist}/models/GetTransactions200Response.d.ts +0 -0
  221. /package/{lib → dist}/models/GetTransactions200ResponseEmbedded.d.ts +0 -0
  222. /package/{lib → dist}/models/InlineObject.d.ts +0 -0
  223. /package/{lib → dist}/models/InlineObject1.d.ts +0 -0
  224. /package/{lib → dist}/models/InlineObject2.d.ts +0 -0
  225. /package/{lib → dist}/models/InlineObject3.d.ts +0 -0
  226. /package/{lib → dist}/models/InlineObject4.d.ts +0 -0
  227. /package/{lib → dist}/models/InlineObject5.d.ts +0 -0
  228. /package/{lib → dist}/models/InlineObjectErrorsInner.d.ts +0 -0
  229. /package/{lib → dist}/models/Link.d.ts +0 -0
  230. /package/{lib → dist}/models/ListCardSubscriptions200Response.d.ts +0 -0
  231. /package/{lib → dist}/models/ListCardSubscriptions200ResponseEmbedded.d.ts +0 -0
  232. /package/{lib → dist}/models/ListCardSubscriptions200ResponseLinks.d.ts +0 -0
  233. /package/{lib → dist}/models/ListCards200Response.d.ts +0 -0
  234. /package/{lib → dist}/models/ListCards200ResponseEmbedded.d.ts +0 -0
  235. /package/{lib → dist}/models/ListNetworkBulkFeeds200Response.d.ts +0 -0
  236. /package/{lib → dist}/models/ListNetworkBulkFeeds200ResponseEmbedded.d.ts +0 -0
  237. /package/{lib → dist}/models/ListWebhooks200Response.d.ts +0 -0
  238. /package/{lib → dist}/models/ListWebhooks200ResponseEmbedded.d.ts +0 -0
  239. /package/{lib → dist}/models/ListWebhooks200ResponseLinks.d.ts +0 -0
  240. /package/{lib → dist}/models/Subaccount.d.ts +0 -0
  241. /package/{lib → dist}/models/SubaccountConfiguration.d.ts +0 -0
  242. /package/{lib → dist}/models/SubaccountConfigurationVISA.d.ts +0 -0
  243. /package/{lib → dist}/models/Transaction.d.ts +0 -0
  244. /package/{lib → dist}/models/TransactionAcceptor.d.ts +0 -0
  245. /package/{lib → dist}/models/TransactionLinks.d.ts +0 -0
  246. /package/{lib → dist}/models/TransactionMessage.d.ts +0 -0
  247. /package/{lib → dist}/models/TransactionMessageAcceptor.d.ts +0 -0
  248. /package/{lib → dist}/models/UnprocessableEntity.d.ts +0 -0
  249. /package/{lib → dist}/models/UpdateCardSubscriptionRequest.d.ts +0 -0
  250. /package/{lib → dist}/models/UpdateSubaccountRequest.d.ts +0 -0
  251. /package/{lib → dist}/runtime.d.ts +0 -0
@@ -0,0 +1,176 @@
1
+ # CardApi
2
+
3
+ All URIs are relative to *https://api.astrada.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**getCard**](CardApi.md#getcard) | **GET** /cards/{cardId} | Retrieve card |
8
+ | [**listCards**](CardApi.md#listcards) | **GET** /cards | List cards |
9
+
10
+
11
+
12
+ ## getCard
13
+
14
+ > Card getCard(cardId)
15
+
16
+ Retrieve card
17
+
18
+ Returns detailed information about a specific card by its identifier.
19
+
20
+ ### Example
21
+
22
+ ```ts
23
+ import {
24
+ Configuration,
25
+ CardApi,
26
+ } from '@astrada.co/ts-astrada-sdk';
27
+ import type { GetCardRequest } from '@astrada.co/ts-astrada-sdk';
28
+
29
+ async function example() {
30
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
31
+ const config = new Configuration({
32
+ // To configure OAuth2 access token for authorization: main-auth implicit
33
+ accessToken: "YOUR ACCESS TOKEN",
34
+ });
35
+ const api = new CardApi(config);
36
+
37
+ const body = {
38
+ // string
39
+ cardId: 6d18f5bb-b9d6-4237-97c2-44b1bdb71d6b,
40
+ } satisfies GetCardRequest;
41
+
42
+ try {
43
+ const data = await api.getCard(body);
44
+ console.log(data);
45
+ } catch (error) {
46
+ console.error(error);
47
+ }
48
+ }
49
+
50
+ // Run the test
51
+ example().catch(console.error);
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+
57
+ | Name | Type | Description | Notes |
58
+ |------------- | ------------- | ------------- | -------------|
59
+ | **cardId** | `string` | | [Defaults to `undefined`] |
60
+
61
+ ### Return type
62
+
63
+ [**Card**](Card.md)
64
+
65
+ ### Authorization
66
+
67
+ [main-auth implicit](../README.md#main-auth-implicit)
68
+
69
+ ### HTTP request headers
70
+
71
+ - **Content-Type**: Not defined
72
+ - **Accept**: `application/hal+json`, `application/problem+json`
73
+
74
+
75
+ ### HTTP response details
76
+ | Status code | Description | Response headers |
77
+ |-------------|-------------|------------------|
78
+ | **200** | Successful operation | - |
79
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
80
+ | **401** | Authentication credentials were either missing or incorrect | - |
81
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
82
+ | **404** | The requested resource was not found on the server | - |
83
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
84
+
85
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
86
+
87
+
88
+ ## listCards
89
+
90
+ > ListCards200Response listCards(country, expiryMonth, expiryYear, subaccountId, limit, offset)
91
+
92
+ List cards
93
+
94
+ Returns a list of all cards linked to the account. By default, `GET /cards` returns cards ordered by the latest updatedAt. You can combine the different filters as documented. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
95
+
96
+ ### Example
97
+
98
+ ```ts
99
+ import {
100
+ Configuration,
101
+ CardApi,
102
+ } from '@astrada.co/ts-astrada-sdk';
103
+ import type { ListCardsRequest } from '@astrada.co/ts-astrada-sdk';
104
+
105
+ async function example() {
106
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
107
+ const config = new Configuration({
108
+ // To configure OAuth2 access token for authorization: main-auth implicit
109
+ accessToken: "YOUR ACCESS TOKEN",
110
+ });
111
+ const api = new CardApi(config);
112
+
113
+ const body = {
114
+ // 'USA' | 'CAN' | The card country of issuance following ISO 3166 alpha-3 (optional)
115
+ country: USA,
116
+ // number | The card expiration month (optional)
117
+ expiryMonth: 6,
118
+ // number | The card expiration year (optional)
119
+ expiryYear: 2024,
120
+ // string (optional)
121
+ subaccountId: 2fd4d402-b759-479c-87a6-58d85e345356,
122
+ // number | Maximum number of items to return (optional)
123
+ limit: 100,
124
+ // number | The offset to use for pagination. Identifies the position of the first item returned in the collection (optional)
125
+ offset: 20,
126
+ } satisfies ListCardsRequest;
127
+
128
+ try {
129
+ const data = await api.listCards(body);
130
+ console.log(data);
131
+ } catch (error) {
132
+ console.error(error);
133
+ }
134
+ }
135
+
136
+ // Run the test
137
+ example().catch(console.error);
138
+ ```
139
+
140
+ ### Parameters
141
+
142
+
143
+ | Name | Type | Description | Notes |
144
+ |------------- | ------------- | ------------- | -------------|
145
+ | **country** | `USA`, `CAN` | The card country of issuance following ISO 3166 alpha-3 | [Optional] [Defaults to `undefined`] [Enum: USA, CAN] |
146
+ | **expiryMonth** | `number` | The card expiration month | [Optional] [Defaults to `undefined`] |
147
+ | **expiryYear** | `number` | The card expiration year | [Optional] [Defaults to `undefined`] |
148
+ | **subaccountId** | `string` | | [Optional] [Defaults to `undefined`] |
149
+ | **limit** | `number` | Maximum number of items to return | [Optional] [Defaults to `undefined`] |
150
+ | **offset** | `number` | The offset to use for pagination. Identifies the position of the first item returned in the collection | [Optional] [Defaults to `0`] |
151
+
152
+ ### Return type
153
+
154
+ [**ListCards200Response**](ListCards200Response.md)
155
+
156
+ ### Authorization
157
+
158
+ [main-auth implicit](../README.md#main-auth-implicit)
159
+
160
+ ### HTTP request headers
161
+
162
+ - **Content-Type**: Not defined
163
+ - **Accept**: `application/hal+json`, `application/problem+json`
164
+
165
+
166
+ ### HTTP response details
167
+ | Status code | Description | Response headers |
168
+ |-------------|-------------|------------------|
169
+ | **200** | Successful operation | - |
170
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
171
+ | **401** | Authentication credentials were either missing or incorrect | - |
172
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
173
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
174
+
175
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
176
+
@@ -0,0 +1,36 @@
1
+
2
+ # CardLinks
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `self` | [Link](Link.md)
10
+ `cardholder` | [Link](Link.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { CardLinks } from '@astrada.co/ts-astrada-sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "self": null,
20
+ "cardholder": null,
21
+ } satisfies CardLinks
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as CardLinks
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,56 @@
1
+
2
+ # CardSubscription
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `_links` | [CardSubscriptionLinks](CardSubscriptionLinks.md)
10
+ `id` | string
11
+ `accountId` | string
12
+ `subaccountId` | string
13
+ `cardId` | string
14
+ `customerReferenceId` | string
15
+ `state` | string
16
+ `effectiveDate` | Date
17
+ `expirationDate` | Date
18
+ `enrollmentType` | string
19
+ `createdAt` | Date
20
+ `updatedAt` | Date
21
+
22
+ ## Example
23
+
24
+ ```typescript
25
+ import type { CardSubscription } from '@astrada.co/ts-astrada-sdk'
26
+
27
+ // TODO: Update the object below with actual values
28
+ const example = {
29
+ "_links": null,
30
+ "id": null,
31
+ "accountId": null,
32
+ "subaccountId": null,
33
+ "cardId": null,
34
+ "customerReferenceId": null,
35
+ "state": null,
36
+ "effectiveDate": null,
37
+ "expirationDate": null,
38
+ "enrollmentType": null,
39
+ "createdAt": null,
40
+ "updatedAt": null,
41
+ } satisfies CardSubscription
42
+
43
+ console.log(example)
44
+
45
+ // Convert the instance to a JSON string
46
+ const exampleJSON: string = JSON.stringify(example)
47
+ console.log(exampleJSON)
48
+
49
+ // Parse the JSON string back to an object
50
+ const exampleParsed = JSON.parse(exampleJSON) as CardSubscription
51
+ console.log(exampleParsed)
52
+ ```
53
+
54
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
55
+
56
+
@@ -0,0 +1,252 @@
1
+ # CardSubscriptionApi
2
+
3
+ All URIs are relative to *https://api.astrada.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**getCardSubscription**](CardSubscriptionApi.md#getcardsubscription) | **GET** /card-subscriptions/{subscriptionId} | Retrieve card subscription |
8
+ | [**listCardSubscriptions**](CardSubscriptionApi.md#listcardsubscriptions) | **GET** /card-subscriptions | List card subscriptions |
9
+ | [**updateCardSubscription**](CardSubscriptionApi.md#updatecardsubscriptionoperation) | **PATCH** /card-subscriptions/{subscriptionId} | Update card subscription |
10
+
11
+
12
+
13
+ ## getCardSubscription
14
+
15
+ > CardSubscription getCardSubscription(subscriptionId)
16
+
17
+ Retrieve card subscription
18
+
19
+ Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
20
+
21
+ ### Example
22
+
23
+ ```ts
24
+ import {
25
+ Configuration,
26
+ CardSubscriptionApi,
27
+ } from '@astrada.co/ts-astrada-sdk';
28
+ import type { GetCardSubscriptionRequest } from '@astrada.co/ts-astrada-sdk';
29
+
30
+ async function example() {
31
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
32
+ const config = new Configuration({
33
+ // To configure OAuth2 access token for authorization: main-auth implicit
34
+ accessToken: "YOUR ACCESS TOKEN",
35
+ });
36
+ const api = new CardSubscriptionApi(config);
37
+
38
+ const body = {
39
+ // string
40
+ subscriptionId: eb2ded7e-11fa-46fc-bd3e-f5b1d56fd3b3,
41
+ } satisfies GetCardSubscriptionRequest;
42
+
43
+ try {
44
+ const data = await api.getCardSubscription(body);
45
+ console.log(data);
46
+ } catch (error) {
47
+ console.error(error);
48
+ }
49
+ }
50
+
51
+ // Run the test
52
+ example().catch(console.error);
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+
58
+ | Name | Type | Description | Notes |
59
+ |------------- | ------------- | ------------- | -------------|
60
+ | **subscriptionId** | `string` | | [Defaults to `undefined`] |
61
+
62
+ ### Return type
63
+
64
+ [**CardSubscription**](CardSubscription.md)
65
+
66
+ ### Authorization
67
+
68
+ [main-auth implicit](../README.md#main-auth-implicit)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: Not defined
73
+ - **Accept**: `application/hal+json`, `application/problem+json`
74
+
75
+
76
+ ### HTTP response details
77
+ | Status code | Description | Response headers |
78
+ |-------------|-------------|------------------|
79
+ | **200** | Successful operation | - |
80
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
81
+ | **401** | Authentication credentials were either missing or incorrect | - |
82
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
83
+ | **404** | The requested resource was not found on the server | - |
84
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
85
+
86
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
87
+
88
+
89
+ ## listCardSubscriptions
90
+
91
+ > ListCardSubscriptions200Response listCardSubscriptions(subaccountId, cardId, limit, offset)
92
+
93
+ List card subscriptions
94
+
95
+ Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
96
+
97
+ ### Example
98
+
99
+ ```ts
100
+ import {
101
+ Configuration,
102
+ CardSubscriptionApi,
103
+ } from '@astrada.co/ts-astrada-sdk';
104
+ import type { ListCardSubscriptionsRequest } from '@astrada.co/ts-astrada-sdk';
105
+
106
+ async function example() {
107
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
108
+ const config = new Configuration({
109
+ // To configure OAuth2 access token for authorization: main-auth implicit
110
+ accessToken: "YOUR ACCESS TOKEN",
111
+ });
112
+ const api = new CardSubscriptionApi(config);
113
+
114
+ const body = {
115
+ // string (optional)
116
+ subaccountId: 2fd4d402-b759-479c-87a6-58d85e345356,
117
+ // string (optional)
118
+ cardId: 8164683a-8d23-4421-9694-1a81fc9b9c37,
119
+ // number | Maximum number of items to return (optional)
120
+ limit: 100,
121
+ // number | The offset to use for pagination. Identifies the position of the first item returned in the collection (optional)
122
+ offset: 20,
123
+ } satisfies ListCardSubscriptionsRequest;
124
+
125
+ try {
126
+ const data = await api.listCardSubscriptions(body);
127
+ console.log(data);
128
+ } catch (error) {
129
+ console.error(error);
130
+ }
131
+ }
132
+
133
+ // Run the test
134
+ example().catch(console.error);
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+
140
+ | Name | Type | Description | Notes |
141
+ |------------- | ------------- | ------------- | -------------|
142
+ | **subaccountId** | `string` | | [Optional] [Defaults to `undefined`] |
143
+ | **cardId** | `string` | | [Optional] [Defaults to `undefined`] |
144
+ | **limit** | `number` | Maximum number of items to return | [Optional] [Defaults to `undefined`] |
145
+ | **offset** | `number` | The offset to use for pagination. Identifies the position of the first item returned in the collection | [Optional] [Defaults to `0`] |
146
+
147
+ ### Return type
148
+
149
+ [**ListCardSubscriptions200Response**](ListCardSubscriptions200Response.md)
150
+
151
+ ### Authorization
152
+
153
+ [main-auth implicit](../README.md#main-auth-implicit)
154
+
155
+ ### HTTP request headers
156
+
157
+ - **Content-Type**: Not defined
158
+ - **Accept**: `application/hal+json`, `application/problem+json`
159
+
160
+
161
+ ### HTTP response details
162
+ | Status code | Description | Response headers |
163
+ |-------------|-------------|------------------|
164
+ | **200** | Successful operation | - |
165
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
166
+ | **401** | Authentication credentials were either missing or incorrect | - |
167
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
168
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
169
+
170
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
171
+
172
+
173
+ ## updateCardSubscription
174
+
175
+ > CardSubscription updateCardSubscription(subscriptionId, updateCardSubscriptionRequest)
176
+
177
+ Update card subscription
178
+
179
+ Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
180
+
181
+ ### Example
182
+
183
+ ```ts
184
+ import {
185
+ Configuration,
186
+ CardSubscriptionApi,
187
+ } from '@astrada.co/ts-astrada-sdk';
188
+ import type { UpdateCardSubscriptionOperationRequest } from '@astrada.co/ts-astrada-sdk';
189
+
190
+ async function example() {
191
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
192
+ const config = new Configuration({
193
+ // To configure OAuth2 access token for authorization: main-auth implicit
194
+ accessToken: "YOUR ACCESS TOKEN",
195
+ });
196
+ const api = new CardSubscriptionApi(config);
197
+
198
+ const body = {
199
+ // string
200
+ subscriptionId: eb2ded7e-11fa-46fc-bd3e-f5b1d56fd3b3,
201
+ // UpdateCardSubscriptionRequest
202
+ updateCardSubscriptionRequest: ...,
203
+ } satisfies UpdateCardSubscriptionOperationRequest;
204
+
205
+ try {
206
+ const data = await api.updateCardSubscription(body);
207
+ console.log(data);
208
+ } catch (error) {
209
+ console.error(error);
210
+ }
211
+ }
212
+
213
+ // Run the test
214
+ example().catch(console.error);
215
+ ```
216
+
217
+ ### Parameters
218
+
219
+
220
+ | Name | Type | Description | Notes |
221
+ |------------- | ------------- | ------------- | -------------|
222
+ | **subscriptionId** | `string` | | [Defaults to `undefined`] |
223
+ | **updateCardSubscriptionRequest** | [UpdateCardSubscriptionRequest](UpdateCardSubscriptionRequest.md) | | |
224
+
225
+ ### Return type
226
+
227
+ [**CardSubscription**](CardSubscription.md)
228
+
229
+ ### Authorization
230
+
231
+ [main-auth implicit](../README.md#main-auth-implicit)
232
+
233
+ ### HTTP request headers
234
+
235
+ - **Content-Type**: `application/json`
236
+ - **Accept**: `application/hal+json`, `application/problem+json`
237
+
238
+
239
+ ### HTTP response details
240
+ | Status code | Description | Response headers |
241
+ |-------------|-------------|------------------|
242
+ | **200** | Successful operation | - |
243
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
244
+ | **401** | Authentication credentials were either missing or incorrect | - |
245
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
246
+ | **404** | The requested resource was not found on the server | - |
247
+ | **409** | Request conflict with the current state of the target resource | - |
248
+ | **422** | The request is well formatted but it fails some business logic validation | - |
249
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
250
+
251
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
252
+
@@ -0,0 +1,38 @@
1
+
2
+ # CardSubscriptionLinks
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `self` | [Link](Link.md)
10
+ `card` | [Link](Link.md)
11
+ `networkBulkFeed` | [Link](Link.md)
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { CardSubscriptionLinks } from '@astrada.co/ts-astrada-sdk'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "self": null,
21
+ "card": null,
22
+ "networkBulkFeed": null,
23
+ } satisfies CardSubscriptionLinks
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as CardSubscriptionLinks
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -0,0 +1,44 @@
1
+
2
+ # Cardholder
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `_links` | [CardholderLinks](CardholderLinks.md)
10
+ `corporate` | [CardholderCorporate](CardholderCorporate.md)
11
+ `firstName` | string
12
+ `lastName` | string
13
+ `createdAt` | Date
14
+ `updatedAt` | Date
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { Cardholder } from '@astrada.co/ts-astrada-sdk'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "_links": null,
24
+ "corporate": null,
25
+ "firstName": null,
26
+ "lastName": null,
27
+ "createdAt": null,
28
+ "updatedAt": null,
29
+ } satisfies Cardholder
30
+
31
+ console.log(example)
32
+
33
+ // Convert the instance to a JSON string
34
+ const exampleJSON: string = JSON.stringify(example)
35
+ console.log(exampleJSON)
36
+
37
+ // Parse the JSON string back to an object
38
+ const exampleParsed = JSON.parse(exampleJSON) as Cardholder
39
+ console.log(exampleParsed)
40
+ ```
41
+
42
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
43
+
44
+
@@ -0,0 +1,85 @@
1
+ # CardholderApi
2
+
3
+ All URIs are relative to *https://api.astrada.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**getCardholder**](CardholderApi.md#getcardholder) | **GET** /cards/{cardId}/cardholder | Retrieve cardholder information |
8
+
9
+
10
+
11
+ ## getCardholder
12
+
13
+ > Cardholder getCardholder(cardId)
14
+
15
+ Retrieve cardholder information
16
+
17
+ Returns cardholder information, related to a specific cardId, when it\'s available.
18
+
19
+ ### Example
20
+
21
+ ```ts
22
+ import {
23
+ Configuration,
24
+ CardholderApi,
25
+ } from '@astrada.co/ts-astrada-sdk';
26
+ import type { GetCardholderRequest } from '@astrada.co/ts-astrada-sdk';
27
+
28
+ async function example() {
29
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
30
+ const config = new Configuration({
31
+ // To configure OAuth2 access token for authorization: main-auth implicit
32
+ accessToken: "YOUR ACCESS TOKEN",
33
+ });
34
+ const api = new CardholderApi(config);
35
+
36
+ const body = {
37
+ // string
38
+ cardId: 6d18f5bb-b9d6-4237-97c2-44b1bdb71d6b,
39
+ } satisfies GetCardholderRequest;
40
+
41
+ try {
42
+ const data = await api.getCardholder(body);
43
+ console.log(data);
44
+ } catch (error) {
45
+ console.error(error);
46
+ }
47
+ }
48
+
49
+ // Run the test
50
+ example().catch(console.error);
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+
56
+ | Name | Type | Description | Notes |
57
+ |------------- | ------------- | ------------- | -------------|
58
+ | **cardId** | `string` | | [Defaults to `undefined`] |
59
+
60
+ ### Return type
61
+
62
+ [**Cardholder**](Cardholder.md)
63
+
64
+ ### Authorization
65
+
66
+ [main-auth implicit](../README.md#main-auth-implicit)
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: Not defined
71
+ - **Accept**: `application/hal+json`, `application/problem+json`
72
+
73
+
74
+ ### HTTP response details
75
+ | Status code | Description | Response headers |
76
+ |-------------|-------------|------------------|
77
+ | **200** | Successful operation | - |
78
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
79
+ | **401** | Authentication credentials were either missing or incorrect | - |
80
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
81
+ | **404** | The requested resource was not found on the server | - |
82
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
83
+
84
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
85
+