-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 add endpoint to get paymentHistory for a distribution
- Loading branch information
Showing
6 changed files
with
204 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/corporate-actions/models/distribution-payment.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* istanbul ignore file */ | ||
|
||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { BigNumber } from '@polymeshassociation/polymesh-sdk'; | ||
|
||
import { FromBigNumber } from '~/common/decorators'; | ||
|
||
export class DistributionPaymentModel { | ||
@ApiProperty({ | ||
description: 'Block number when the payment was made', | ||
type: 'string', | ||
example: '1234567', | ||
}) | ||
@FromBigNumber() | ||
blockNumber: BigNumber; | ||
|
||
@ApiProperty({ | ||
description: 'Hash of the block when the payment was made', | ||
type: 'string', | ||
example: '0xec1d41dd553ce03c3e462aab8bcfba0e1726e6bf310db6e06a933bf0430419c0', | ||
}) | ||
blockHash: string; | ||
|
||
@ApiProperty({ | ||
description: 'Date when the payment was made', | ||
example: new Date('10/14/1987').toISOString(), | ||
type: 'string', | ||
}) | ||
date: Date; | ||
|
||
@ApiProperty({ | ||
description: 'The DID of the payment recipient', | ||
type: 'string', | ||
example: '0x0600000000000000000000000000000000000000000000000000000000000000', | ||
}) | ||
did: string; | ||
|
||
@ApiProperty({ | ||
description: 'Amount of the payment', | ||
type: 'string', | ||
example: '1000000', | ||
}) | ||
@FromBigNumber() | ||
amount: BigNumber; | ||
|
||
@ApiProperty({ | ||
description: 'Percentage (0-100) of tax withholding for the target identity', | ||
type: 'string', | ||
example: '15', | ||
}) | ||
@FromBigNumber() | ||
withheldTax: BigNumber; | ||
|
||
constructor(model: DistributionPaymentModel) { | ||
Object.assign(this, model); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters