From 90e25ae115af8f8d8e7a9b2d45c139a7e32ea6cd Mon Sep 17 00:00:00 2001 From: Maxim Anisimov Date: Sat, 21 Mar 2020 13:31:36 +0200 Subject: [PATCH] TransferData struct --- .../Core Resources/PaymentIntents/PaymentIntent.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sources/StripeKit/Core Resources/PaymentIntents/PaymentIntent.swift b/Sources/StripeKit/Core Resources/PaymentIntents/PaymentIntent.swift index ae57e962..0ccf54e7 100644 --- a/Sources/StripeKit/Core Resources/PaymentIntents/PaymentIntent.swift +++ b/Sources/StripeKit/Core Resources/PaymentIntents/PaymentIntent.swift @@ -76,11 +76,16 @@ public struct StripePaymentIntent: StripeModel { /// Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. public var status: StripePaymentIntentStatus? /// The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents Connect usage guide for details. - public var transferData: [String: String]? + public var transferData: TransferData? /// A string that identifies the resulting payment as part of a group. See the PaymentIntents Connect usage guide for details. public var transferGroup: String? } +public struct TransferData: StripeModel { + var destination: String? + var amount: Int? +} + public enum StripePaymentIntentCancellationReason: String, StripeModel { case duplicate case fraudulent