Skip to content

Commit

Permalink
Merge pull request #820 from stripe/remi/codegen-40a20cd
Browse files Browse the repository at this point in the history
Add new enum values in `reason` for Issuing `Dispute` creation
  • Loading branch information
remi-stripe authored Feb 25, 2020
2 parents 0ec0a00 + 67a8459 commit c5b628a
Showing 1 changed file with 84 additions and 2 deletions.
86 changes: 84 additions & 2 deletions types/2019-12-03/Issuing/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ declare module 'stripe' {
metadata: Metadata;

/**
* Reason for this dispute. One of `fraudulent` or `other`.
* Reason for this dispute. One of `duplicate`, `product_not_received`, `fraudulent`, or `other`.
*/
reason: string;

Expand All @@ -60,6 +60,11 @@ declare module 'stripe' {

namespace Dispute {
interface Evidence {
/**
* Evidence to support a duplicate product dispute. This will only be present if your dispute's `reason` is `duplicate`.
*/
duplicate: Evidence.Duplicate | null;

/**
* Evidence to support a fraudulent dispute. This will only be present if your dispute's `reason` is `fraudulent`.
*/
Expand All @@ -69,9 +74,31 @@ declare module 'stripe' {
* Evidence to support an uncategorized dispute. This will only be present if your dispute's `reason` is `other`.
*/
other: Evidence.Other | null;

/**
* Evidence to support a dispute where the product wasn't received. This will only be present if your dispute's `reason` is `product_not_received`.
*/
product_not_received: Evidence.ProductNotReceived | null;
}

namespace Evidence {
interface Duplicate {
/**
* Brief freeform text explaining why you are disputing this transaction.
*/
dispute_explanation: string | null;

/**
* Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
*/
original_transaction: string | null;

/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional file evidence supporting your dispute.
*/
uncategorized_file: string | Stripe.File | null;
}

interface Fraudulent {
/**
* Brief freeform text explaining why you are disputing this transaction.
Expand All @@ -95,6 +122,18 @@ declare module 'stripe' {
*/
uncategorized_file: string | Stripe.File | null;
}

interface ProductNotReceived {
/**
* Brief freeform text explaining why you are disputing this transaction.
*/
dispute_explanation: string | null;

/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional file evidence supporting your dispute.
*/
uncategorized_file: string | Stripe.File | null;
}
}

type Status = 'lost' | 'under_review' | 'unsubmitted' | 'won';
Expand Down Expand Up @@ -134,6 +173,11 @@ declare module 'stripe' {

namespace DisputeCreateParams {
interface Evidence {
/**
* Evidence to support a duplicate dispute. Only provide this if your dispute's `reason` is `duplicate`.
*/
duplicate?: Evidence.Duplicate;

/**
* Evidence to support a fraudulent dispute. Only provide this if your dispute's `reason` is `fraudulent`.
*/
Expand All @@ -143,9 +187,31 @@ declare module 'stripe' {
* Evidence to support an uncategorized dispute. Only provide this if your dispute's `reason` is `other`.
*/
other?: Evidence.Other;

/**
* Evidence to support a dispute for a product that wasn't received. Only provide this if your dispute's `reason` is `product_not_received`.
*/
product_not_received?: Evidence.ProductNotReceived;
}

namespace Evidence {
interface Duplicate {
/**
* Brief freeform text explaining why you are disputing this transaction.
*/
dispute_explanation: string;

/**
* Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
*/
original_transaction?: string;

/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional file evidence supporting your dispute.
*/
uncategorized_file?: string;
}

interface Fraudulent {
/**
* Brief freeform text explaining why you are disputing this transaction.
Expand All @@ -169,9 +235,25 @@ declare module 'stripe' {
*/
uncategorized_file?: string;
}

interface ProductNotReceived {
/**
* Brief freeform text explaining why you are disputing this transaction.
*/
dispute_explanation: string;

/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional file evidence supporting your dispute.
*/
uncategorized_file?: string;
}
}

type Reason = 'fraudulent' | 'other';
type Reason =
| 'duplicate'
| 'fraudulent'
| 'other'
| 'product_not_received';
}

interface DisputeRetrieveParams {
Expand Down

0 comments on commit c5b628a

Please sign in to comment.