@d19n/youfibre-odin-sdk 2.0.111 → 2.0.113

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.
@@ -26,6 +26,7 @@ export declare class PaymentMethodRefundApi extends ApiProvider {
26
26
  private _workorder?;
27
27
  private _invoice?;
28
28
  private _activity?;
29
+ private _transaction?;
29
30
  constructor(authParams?: OauthParams, authToken?: string);
30
31
  get reward(): ApiRecordLinkManager;
31
32
  get file(): ApiRecordLinkManager;
@@ -36,6 +37,7 @@ export declare class PaymentMethodRefundApi extends ApiProvider {
36
37
  get workorder(): ApiRecordLinkManager;
37
38
  get invoice(): ApiRecordLinkManager;
38
39
  get activity(): ApiRecordLinkManager;
40
+ get transaction(): ApiRecordLinkManager;
39
41
  setRecord(sourceRecord: any): void;
40
42
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
41
43
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<PaymentMethodRefundProperties>>>;
@@ -87,6 +87,12 @@ class PaymentMethodRefundApi extends api_provider_1.ApiProvider {
87
87
  }
88
88
  return this._activity;
89
89
  }
90
+ get transaction() {
91
+ if (!this._transaction) {
92
+ this._transaction = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:PaymentMethodRefund', 'BillingModule:Transaction', 'PaymentMethodRefund__Transaction');
93
+ }
94
+ return this._transaction;
95
+ }
90
96
  // ============================================
91
97
  // STANDARD METHODS (Unchanged API)
92
98
  // ============================================
@@ -25,6 +25,7 @@ export declare class TransactionApi extends ApiProvider {
25
25
  private _transaction?;
26
26
  private _billingrequest?;
27
27
  private _payment?;
28
+ private _paymentmethodrefund?;
28
29
  constructor(authParams?: OauthParams, authToken?: string);
29
30
  get file(): ApiRecordLinkManager;
30
31
  get note(): ApiRecordLinkManager;
@@ -34,6 +35,7 @@ export declare class TransactionApi extends ApiProvider {
34
35
  get transaction(): ApiRecordLinkManager;
35
36
  get billingrequest(): ApiRecordLinkManager;
36
37
  get payment(): ApiRecordLinkManager;
38
+ get paymentmethodrefund(): ApiRecordLinkManager;
37
39
  setRecord(sourceRecord: any): void;
38
40
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
39
41
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<TransactionProperties>>>;
@@ -81,6 +81,12 @@ class TransactionApi extends api_provider_1.ApiProvider {
81
81
  }
82
82
  return this._payment;
83
83
  }
84
+ get paymentmethodrefund() {
85
+ if (!this._paymentmethodrefund) {
86
+ this._paymentmethodrefund = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:Transaction', 'BillingModule:PaymentMethodRefund', 'PaymentMethodRefund__Transaction');
87
+ }
88
+ return this._paymentmethodrefund;
89
+ }
84
90
  // ============================================
85
91
  // STANDARD METHODS (Unchanged API)
86
92
  // ============================================
@@ -30,6 +30,7 @@ export declare class PaymentMethodRefundDb extends DbProvider {
30
30
  private _workorder?;
31
31
  private _invoice?;
32
32
  private _activity?;
33
+ private _transaction?;
33
34
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
34
35
  get reward(): DbRecordLinkManager;
35
36
  get file(): DbRecordLinkManager;
@@ -40,6 +41,7 @@ export declare class PaymentMethodRefundDb extends DbProvider {
40
41
  get workorder(): DbRecordLinkManager;
41
42
  get invoice(): DbRecordLinkManager;
42
43
  get activity(): DbRecordLinkManager;
44
+ get transaction(): DbRecordLinkManager;
43
45
  setRecord(sourceRecord: any): void;
44
46
  /**
45
47
  * Search records with manual pagination control
@@ -92,6 +92,12 @@ class PaymentMethodRefundDb extends db_provider_1.DbProvider {
92
92
  }
93
93
  return this._activity;
94
94
  }
95
+ get transaction() {
96
+ if (!this._transaction) {
97
+ this._transaction = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:PaymentMethodRefund', 'BillingModule:Transaction', 'PaymentMethodRefund__Transaction');
98
+ }
99
+ return this._transaction;
100
+ }
95
101
  // ============================================
96
102
  // STANDARD METHODS
97
103
  // ============================================
@@ -29,6 +29,7 @@ export declare class TransactionDb extends DbProvider {
29
29
  private _transaction?;
30
30
  private _billingrequest?;
31
31
  private _payment?;
32
+ private _paymentmethodrefund?;
32
33
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
33
34
  get file(): DbRecordLinkManager;
34
35
  get note(): DbRecordLinkManager;
@@ -38,6 +39,7 @@ export declare class TransactionDb extends DbProvider {
38
39
  get transaction(): DbRecordLinkManager;
39
40
  get billingrequest(): DbRecordLinkManager;
40
41
  get payment(): DbRecordLinkManager;
42
+ get paymentmethodrefund(): DbRecordLinkManager;
41
43
  setRecord(sourceRecord: any): void;
42
44
  /**
43
45
  * Search records with manual pagination control
@@ -86,6 +86,12 @@ class TransactionDb extends db_provider_1.DbProvider {
86
86
  }
87
87
  return this._payment;
88
88
  }
89
+ get paymentmethodrefund() {
90
+ if (!this._paymentmethodrefund) {
91
+ this._paymentmethodrefund = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:Transaction', 'BillingModule:PaymentMethodRefund', 'PaymentMethodRefund__Transaction');
92
+ }
93
+ return this._paymentmethodrefund;
94
+ }
89
95
  // ============================================
90
96
  // STANDARD METHODS
91
97
  // ============================================
@@ -20,6 +20,7 @@ import { ContactProperties } from './Contact';
20
20
  import { WorkOrderProperties } from './WorkOrder';
21
21
  import { InvoiceProperties } from './Invoice';
22
22
  import { ActivityProperties } from './Activity';
23
+ import { TransactionProperties } from './Transaction';
23
24
  /**
24
25
  * Available types for PaymentMethodRefund records
25
26
  */
@@ -196,6 +197,8 @@ export declare class PaymentMethodRefund extends OdinRecord<PaymentMethodRefundP
196
197
  Invoice: OdinLink<LinkedOdinRecord<InvoiceProperties>>;
197
198
  /** Linked Activity records (PaymentMethodRefund__Activity) */
198
199
  Activity: OdinLink<LinkedOdinRecord<ActivityProperties>>;
200
+ /** Linked Transaction records (PaymentMethodRefund__Transaction) */
201
+ Transaction: OdinLink<LinkedOdinRecord<TransactionProperties>>;
199
202
  }
200
203
  /**
201
204
  * RabbitMQ routing keys for PaymentMethodRefund events
@@ -237,3 +240,7 @@ export declare const ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_INVOICE_DELETED = "B
237
240
  export declare const ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_CREATED = "BillingModule.PaymentMethodRefund.Activity.SubDbRecordAssociationCreated";
238
241
  /** Event: PaymentMethodRefund__Activity link deleted */
239
242
  export declare const ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_DELETED = "BillingModule.PaymentMethodRefund.Activity.SubDbRecordAssociationDeleted";
243
+ /** Event: PaymentMethodRefund__Transaction link created */
244
+ export declare const ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_TRANSACTION_CREATED = "BillingModule.PaymentMethodRefund.Transaction.SubDbRecordAssociationCreated";
245
+ /** Event: PaymentMethodRefund__Transaction link deleted */
246
+ export declare const ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_TRANSACTION_DELETED = "BillingModule.PaymentMethodRefund.Transaction.SubDbRecordAssociationDeleted";
@@ -12,7 +12,7 @@
12
12
  * Generated from Odin schema definition
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_INVOICE_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_INVOICE_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ORDER_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ORDER_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_NOTE_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_NOTE_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_FILE_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_FILE_CREATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DEFAULT_DELETED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DEFAULT_UPDATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DEFAULT_CREATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DELETED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_UPDATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_CREATED = exports.PaymentMethodRefund = exports.PaymentMethodRefundPropertyKeys = exports.PaymentMethodRefundOutcome = exports.DefaultPaymentMethodRefundStageKeys = exports.DefaultPaymentMethodRefundStageNames = exports.PaymentMethodRefundEntityTypes = void 0;
15
+ exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_TRANSACTION_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_TRANSACTION_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_INVOICE_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_INVOICE_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ORDER_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ORDER_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_NOTE_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_NOTE_CREATED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_FILE_DELETED = exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_FILE_CREATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DEFAULT_DELETED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DEFAULT_UPDATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DEFAULT_CREATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_DELETED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_UPDATED = exports.ROUTING_KEY_PAYMENT_METHOD_REFUND_CREATED = exports.PaymentMethodRefund = exports.PaymentMethodRefundPropertyKeys = exports.PaymentMethodRefundOutcome = exports.DefaultPaymentMethodRefundStageKeys = exports.DefaultPaymentMethodRefundStageNames = exports.PaymentMethodRefundEntityTypes = void 0;
16
16
  const core_1 = require("@d19n/odin-types/dist/core");
17
17
  /**
18
18
  * Available types for PaymentMethodRefund records
@@ -153,3 +153,7 @@ exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_INVOICE_DELETED = 'BillingModule.
153
153
  exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_CREATED = 'BillingModule.PaymentMethodRefund.Activity.SubDbRecordAssociationCreated';
154
154
  /** Event: PaymentMethodRefund__Activity link deleted */
155
155
  exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_ACTIVITY_DELETED = 'BillingModule.PaymentMethodRefund.Activity.SubDbRecordAssociationDeleted';
156
+ /** Event: PaymentMethodRefund__Transaction link created */
157
+ exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_TRANSACTION_CREATED = 'BillingModule.PaymentMethodRefund.Transaction.SubDbRecordAssociationCreated';
158
+ /** Event: PaymentMethodRefund__Transaction link deleted */
159
+ exports.ROUTING_KEY_LINK_PAYMENT_METHOD_REFUND_TRANSACTION_DELETED = 'BillingModule.PaymentMethodRefund.Transaction.SubDbRecordAssociationDeleted';
@@ -18,6 +18,7 @@ import { InvoiceProperties } from './Invoice';
18
18
  import { CreditNoteProperties } from './CreditNote';
19
19
  import { BillingRequestProperties } from './BillingRequest';
20
20
  import { PaymentProperties } from './Payment';
21
+ import { PaymentMethodRefundProperties } from './PaymentMethodRefund';
21
22
  /**
22
23
  * Available types for Transaction records
23
24
  */
@@ -348,6 +349,8 @@ export declare class Transaction extends OdinRecord<TransactionProperties> {
348
349
  BillingRequest: OdinLink<LinkedOdinRecord<BillingRequestProperties>>;
349
350
  /** Linked Payment records (Payment_Transaction) */
350
351
  Payment: OdinLink<LinkedOdinRecord<PaymentProperties>>;
352
+ /** Linked PaymentMethodRefund records (PaymentMethodRefund__Transaction) */
353
+ PaymentMethodRefund: OdinLink<LinkedOdinRecord<PaymentMethodRefundProperties>>;
351
354
  }
352
355
  /**
353
356
  * RabbitMQ routing keys for Transaction events
@@ -34,6 +34,7 @@ import { ContactRecord } from './ContactRecord';
34
34
  import { WorkOrderRecord } from './WorkOrderRecord';
35
35
  import { InvoiceRecord } from './InvoiceRecord';
36
36
  import { ActivityRecord } from './ActivityRecord';
37
+ import { TransactionRecord } from './TransactionRecord';
37
38
  /**
38
39
  * Builder for action execution with dryRun support
39
40
  *
@@ -168,6 +169,7 @@ export declare class PaymentMethodRefundRecord<TProps = PaymentMethodRefundPrope
168
169
  private _workOrders?;
169
170
  private _invoices?;
170
171
  private _activities?;
172
+ private _transactions?;
171
173
  /**
172
174
  * Create a record wrapper.
173
175
  * @param record - The underlying record, or null for create operations
@@ -355,6 +357,24 @@ export declare class PaymentMethodRefundRecord<TProps = PaymentMethodRefundPrope
355
357
  * ```
356
358
  */
357
359
  get activities(): RecordLinkManager<ActivityRecord, typeof PaymentMethodRefundRecord['activitiesLabels'][number]>;
360
+ /** Valid labels for Transaction associations */
361
+ static readonly transactionsLabels: readonly ["PaymentMethodRefund__Transaction"];
362
+ /**
363
+ * Access linked Transaction records
364
+ * @remarks Available labels: PaymentMethodRefund__Transaction
365
+ * @throws Error if called on a new (unsaved) record
366
+ *
367
+ * @example
368
+ * ```typescript
369
+ * // Get all linked Transaction records
370
+ * const items = await record.transactions.list();
371
+ * const first = await record.transactions.first();
372
+ *
373
+ * // Filter by label
374
+ * const specific = await record.transactions.first({ label: 'PaymentMethodRefund__Transaction' });
375
+ * ```
376
+ */
377
+ get transactions(): RecordLinkManager<TransactionRecord, typeof PaymentMethodRefundRecord['transactionsLabels'][number]>;
358
378
  /**
359
379
  * Queue a link to be created with the next action.
360
380
  * Works for both create and update actions.
@@ -40,6 +40,7 @@ const ContactRecord_1 = require("./ContactRecord");
40
40
  const WorkOrderRecord_1 = require("./WorkOrderRecord");
41
41
  const InvoiceRecord_1 = require("./InvoiceRecord");
42
42
  const ActivityRecord_1 = require("./ActivityRecord");
43
+ const TransactionRecord_1 = require("./TransactionRecord");
43
44
  /**
44
45
  * Builder for action execution with dryRun support
45
46
  *
@@ -527,6 +528,36 @@ class PaymentMethodRefundRecord {
527
528
  }
528
529
  return this._activities;
529
530
  }
531
+ /**
532
+ * Access linked Transaction records
533
+ * @remarks Available labels: PaymentMethodRefund__Transaction
534
+ * @throws Error if called on a new (unsaved) record
535
+ *
536
+ * @example
537
+ * ```typescript
538
+ * // Get all linked Transaction records
539
+ * const items = await record.transactions.list();
540
+ * const first = await record.transactions.first();
541
+ *
542
+ * // Filter by label
543
+ * const specific = await record.transactions.first({ label: 'PaymentMethodRefund__Transaction' });
544
+ * ```
545
+ */
546
+ get transactions() {
547
+ var _a;
548
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
549
+ throw new Error('Cannot access links on a new (unsaved) record');
550
+ if (!this._transactions) {
551
+ this._transactions = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
552
+ sourceEntity: 'BillingModule:PaymentMethodRefund',
553
+ targetEntity: 'BillingModule:Transaction',
554
+ targetModuleName: 'BillingModule',
555
+ targetEntityName: 'Transaction',
556
+ labels: ['PaymentMethodRefund__Transaction'],
557
+ }, TransactionRecord_1.TransactionRecord);
558
+ }
559
+ return this._transactions;
560
+ }
530
561
  // ============================================
531
562
  // LINK MANAGEMENT
532
563
  // ============================================
@@ -707,6 +738,8 @@ PaymentMethodRefundRecord.workOrdersLabels = ['PaymentMethodRefund__WorkOrder'];
707
738
  PaymentMethodRefundRecord.invoicesLabels = ['PaymentMethodRefund__Invoice'];
708
739
  /** Valid labels for Activity associations */
709
740
  PaymentMethodRefundRecord.activitiesLabels = ['PaymentMethodRefund__Activity'];
741
+ /** Valid labels for Transaction associations */
742
+ PaymentMethodRefundRecord.transactionsLabels = ['PaymentMethodRefund__Transaction'];
710
743
  /** Type guard to check if an object is a PaymentMethodRefundRecord */
711
744
  function isPaymentMethodRefundRecord(obj) {
712
745
  return obj instanceof PaymentMethodRefundRecord;
@@ -39,6 +39,7 @@ import { InvoiceRecord } from './InvoiceRecord';
39
39
  import { CreditNoteRecord } from './CreditNoteRecord';
40
40
  import { BillingRequestRecord } from './BillingRequestRecord';
41
41
  import { PaymentRecord } from './PaymentRecord';
42
+ import { PaymentMethodRefundRecord } from './PaymentMethodRefundRecord';
42
43
  /** Valid entity types for Transaction */
43
44
  export declare type TransactionType = 'DEFAULT';
44
45
  /**
@@ -112,6 +113,7 @@ export declare class TransactionRecord<TProps = TransactionProperties> {
112
113
  private _transactions?;
113
114
  private _billingRequests?;
114
115
  private _payments?;
116
+ private _paymentMethodRefunds?;
115
117
  /**
116
118
  * Create a record wrapper.
117
119
  * @param record - The underlying record, or null for create operations
@@ -297,6 +299,24 @@ export declare class TransactionRecord<TProps = TransactionProperties> {
297
299
  * ```
298
300
  */
299
301
  get payments(): RecordLinkManager<PaymentRecord, typeof TransactionRecord['paymentsLabels'][number]>;
302
+ /** Valid labels for PaymentMethodRefund associations */
303
+ static readonly paymentMethodRefundsLabels: readonly ["PaymentMethodRefund__Transaction"];
304
+ /**
305
+ * Access linked PaymentMethodRefund records
306
+ * @remarks Available labels: PaymentMethodRefund__Transaction
307
+ * @throws Error if called on a new (unsaved) record
308
+ *
309
+ * @example
310
+ * ```typescript
311
+ * // Get all linked PaymentMethodRefund records
312
+ * const items = await record.paymentMethodRefunds.list();
313
+ * const first = await record.paymentMethodRefunds.first();
314
+ *
315
+ * // Filter by label
316
+ * const specific = await record.paymentMethodRefunds.first({ label: 'PaymentMethodRefund__Transaction' });
317
+ * ```
318
+ */
319
+ get paymentMethodRefunds(): RecordLinkManager<PaymentMethodRefundRecord, typeof TransactionRecord['paymentMethodRefundsLabels'][number]>;
300
320
  /**
301
321
  * Queue a link to be created with the next action.
302
322
  * Works for both create and update actions.
@@ -39,6 +39,7 @@ const InvoiceRecord_1 = require("./InvoiceRecord");
39
39
  const CreditNoteRecord_1 = require("./CreditNoteRecord");
40
40
  const BillingRequestRecord_1 = require("./BillingRequestRecord");
41
41
  const PaymentRecord_1 = require("./PaymentRecord");
42
+ const PaymentMethodRefundRecord_1 = require("./PaymentMethodRefundRecord");
42
43
  /**
43
44
  * Builder for action execution with dryRun support
44
45
  *
@@ -408,6 +409,36 @@ class TransactionRecord {
408
409
  }
409
410
  return this._payments;
410
411
  }
412
+ /**
413
+ * Access linked PaymentMethodRefund records
414
+ * @remarks Available labels: PaymentMethodRefund__Transaction
415
+ * @throws Error if called on a new (unsaved) record
416
+ *
417
+ * @example
418
+ * ```typescript
419
+ * // Get all linked PaymentMethodRefund records
420
+ * const items = await record.paymentMethodRefunds.list();
421
+ * const first = await record.paymentMethodRefunds.first();
422
+ *
423
+ * // Filter by label
424
+ * const specific = await record.paymentMethodRefunds.first({ label: 'PaymentMethodRefund__Transaction' });
425
+ * ```
426
+ */
427
+ get paymentMethodRefunds() {
428
+ var _a;
429
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
430
+ throw new Error('Cannot access links on a new (unsaved) record');
431
+ if (!this._paymentMethodRefunds) {
432
+ this._paymentMethodRefunds = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
433
+ sourceEntity: 'BillingModule:Transaction',
434
+ targetEntity: 'BillingModule:PaymentMethodRefund',
435
+ targetModuleName: 'BillingModule',
436
+ targetEntityName: 'PaymentMethodRefund',
437
+ labels: ['PaymentMethodRefund__Transaction'],
438
+ }, PaymentMethodRefundRecord_1.PaymentMethodRefundRecord);
439
+ }
440
+ return this._paymentMethodRefunds;
441
+ }
411
442
  // ============================================
412
443
  // LINK MANAGEMENT
413
444
  // ============================================
@@ -760,6 +791,8 @@ TransactionRecord.transactionsLabels = ['Transaction__Transaction'];
760
791
  TransactionRecord.billingRequestsLabels = ['BillingRequest__Transaction'];
761
792
  /** Valid labels for Payment associations */
762
793
  TransactionRecord.paymentsLabels = ['Payment_Transaction'];
794
+ /** Valid labels for PaymentMethodRefund associations */
795
+ TransactionRecord.paymentMethodRefundsLabels = ['PaymentMethodRefund__Transaction'];
763
796
  /** Type guard to check if an object is a TransactionRecord */
764
797
  function isTransactionRecord(obj) {
765
798
  return obj instanceof TransactionRecord;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.111",
3
+ "version": "2.0.113",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",