@artu-ai/compliance-sdk 0.4.1 → 0.4.2
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.
- package/package.json +3 -4
- package/src/errors/api.ts +0 -305
- package/src/errors/base.ts +0 -127
- package/src/errors/index.ts +0 -63
- package/src/errors/upload.ts +0 -204
- package/src/errors/validation.ts +0 -163
- package/src/exports/base.ts +0 -139
- package/src/exports/index.ts +0 -187
- package/src/exports/mexico/actividad-vulnerable/avi.ts +0 -207
- package/src/exports/mexico/actividad-vulnerable/jys.ts +0 -214
- package/src/exports/mexico/actividad-vulnerable/tsc.ts +0 -202
- package/src/exports/mexico/index.ts +0 -215
- package/src/models/Address.ts +0 -235
- package/src/models/BankAccount.ts +0 -235
- package/src/models/Client.ts +0 -363
- package/src/models/ContactMethod.ts +0 -197
- package/src/models/Document.ts +0 -355
- package/src/models/LinkedClient.ts +0 -84
- package/src/models/Report.ts +0 -193
- package/src/models/ReportItem.ts +0 -211
- package/src/models/Transaction.ts +0 -219
- package/src/models/base.ts +0 -56
- package/src/models/index.ts +0 -148
- package/src/models/mex/MexAddress.ts +0 -184
- package/src/models/mex/MexBankAccount.ts +0 -121
- package/src/models/mex/MexClient.ts +0 -177
- package/src/models/mex/MexDocument.ts +0 -890
- package/src/models/mex/MexReport.ts +0 -99
- package/src/models/mex/MexReportItem.ts +0 -79
- package/src/models/mex/MexTransaction.ts +0 -105
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableClient.ts +0 -66
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReport.ts +0 -73
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.ts +0 -74
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.ts +0 -50
- package/src/models/mex/actividad-vulnerable/avi/MexAVIClient.ts +0 -80
- package/src/models/mex/actividad-vulnerable/avi/MexAVIReport.ts +0 -114
- package/src/models/mex/actividad-vulnerable/avi/MexAVIReportItem.ts +0 -105
- package/src/models/mex/actividad-vulnerable/avi/MexAVITransaction.ts +0 -157
- package/src/models/mex/actividad-vulnerable/index.ts +0 -78
- package/src/models/mex/actividad-vulnerable/jys/MexJYSClient.ts +0 -73
- package/src/models/mex/actividad-vulnerable/jys/MexJYSReport.ts +0 -114
- package/src/models/mex/actividad-vulnerable/jys/MexJYSReportItem.ts +0 -105
- package/src/models/mex/actividad-vulnerable/jys/MexJYSTransaction.ts +0 -178
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCClient.ts +0 -73
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCReport.ts +0 -114
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.ts +0 -105
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.ts +0 -104
- package/src/models/mex/index.ts +0 -57
- package/src/models/types.ts +0 -196
- package/src/namespaces/index.ts +0 -29
- package/src/namespaces/mexico/actividad-vulnerable/avi/index.ts +0 -62
- package/src/namespaces/mexico/actividad-vulnerable/index.ts +0 -79
- package/src/namespaces/mexico/actividad-vulnerable/jys/index.ts +0 -72
- package/src/namespaces/mexico/actividad-vulnerable/tsc/index.ts +0 -60
- package/src/namespaces/mexico/index.ts +0 -325
- package/src/resources/addresses.ts +0 -391
- package/src/resources/bank-accounts.ts +0 -417
- package/src/resources/base.ts +0 -327
- package/src/resources/clients.ts +0 -808
- package/src/resources/contact-methods.ts +0 -412
- package/src/resources/documents.ts +0 -688
- package/src/resources/index.ts +0 -40
- package/src/resources/mex/actividad-vulnerable/avi/clients.ts +0 -559
- package/src/resources/mex/actividad-vulnerable/avi/index.ts +0 -7
- package/src/resources/mex/actividad-vulnerable/avi/reports.ts +0 -609
- package/src/resources/mex/actividad-vulnerable/avi/transactions.ts +0 -404
- package/src/resources/mex/actividad-vulnerable/index.ts +0 -12
- package/src/resources/mex/actividad-vulnerable/jys/clients.ts +0 -445
- package/src/resources/mex/actividad-vulnerable/jys/index.ts +0 -7
- package/src/resources/mex/actividad-vulnerable/jys/reports.ts +0 -591
- package/src/resources/mex/actividad-vulnerable/jys/transactions.ts +0 -395
- package/src/resources/mex/actividad-vulnerable/tsc/clients.ts +0 -445
- package/src/resources/mex/actividad-vulnerable/tsc/index.ts +0 -7
- package/src/resources/mex/actividad-vulnerable/tsc/reports.ts +0 -591
- package/src/resources/mex/actividad-vulnerable/tsc/transactions.ts +0 -404
- package/src/resources/mex/addresses.ts +0 -493
- package/src/resources/mex/bank-accounts.ts +0 -283
- package/src/resources/mex/clients.ts +0 -758
- package/src/resources/mex/ebr.ts +0 -621
- package/src/resources/mex/index.ts +0 -23
- package/src/resources/mex/reports.ts +0 -643
- package/src/resources/mex/transactions.ts +0 -422
- package/src/resources/reports.ts +0 -515
- package/src/resources/transactions.ts +0 -358
- package/src/sdk/ComplianceSDK.ts +0 -812
- package/src/sdk/base.ts +0 -43
- package/src/sdk/index.ts +0 -98
- package/src/sdk/mex/ComplianceSDK.ts +0 -147
- package/src/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.ts +0 -55
- package/src/sdk/mex/actividad-vulnerable/avi/index.ts +0 -16
- package/src/sdk/mex/actividad-vulnerable/avi/types.ts +0 -86
- package/src/sdk/mex/actividad-vulnerable/index.ts +0 -58
- package/src/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.ts +0 -54
- package/src/sdk/mex/actividad-vulnerable/jys/index.ts +0 -16
- package/src/sdk/mex/actividad-vulnerable/jys/types.ts +0 -86
- package/src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts +0 -54
- package/src/sdk/mex/actividad-vulnerable/tsc/index.ts +0 -16
- package/src/sdk/mex/actividad-vulnerable/tsc/types.ts +0 -86
- package/src/sdk/mex/index.ts +0 -66
- package/src/sdk/mex/types.ts +0 -88
- package/src/sdk/resource-registry.ts +0 -204
- package/src/sdk/sdk-registry.ts +0 -99
- package/src/sdk/types.ts +0 -304
- package/src/utils/environment.ts +0 -187
- package/src/utils/filters.ts +0 -412
- package/src/utils/index.ts +0 -134
- package/src/utils/pagination.ts +0 -143
- package/src/utils/session.ts +0 -303
- package/src/utils/trpc-client.ts +0 -242
- package/src/utils/upload.ts +0 -388
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transactions Resource
|
|
3
|
-
*
|
|
4
|
-
* CRUD operations, filtering, pagination, and client relationships.
|
|
5
|
-
*
|
|
6
|
-
* This is the base (unscoped) resource. For jurisdiction-scoped SDKs, use:
|
|
7
|
-
* - MexTransactionsResource - Mexico-scoped with flattened MX fields
|
|
8
|
-
* - AVITransactionsResource - Mexico AVI-scoped with flattened AVI fields
|
|
9
|
-
* - JYSTransactionsResource - Mexico JYS-scoped with flattened JYS fields
|
|
10
|
-
* - TSCTransactionsResource - Mexico TSC-scoped with flattened TSC fields
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { z } from "zod";
|
|
14
|
-
import type {
|
|
15
|
-
CreateTransactionInput,
|
|
16
|
-
UpdateTransactionInput,
|
|
17
|
-
TransactionFilter,
|
|
18
|
-
TransactionSort,
|
|
19
|
-
ListOptions,
|
|
20
|
-
PaginatedResponse,
|
|
21
|
-
AtomicBatchResult,
|
|
22
|
-
PartialBatchResult,
|
|
23
|
-
RelatedClient,
|
|
24
|
-
} from "@artu-ai/shared";
|
|
25
|
-
import {
|
|
26
|
-
createTransactionInputSchema,
|
|
27
|
-
updateTransactionInputSchema,
|
|
28
|
-
ClientRole,
|
|
29
|
-
} from "@artu-ai/shared";
|
|
30
|
-
import type { BatchOptions } from "./clients";
|
|
31
|
-
import { BaseResource } from "./base";
|
|
32
|
-
import { Transaction, type TransactionData } from "../models";
|
|
33
|
-
|
|
34
|
-
// ===========================
|
|
35
|
-
// TransactionsResource
|
|
36
|
-
// ===========================
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Base resource manager for transaction operations.
|
|
40
|
-
*
|
|
41
|
-
* Provides:
|
|
42
|
-
* - CRUD operations (create, retrieve, update, delete)
|
|
43
|
-
* - Filtering and pagination
|
|
44
|
-
* - Client relationship management (linkClient, unlinkClient)
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
* // Create a transaction with full nested format
|
|
49
|
-
* const txn = await sdk.transactions.create({
|
|
50
|
-
* amount: 50000,
|
|
51
|
-
* currency: "MXN",
|
|
52
|
-
* primaryJurisdiction: "MX",
|
|
53
|
-
* relatedClientIds: ["client_sender"],
|
|
54
|
-
* timestamp: new Date(),
|
|
55
|
-
* jurisdictions: {
|
|
56
|
-
* MX: { actividadVulnerable: { AVI: { ... } } },
|
|
57
|
-
* },
|
|
58
|
-
* });
|
|
59
|
-
*
|
|
60
|
-
* // List with filtering
|
|
61
|
-
* const { data, pagination } = await sdk.transactions.list({
|
|
62
|
-
* filter: { status: "completed" },
|
|
63
|
-
* limit: 20,
|
|
64
|
-
* });
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
export class TransactionsResource<
|
|
68
|
-
TSort = TransactionSort,
|
|
69
|
-
> extends BaseResource<
|
|
70
|
-
Transaction,
|
|
71
|
-
CreateTransactionInput,
|
|
72
|
-
UpdateTransactionInput,
|
|
73
|
-
TransactionFilter,
|
|
74
|
-
TSort
|
|
75
|
-
> {
|
|
76
|
-
// ─────────────────────────────────────────────────────────────────
|
|
77
|
-
// CRUD Operations
|
|
78
|
-
// ─────────────────────────────────────────────────────────────────
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Creates a new transaction.
|
|
82
|
-
*
|
|
83
|
-
* @param data - Transaction creation data in nested format
|
|
84
|
-
* @returns The created transaction model
|
|
85
|
-
*/
|
|
86
|
-
async create(data: CreateTransactionInput): Promise<Transaction> {
|
|
87
|
-
const validated = this.validate(createTransactionInputSchema, data);
|
|
88
|
-
|
|
89
|
-
const response = await this.execute(() =>
|
|
90
|
-
this.trpc.transactions.create.mutate(validated)
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
return this.instantiate(response);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Retrieves a transaction by ID.
|
|
98
|
-
*/
|
|
99
|
-
async retrieve(id: string): Promise<Transaction> {
|
|
100
|
-
const response = await this.execute(() =>
|
|
101
|
-
this.trpc.transactions.retrieve.query({ id })
|
|
102
|
-
);
|
|
103
|
-
return this.instantiate(response);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Retrieves a transaction by metadata key/value.
|
|
108
|
-
*/
|
|
109
|
-
async retrieveByMetadata(key: string, value: string): Promise<Transaction> {
|
|
110
|
-
const response = await this.execute(() =>
|
|
111
|
-
this.trpc.transactions.retrieveByMetadata.query({ key, value })
|
|
112
|
-
);
|
|
113
|
-
return this.instantiate(response);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Retrieves a transaction by externalId.
|
|
118
|
-
*/
|
|
119
|
-
async retrieveByExternalId(externalId: string): Promise<Transaction> {
|
|
120
|
-
const response = await this.execute(() =>
|
|
121
|
-
this.trpc.transactions.retrieveByExternalId.query({ externalId })
|
|
122
|
-
);
|
|
123
|
-
return this.instantiate(response);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Updates a transaction.
|
|
128
|
-
*/
|
|
129
|
-
async update(id: string, data: UpdateTransactionInput): Promise<Transaction> {
|
|
130
|
-
const validated = this.validate(updateTransactionInputSchema, data);
|
|
131
|
-
|
|
132
|
-
const response = await this.execute(() =>
|
|
133
|
-
this.trpc.transactions.update.mutate({ id, data: validated })
|
|
134
|
-
);
|
|
135
|
-
return this.instantiate(response);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Deletes a transaction (soft delete).
|
|
140
|
-
*/
|
|
141
|
-
async delete(id: string): Promise<void> {
|
|
142
|
-
await this.execute(() => this.trpc.transactions.delete.mutate({ id }));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// ─────────────────────────────────────────────────────────────────
|
|
146
|
-
// List & Pagination
|
|
147
|
-
// ─────────────────────────────────────────────────────────────────
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Lists transactions with optional filtering and pagination.
|
|
151
|
-
*/
|
|
152
|
-
async list(
|
|
153
|
-
options?: ListOptions<TransactionFilter, TSort>
|
|
154
|
-
): Promise<PaginatedResponse<Transaction>> {
|
|
155
|
-
const response = await this.execute(() =>
|
|
156
|
-
this.trpc.transactions.list.query(options as ListOptions<TransactionFilter, TransactionSort>)
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
return {
|
|
160
|
-
data: response.data.map((t) => this.instantiate(t)),
|
|
161
|
-
pagination: response.pagination,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Lists all transactions for a specific client.
|
|
167
|
-
*
|
|
168
|
-
* @param clientId - The client ID
|
|
169
|
-
* @param options - Optional pagination options
|
|
170
|
-
* @returns Paginated list of Transactions
|
|
171
|
-
*/
|
|
172
|
-
async listByClient(
|
|
173
|
-
clientId: string,
|
|
174
|
-
options?: { cursor?: string; limit?: number }
|
|
175
|
-
): Promise<PaginatedResponse<Transaction>> {
|
|
176
|
-
const response = await this.execute(() =>
|
|
177
|
-
this.trpc.transactions.listByClient.query({ clientId, ...options })
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
return {
|
|
181
|
-
data: response.data.map((t) => this.instantiate(t)),
|
|
182
|
-
pagination: response.pagination,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Returns an async iterator over all transactions matching the filter.
|
|
188
|
-
*/
|
|
189
|
-
iterate(
|
|
190
|
-
filter?: TransactionFilter
|
|
191
|
-
): AsyncGenerator<Transaction, void, undefined> {
|
|
192
|
-
return this.createIterator({ filter });
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// ─────────────────────────────────────────────────────────────────
|
|
196
|
-
// Client Relationship Management
|
|
197
|
-
// ─────────────────────────────────────────────────────────────────
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Links a client to a transaction with an optional role.
|
|
201
|
-
*/
|
|
202
|
-
async linkClient(
|
|
203
|
-
transactionId: string,
|
|
204
|
-
clientId: string,
|
|
205
|
-
role?: ClientRole
|
|
206
|
-
): Promise<Transaction> {
|
|
207
|
-
const response = await this.execute(() =>
|
|
208
|
-
this.trpc.transactions.linkClient.mutate({
|
|
209
|
-
transactionId,
|
|
210
|
-
clientId,
|
|
211
|
-
role,
|
|
212
|
-
})
|
|
213
|
-
);
|
|
214
|
-
return this.instantiate(response);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Unlinks a client from a transaction.
|
|
219
|
-
*/
|
|
220
|
-
async unlinkClient(
|
|
221
|
-
transactionId: string,
|
|
222
|
-
clientId: string
|
|
223
|
-
): Promise<Transaction> {
|
|
224
|
-
const response = await this.execute(() =>
|
|
225
|
-
this.trpc.transactions.unlinkClient.mutate({
|
|
226
|
-
transactionId,
|
|
227
|
-
clientId,
|
|
228
|
-
})
|
|
229
|
-
);
|
|
230
|
-
return this.instantiate(response);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Replaces all clients related to a transaction.
|
|
235
|
-
*/
|
|
236
|
-
async setClients(
|
|
237
|
-
transactionId: string,
|
|
238
|
-
clients: RelatedClient[]
|
|
239
|
-
): Promise<Transaction> {
|
|
240
|
-
const response = await this.execute(() =>
|
|
241
|
-
this.trpc.transactions.setClients.mutate({
|
|
242
|
-
transactionId,
|
|
243
|
-
clients,
|
|
244
|
-
})
|
|
245
|
-
);
|
|
246
|
-
return this.instantiate(response);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// ─────────────────────────────────────────────────────────────────
|
|
250
|
-
// Batch Operations
|
|
251
|
-
// ─────────────────────────────────────────────────────────────────
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Creates multiple transactions in a single request.
|
|
255
|
-
*
|
|
256
|
-
* @param transactions - Array of transaction creation data
|
|
257
|
-
* @param options - Batch options (atomic: true by default)
|
|
258
|
-
* @returns Atomic result with data array, or partial result with succeeded/failed
|
|
259
|
-
*/
|
|
260
|
-
async createMany(
|
|
261
|
-
transactions: CreateTransactionInput[],
|
|
262
|
-
options?: { atomic?: true }
|
|
263
|
-
): Promise<AtomicBatchResult<Transaction>>;
|
|
264
|
-
async createMany(
|
|
265
|
-
transactions: CreateTransactionInput[],
|
|
266
|
-
options: { atomic: false }
|
|
267
|
-
): Promise<PartialBatchResult<Transaction>>;
|
|
268
|
-
async createMany(
|
|
269
|
-
transactions: CreateTransactionInput[],
|
|
270
|
-
options: BatchOptions = {}
|
|
271
|
-
): Promise<AtomicBatchResult<Transaction> | PartialBatchResult<Transaction>> {
|
|
272
|
-
const atomic = options.atomic ?? true;
|
|
273
|
-
const validated = this.validate(
|
|
274
|
-
z.array(createTransactionInputSchema),
|
|
275
|
-
transactions
|
|
276
|
-
);
|
|
277
|
-
|
|
278
|
-
const response = await this.execute(() =>
|
|
279
|
-
this.trpc.transactions.createMany.mutate({ items: validated, atomic })
|
|
280
|
-
);
|
|
281
|
-
|
|
282
|
-
if (response.atomic) {
|
|
283
|
-
return {
|
|
284
|
-
atomic: true,
|
|
285
|
-
data: response.data.map((t) => this.instantiate(t)),
|
|
286
|
-
};
|
|
287
|
-
} else {
|
|
288
|
-
return {
|
|
289
|
-
atomic: false,
|
|
290
|
-
succeeded: response.succeeded.map((item) => ({
|
|
291
|
-
index: item.index,
|
|
292
|
-
data: this.instantiate(item.data),
|
|
293
|
-
})),
|
|
294
|
-
failed: response.failed,
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Updates multiple transactions in a single request.
|
|
301
|
-
*
|
|
302
|
-
* @param updates - Array of { id, data } updates
|
|
303
|
-
* @param options - Batch options (atomic: true by default)
|
|
304
|
-
* @returns Atomic result with data array, or partial result with succeeded/failed
|
|
305
|
-
*/
|
|
306
|
-
async updateMany(
|
|
307
|
-
updates: { id: string; data: UpdateTransactionInput }[],
|
|
308
|
-
options?: { atomic?: true }
|
|
309
|
-
): Promise<AtomicBatchResult<Transaction>>;
|
|
310
|
-
async updateMany(
|
|
311
|
-
updates: { id: string; data: UpdateTransactionInput }[],
|
|
312
|
-
options: { atomic: false }
|
|
313
|
-
): Promise<PartialBatchResult<Transaction>>;
|
|
314
|
-
async updateMany(
|
|
315
|
-
updates: { id: string; data: UpdateTransactionInput }[],
|
|
316
|
-
options: BatchOptions = {}
|
|
317
|
-
): Promise<AtomicBatchResult<Transaction> | PartialBatchResult<Transaction>> {
|
|
318
|
-
const atomic = options.atomic ?? true;
|
|
319
|
-
const updateItemSchema = z.object({
|
|
320
|
-
id: z.uuid(),
|
|
321
|
-
data: updateTransactionInputSchema,
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
const validated = this.validate(z.array(updateItemSchema), updates);
|
|
325
|
-
|
|
326
|
-
const response = await this.execute(() =>
|
|
327
|
-
this.trpc.transactions.updateMany.mutate({ items: validated, atomic })
|
|
328
|
-
);
|
|
329
|
-
|
|
330
|
-
if (response.atomic) {
|
|
331
|
-
return {
|
|
332
|
-
atomic: true,
|
|
333
|
-
data: response.data.map((t) => this.instantiate(t)),
|
|
334
|
-
};
|
|
335
|
-
} else {
|
|
336
|
-
return {
|
|
337
|
-
atomic: false,
|
|
338
|
-
succeeded: response.succeeded.map((item) => ({
|
|
339
|
-
index: item.index,
|
|
340
|
-
data: this.instantiate(item.data),
|
|
341
|
-
})),
|
|
342
|
-
failed: response.failed,
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
// ─────────────────────────────────────────────────────────────────
|
|
348
|
-
// Instantiation (protected for subclasses to override)
|
|
349
|
-
// ─────────────────────────────────────────────────────────────────
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Instantiates a Transaction model from API response data.
|
|
353
|
-
* Subclasses override this to return their specific model type.
|
|
354
|
-
*/
|
|
355
|
-
protected instantiate(data: TransactionData): Transaction {
|
|
356
|
-
return new Transaction(data);
|
|
357
|
-
}
|
|
358
|
-
}
|