github.com/stripe/stripe-go/v76@v76.25.0/issuing_dispute.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 package stripe 8 9 import "encoding/json" 10 11 // Whether the product was a merchandise or service. 12 type IssuingDisputeEvidenceCanceledProductType string 13 14 // List of values that IssuingDisputeEvidenceCanceledProductType can take 15 const ( 16 IssuingDisputeEvidenceCanceledProductTypeMerchandise IssuingDisputeEvidenceCanceledProductType = "merchandise" 17 IssuingDisputeEvidenceCanceledProductTypeService IssuingDisputeEvidenceCanceledProductType = "service" 18 ) 19 20 // Result of cardholder's attempt to return the product. 21 type IssuingDisputeEvidenceCanceledReturnStatus string 22 23 // List of values that IssuingDisputeEvidenceCanceledReturnStatus can take 24 const ( 25 IssuingDisputeEvidenceCanceledReturnStatusMerchantRejected IssuingDisputeEvidenceCanceledReturnStatus = "merchant_rejected" 26 IssuingDisputeEvidenceCanceledReturnStatusSuccessful IssuingDisputeEvidenceCanceledReturnStatus = "successful" 27 ) 28 29 // Result of cardholder's attempt to return the product. 30 type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus string 31 32 // List of values that IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus can take 33 const ( 34 IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusMerchantRejected IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "merchant_rejected" 35 IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusSuccessful IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "successful" 36 ) 37 38 // Whether the product was a merchandise or service. 39 type IssuingDisputeEvidenceNotReceivedProductType string 40 41 // List of values that IssuingDisputeEvidenceNotReceivedProductType can take 42 const ( 43 IssuingDisputeEvidenceNotReceivedProductTypeMerchandise IssuingDisputeEvidenceNotReceivedProductType = "merchandise" 44 IssuingDisputeEvidenceNotReceivedProductTypeService IssuingDisputeEvidenceNotReceivedProductType = "service" 45 ) 46 47 // Whether the product was a merchandise or service. 48 type IssuingDisputeEvidenceOtherProductType string 49 50 // List of values that IssuingDisputeEvidenceOtherProductType can take 51 const ( 52 IssuingDisputeEvidenceOtherProductTypeMerchandise IssuingDisputeEvidenceOtherProductType = "merchandise" 53 IssuingDisputeEvidenceOtherProductTypeService IssuingDisputeEvidenceOtherProductType = "service" 54 ) 55 56 // The reason for filing the dispute. Its value will match the field containing the evidence. 57 type IssuingDisputeEvidenceReason string 58 59 // List of values that IssuingDisputeEvidenceReason can take 60 const ( 61 IssuingDisputeEvidenceReasonCanceled IssuingDisputeEvidenceReason = "canceled" 62 IssuingDisputeEvidenceReasonDuplicate IssuingDisputeEvidenceReason = "duplicate" 63 IssuingDisputeEvidenceReasonFraudulent IssuingDisputeEvidenceReason = "fraudulent" 64 IssuingDisputeEvidenceReasonMerchandiseNotAsDescribed IssuingDisputeEvidenceReason = "merchandise_not_as_described" 65 IssuingDisputeEvidenceReasonNotReceived IssuingDisputeEvidenceReason = "not_received" 66 IssuingDisputeEvidenceReasonOther IssuingDisputeEvidenceReason = "other" 67 IssuingDisputeEvidenceReasonServiceNotAsDescribed IssuingDisputeEvidenceReason = "service_not_as_described" 68 ) 69 70 // Current status of the dispute. 71 type IssuingDisputeStatus string 72 73 // List of values that IssuingDisputeStatus can take 74 const ( 75 IssuingDisputeStatusExpired IssuingDisputeStatus = "expired" 76 IssuingDisputeStatusLost IssuingDisputeStatus = "lost" 77 IssuingDisputeStatusSubmitted IssuingDisputeStatus = "submitted" 78 IssuingDisputeStatusUnsubmitted IssuingDisputeStatus = "unsubmitted" 79 IssuingDisputeStatusWon IssuingDisputeStatus = "won" 80 ) 81 82 // Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. 83 type IssuingDisputeListParams struct { 84 ListParams `form:"*"` 85 // Only return Issuing disputes that were created during the given date interval. 86 Created *int64 `form:"created"` 87 // Only return Issuing disputes that were created during the given date interval. 88 CreatedRange *RangeQueryParams `form:"created"` 89 // Specifies which fields in the response should be expanded. 90 Expand []*string `form:"expand"` 91 // Select Issuing disputes with the given status. 92 Status *string `form:"status"` 93 // Select the Issuing dispute for the given transaction. 94 Transaction *string `form:"transaction"` 95 } 96 97 // AddExpand appends a new field to expand. 98 func (p *IssuingDisputeListParams) AddExpand(f string) { 99 p.Expand = append(p.Expand, &f) 100 } 101 102 // Evidence provided when `reason` is 'canceled'. 103 type IssuingDisputeEvidenceCanceledParams struct { 104 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 105 AdditionalDocumentation *string `form:"additional_documentation"` 106 // Date when order was canceled. 107 CanceledAt *int64 `form:"canceled_at"` 108 // Whether the cardholder was provided with a cancellation policy. 109 CancellationPolicyProvided *bool `form:"cancellation_policy_provided"` 110 // Reason for canceling the order. 111 CancellationReason *string `form:"cancellation_reason"` 112 // Date when the cardholder expected to receive the product. 113 ExpectedAt *int64 `form:"expected_at"` 114 // Explanation of why the cardholder is disputing this transaction. 115 Explanation *string `form:"explanation"` 116 // Description of the merchandise or service that was purchased. 117 ProductDescription *string `form:"product_description"` 118 // Whether the product was a merchandise or service. 119 ProductType *string `form:"product_type"` 120 // Date when the product was returned or attempted to be returned. 121 ReturnedAt *int64 `form:"returned_at"` 122 // Result of cardholder's attempt to return the product. 123 ReturnStatus *string `form:"return_status"` 124 } 125 126 // Evidence provided when `reason` is 'duplicate'. 127 type IssuingDisputeEvidenceDuplicateParams struct { 128 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 129 AdditionalDocumentation *string `form:"additional_documentation"` 130 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. 131 CardStatement *string `form:"card_statement"` 132 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. 133 CashReceipt *string `form:"cash_receipt"` 134 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. 135 CheckImage *string `form:"check_image"` 136 // Explanation of why the cardholder is disputing this transaction. 137 Explanation *string `form:"explanation"` 138 // 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. 139 OriginalTransaction *string `form:"original_transaction"` 140 } 141 142 // Evidence provided when `reason` is 'fraudulent'. 143 type IssuingDisputeEvidenceFraudulentParams struct { 144 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 145 AdditionalDocumentation *string `form:"additional_documentation"` 146 // Explanation of why the cardholder is disputing this transaction. 147 Explanation *string `form:"explanation"` 148 } 149 150 // Evidence provided when `reason` is 'merchandise_not_as_described'. 151 type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams struct { 152 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 153 AdditionalDocumentation *string `form:"additional_documentation"` 154 // Explanation of why the cardholder is disputing this transaction. 155 Explanation *string `form:"explanation"` 156 // Date when the product was received. 157 ReceivedAt *int64 `form:"received_at"` 158 // Description of the cardholder's attempt to return the product. 159 ReturnDescription *string `form:"return_description"` 160 // Date when the product was returned or attempted to be returned. 161 ReturnedAt *int64 `form:"returned_at"` 162 // Result of cardholder's attempt to return the product. 163 ReturnStatus *string `form:"return_status"` 164 } 165 166 // Evidence provided when `reason` is 'not_received'. 167 type IssuingDisputeEvidenceNotReceivedParams struct { 168 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 169 AdditionalDocumentation *string `form:"additional_documentation"` 170 // Date when the cardholder expected to receive the product. 171 ExpectedAt *int64 `form:"expected_at"` 172 // Explanation of why the cardholder is disputing this transaction. 173 Explanation *string `form:"explanation"` 174 // Description of the merchandise or service that was purchased. 175 ProductDescription *string `form:"product_description"` 176 // Whether the product was a merchandise or service. 177 ProductType *string `form:"product_type"` 178 } 179 180 // Evidence provided when `reason` is 'other'. 181 type IssuingDisputeEvidenceOtherParams struct { 182 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 183 AdditionalDocumentation *string `form:"additional_documentation"` 184 // Explanation of why the cardholder is disputing this transaction. 185 Explanation *string `form:"explanation"` 186 // Description of the merchandise or service that was purchased. 187 ProductDescription *string `form:"product_description"` 188 // Whether the product was a merchandise or service. 189 ProductType *string `form:"product_type"` 190 } 191 192 // Evidence provided when `reason` is 'service_not_as_described'. 193 type IssuingDisputeEvidenceServiceNotAsDescribedParams struct { 194 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 195 AdditionalDocumentation *string `form:"additional_documentation"` 196 // Date when order was canceled. 197 CanceledAt *int64 `form:"canceled_at"` 198 // Reason for canceling the order. 199 CancellationReason *string `form:"cancellation_reason"` 200 // Explanation of why the cardholder is disputing this transaction. 201 Explanation *string `form:"explanation"` 202 // Date when the product was received. 203 ReceivedAt *int64 `form:"received_at"` 204 } 205 206 // Evidence provided for the dispute. 207 type IssuingDisputeEvidenceParams struct { 208 // Evidence provided when `reason` is 'canceled'. 209 Canceled *IssuingDisputeEvidenceCanceledParams `form:"canceled"` 210 // Evidence provided when `reason` is 'duplicate'. 211 Duplicate *IssuingDisputeEvidenceDuplicateParams `form:"duplicate"` 212 // Evidence provided when `reason` is 'fraudulent'. 213 Fraudulent *IssuingDisputeEvidenceFraudulentParams `form:"fraudulent"` 214 // Evidence provided when `reason` is 'merchandise_not_as_described'. 215 MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"` 216 // Evidence provided when `reason` is 'not_received'. 217 NotReceived *IssuingDisputeEvidenceNotReceivedParams `form:"not_received"` 218 // Evidence provided when `reason` is 'other'. 219 Other *IssuingDisputeEvidenceOtherParams `form:"other"` 220 // The reason for filing the dispute. The evidence should be submitted in the field of the same name. 221 Reason *string `form:"reason"` 222 // Evidence provided when `reason` is 'service_not_as_described'. 223 ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribedParams `form:"service_not_as_described"` 224 } 225 226 // Params for disputes related to Treasury FinancialAccounts 227 type IssuingDisputeTreasuryParams struct { 228 // The ID of the ReceivedDebit to initiate an Issuings dispute for. 229 ReceivedDebit *string `form:"received_debit"` 230 } 231 232 // Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. 233 type IssuingDisputeParams struct { 234 Params `form:"*"` 235 // The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. 236 Amount *int64 `form:"amount"` 237 // Evidence provided for the dispute. 238 Evidence *IssuingDisputeEvidenceParams `form:"evidence"` 239 // Specifies which fields in the response should be expanded. 240 Expand []*string `form:"expand"` 241 // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. 242 Metadata map[string]string `form:"metadata"` 243 // The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. 244 Transaction *string `form:"transaction"` 245 // Params for disputes related to Treasury FinancialAccounts 246 Treasury *IssuingDisputeTreasuryParams `form:"treasury"` 247 } 248 249 // AddExpand appends a new field to expand. 250 func (p *IssuingDisputeParams) AddExpand(f string) { 251 p.Expand = append(p.Expand, &f) 252 } 253 254 // AddMetadata adds a new key-value pair to the Metadata. 255 func (p *IssuingDisputeParams) AddMetadata(key string, value string) { 256 if p.Metadata == nil { 257 p.Metadata = make(map[string]string) 258 } 259 260 p.Metadata[key] = value 261 } 262 263 // Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). 264 type IssuingDisputeSubmitParams struct { 265 Params `form:"*"` 266 // Specifies which fields in the response should be expanded. 267 Expand []*string `form:"expand"` 268 // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. 269 Metadata map[string]string `form:"metadata"` 270 } 271 272 // AddExpand appends a new field to expand. 273 func (p *IssuingDisputeSubmitParams) AddExpand(f string) { 274 p.Expand = append(p.Expand, &f) 275 } 276 277 // AddMetadata adds a new key-value pair to the Metadata. 278 func (p *IssuingDisputeSubmitParams) AddMetadata(key string, value string) { 279 if p.Metadata == nil { 280 p.Metadata = make(map[string]string) 281 } 282 283 p.Metadata[key] = value 284 } 285 286 type IssuingDisputeEvidenceCanceled struct { 287 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 288 AdditionalDocumentation *File `json:"additional_documentation"` 289 // Date when order was canceled. 290 CanceledAt int64 `json:"canceled_at"` 291 // Whether the cardholder was provided with a cancellation policy. 292 CancellationPolicyProvided bool `json:"cancellation_policy_provided"` 293 // Reason for canceling the order. 294 CancellationReason string `json:"cancellation_reason"` 295 // Date when the cardholder expected to receive the product. 296 ExpectedAt int64 `json:"expected_at"` 297 // Explanation of why the cardholder is disputing this transaction. 298 Explanation string `json:"explanation"` 299 // Description of the merchandise or service that was purchased. 300 ProductDescription string `json:"product_description"` 301 // Whether the product was a merchandise or service. 302 ProductType IssuingDisputeEvidenceCanceledProductType `json:"product_type"` 303 // Date when the product was returned or attempted to be returned. 304 ReturnedAt int64 `json:"returned_at"` 305 // Result of cardholder's attempt to return the product. 306 ReturnStatus IssuingDisputeEvidenceCanceledReturnStatus `json:"return_status"` 307 } 308 type IssuingDisputeEvidenceDuplicate struct { 309 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 310 AdditionalDocumentation *File `json:"additional_documentation"` 311 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. 312 CardStatement *File `json:"card_statement"` 313 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. 314 CashReceipt *File `json:"cash_receipt"` 315 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. 316 CheckImage *File `json:"check_image"` 317 // Explanation of why the cardholder is disputing this transaction. 318 Explanation string `json:"explanation"` 319 // 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. 320 OriginalTransaction string `json:"original_transaction"` 321 } 322 type IssuingDisputeEvidenceFraudulent struct { 323 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 324 AdditionalDocumentation *File `json:"additional_documentation"` 325 // Explanation of why the cardholder is disputing this transaction. 326 Explanation string `json:"explanation"` 327 } 328 type IssuingDisputeEvidenceMerchandiseNotAsDescribed struct { 329 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 330 AdditionalDocumentation *File `json:"additional_documentation"` 331 // Explanation of why the cardholder is disputing this transaction. 332 Explanation string `json:"explanation"` 333 // Date when the product was received. 334 ReceivedAt int64 `json:"received_at"` 335 // Description of the cardholder's attempt to return the product. 336 ReturnDescription string `json:"return_description"` 337 // Date when the product was returned or attempted to be returned. 338 ReturnedAt int64 `json:"returned_at"` 339 // Result of cardholder's attempt to return the product. 340 ReturnStatus IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus `json:"return_status"` 341 } 342 type IssuingDisputeEvidenceNotReceived struct { 343 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 344 AdditionalDocumentation *File `json:"additional_documentation"` 345 // Date when the cardholder expected to receive the product. 346 ExpectedAt int64 `json:"expected_at"` 347 // Explanation of why the cardholder is disputing this transaction. 348 Explanation string `json:"explanation"` 349 // Description of the merchandise or service that was purchased. 350 ProductDescription string `json:"product_description"` 351 // Whether the product was a merchandise or service. 352 ProductType IssuingDisputeEvidenceNotReceivedProductType `json:"product_type"` 353 } 354 type IssuingDisputeEvidenceOther struct { 355 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 356 AdditionalDocumentation *File `json:"additional_documentation"` 357 // Explanation of why the cardholder is disputing this transaction. 358 Explanation string `json:"explanation"` 359 // Description of the merchandise or service that was purchased. 360 ProductDescription string `json:"product_description"` 361 // Whether the product was a merchandise or service. 362 ProductType IssuingDisputeEvidenceOtherProductType `json:"product_type"` 363 } 364 type IssuingDisputeEvidenceServiceNotAsDescribed struct { 365 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. 366 AdditionalDocumentation *File `json:"additional_documentation"` 367 // Date when order was canceled. 368 CanceledAt int64 `json:"canceled_at"` 369 // Reason for canceling the order. 370 CancellationReason string `json:"cancellation_reason"` 371 // Explanation of why the cardholder is disputing this transaction. 372 Explanation string `json:"explanation"` 373 // Date when the product was received. 374 ReceivedAt int64 `json:"received_at"` 375 } 376 type IssuingDisputeEvidence struct { 377 Canceled *IssuingDisputeEvidenceCanceled `json:"canceled"` 378 Duplicate *IssuingDisputeEvidenceDuplicate `json:"duplicate"` 379 Fraudulent *IssuingDisputeEvidenceFraudulent `json:"fraudulent"` 380 MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribed `json:"merchandise_not_as_described"` 381 NotReceived *IssuingDisputeEvidenceNotReceived `json:"not_received"` 382 Other *IssuingDisputeEvidenceOther `json:"other"` 383 // The reason for filing the dispute. Its value will match the field containing the evidence. 384 Reason IssuingDisputeEvidenceReason `json:"reason"` 385 ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribed `json:"service_not_as_described"` 386 } 387 388 // [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts 389 type IssuingDisputeTreasury struct { 390 // The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute 391 DebitReversal string `json:"debit_reversal"` 392 // The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. 393 ReceivedDebit string `json:"received_debit"` 394 } 395 396 // As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. 397 // 398 // Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) 399 type IssuingDispute struct { 400 APIResource 401 // Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). 402 Amount int64 `json:"amount"` 403 // List of balance transactions associated with the dispute. 404 BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` 405 // Time at which the object was created. Measured in seconds since the Unix epoch. 406 Created int64 `json:"created"` 407 // The currency the `transaction` was made in. 408 Currency Currency `json:"currency"` 409 Evidence *IssuingDisputeEvidence `json:"evidence"` 410 // Unique identifier for the object. 411 ID string `json:"id"` 412 // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. 413 Livemode bool `json:"livemode"` 414 // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 415 Metadata map[string]string `json:"metadata"` 416 // String representing the object's type. Objects of the same type share the same value. 417 Object string `json:"object"` 418 // Current status of the dispute. 419 Status IssuingDisputeStatus `json:"status"` 420 // The transaction being disputed. 421 Transaction *IssuingTransaction `json:"transaction"` 422 // [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts 423 Treasury *IssuingDisputeTreasury `json:"treasury"` 424 } 425 426 // IssuingDisputeList is a list of Disputes as retrieved from a list endpoint. 427 type IssuingDisputeList struct { 428 APIResource 429 ListMeta 430 Data []*IssuingDispute `json:"data"` 431 } 432 433 // UnmarshalJSON handles deserialization of an IssuingDispute. 434 // This custom unmarshaling is needed because the resulting 435 // property may be an id or the full struct if it was expanded. 436 func (i *IssuingDispute) UnmarshalJSON(data []byte) error { 437 if id, ok := ParseID(data); ok { 438 i.ID = id 439 return nil 440 } 441 442 type issuingDispute IssuingDispute 443 var v issuingDispute 444 if err := json.Unmarshal(data, &v); err != nil { 445 return err 446 } 447 448 *i = IssuingDispute(v) 449 return nil 450 }