-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from janpaepke/feature/captures
Add captures API endpoints
- Loading branch information
Showing
10 changed files
with
269 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import { type CaptureEmbed } from '../../../data/payments/captures/data'; | ||
import { type PaginationParameters, type ThrottlingParameter } from '../../../types/parameters'; | ||
import { type CaptureData, type CaptureInclude } from '../../../data/payments/captures/data'; | ||
import { type IdempotencyParameter, type PaginationParameters, type ThrottlingParameter } from '../../../types/parameters'; | ||
import type PickOptional from '../../../types/PickOptional'; | ||
|
||
interface ContextParameters { | ||
paymentId: string; | ||
testmode?: boolean; | ||
} | ||
|
||
export type CreateParameters = ContextParameters & PickOptional<CaptureData, 'amount' | 'description' | 'metadata'> & IdempotencyParameter; | ||
|
||
export type GetParameters = ContextParameters & { | ||
embed?: CaptureEmbed[]; | ||
include?: CaptureInclude; | ||
testmode?: boolean; | ||
}; | ||
|
||
export type PageParameters = ContextParameters & | ||
PaginationParameters & { | ||
embed?: CaptureEmbed[]; | ||
include?: CaptureInclude; | ||
testmode?: boolean; | ||
}; | ||
|
||
export type IterateParameters = Omit<PageParameters, 'limit'> & ThrottlingParameter; |
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
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
Oops, something went wrong.