Skip to content

Commit

Permalink
Merge branch 'main' into feat-void-invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
StashBank authored Oct 4, 2023
2 parents 502b108 + 4f9b01d commit 10ffd0e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions libs/stripe/src/lib/dto/update-subscription.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ export class SubscriptionUpdateItemDto {
@IsOptional()
@IsPositive()
quantity?: number;

@ApiPropertyOptional()
@IsOptional()
deleted?: boolean;

@ApiPropertyOptional()
@IsOptional()
@IsString()
metadata?: Stripe.MetadataParam;
}

export class SubscriptionUpdateBillingThresholdsDto {
Expand Down
8 changes: 5 additions & 3 deletions libs/stripe/src/lib/stripe.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,10 @@ export class StripeService {
id: i.id,
price: i.priceId,
plan: i.planId,
quantity: i.quantity
})),
quantity: i.quantity,
deleted: i.deleted,
metadata: i.metadata,
} as Stripe.SubscriptionUpdateParams.Item)),
add_invoice_items: dto.addInvoiceItems?.map(i => ({
price: i.priceId,
quantity:i.quantity,
Expand Down Expand Up @@ -1387,7 +1389,7 @@ export class StripeService {
//#endregion

//#region Test Clocks
async createTestClock(frozenTime: number = Date.now(), name = ''): Promise<BaseDataResponse<TestClockDto>> {
async createTestClock(frozenTime: number, name = ''): Promise<BaseDataResponse<TestClockDto>> {
try {
const testClock = await this.stripe.testHelpers.testClocks.create({
name,
Expand Down

0 comments on commit 10ffd0e

Please sign in to comment.