Skip to content

Commit

Permalink
Merge branch 'main' into cball-add-expand
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewangeta authored Jul 17, 2024
2 parents 2a07ad2 + 4af10ac commit 15bf8b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public struct SubscriptionScheduleCurrentPhase: Codable {

public struct SubscriptionScheduleDefaultSettings: Codable {
/// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner’s Stripe account during this phase of the schedule.
public var applicationFeePercent: String?
public var applicationFeePercent: Float?
/// Default settings for automatic tax computation.
public var automaticTax: SubscriptionScheduleDefaultSettingsAutomaticTax?
/// Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.
Expand All @@ -119,7 +119,7 @@ public struct SubscriptionScheduleDefaultSettings: Codable {
/// The account (if any) the subscription’s payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription’s invoices.
public var transferData: SubscriptionScheduleTransferData?

public init(applicationFeePercent: String? = nil,
public init(applicationFeePercent: Float? = nil,
automaticTax: SubscriptionScheduleDefaultSettingsAutomaticTax? = nil,
billingCycleAnchor: SubscriptionScheduleBillingCycleAnchor? = nil,
billingThresholds: SubscriptionScheduleDefaultSettingsBillingThresholds? = nil,
Expand Down Expand Up @@ -198,7 +198,7 @@ public struct SubscriptionSchedulePhase: Codable {
/// A list of prices and quantities that will generate invoice items appended to the first invoice for this phase.
public var addInvoiceItems: [SubscriptionSchedulePhaseAddInvoiceItem]?
/// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner’s Stripe account during this phase of the schedule.
public var applicationFeePercent: String?
public var applicationFeePercent: Float?
/// Automatic tax settings for this phase.
public var automaticTax: SubscriptionSchedulePhaseAutomaticTax?
/// Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If automatic then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.
Expand Down Expand Up @@ -237,7 +237,7 @@ public struct SubscriptionSchedulePhase: Codable {
public var trialEnd: Date?

public init(addInvoiceItems: [SubscriptionSchedulePhaseAddInvoiceItem]? = nil,
applicationFeePercent: String? = nil,
applicationFeePercent: Float? = nil,
automaticTax: SubscriptionSchedulePhaseAutomaticTax? = nil,
billingCycleAnchor: SubscriptionScheduleBillingCycleAnchor? = nil,
billingThresholds: SubscriptionScheduleDefaultSettingsBillingThresholds? = nil,
Expand Down Expand Up @@ -366,6 +366,7 @@ public enum SubscriptionScheduleStatus: String, Codable {

public enum SubscriptionSchedulePhaseProrationBehavior: String, Codable {
case createProrations = "create_prorations"
case alwaysInvoice = "always_invoice"
case none
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public protocol SubscriptionScheduleRoutes: StripeAPIRoute {
startDate: Date?,
defaultSettings: [String: Any]?,
endBehavior: SubscriptionScheduleEndBehavior?,
fromSubscription: Bool?,
fromSubscription: String?,
expand: [String]?) async throws -> SubscriptionSchedule

/// Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
Expand Down Expand Up @@ -97,7 +97,7 @@ public struct StripeSubscriptionScheduleRoutes: SubscriptionScheduleRoutes {
startDate: Date? = nil,
defaultSettings: [String: Any]? = nil,
endBehavior: SubscriptionScheduleEndBehavior? = nil,
fromSubscription: Bool? = nil,
fromSubscription: String? = nil,
expand: [String]? = nil) async throws -> SubscriptionSchedule {
var body: [String: Any] = [:]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ public struct PaymentMethodCard: Codable {
public var threeDSecureUsage: PaymentMethodCardThreeDSecureUsage?
/// If this Card is part of a card wallet, this contains the details of the card wallet.
public var wallet: PaymentMethodCardWallet?
/// The issuer identification number for the card. This is the first six digits of a card number.
public var iin: String?

public init(brand: PaymentMethodDetailsCardBrand? = nil,
checks: PaymentMethodDetailsCardChecks? = nil,
Expand All @@ -145,7 +147,8 @@ public struct PaymentMethodCard: Codable {
last4: String? = nil,
networks: PaymentMethodCardNetworks? = nil,
threeDSecureUsage: PaymentMethodCardThreeDSecureUsage? = nil,
wallet: PaymentMethodCardWallet? = nil) {
wallet: PaymentMethodCardWallet? = nil,
iin: String? = nil) {
self.brand = brand
self.checks = checks
self.country = country
Expand All @@ -158,6 +161,7 @@ public struct PaymentMethodCard: Codable {
self.networks = networks
self.threeDSecureUsage = threeDSecureUsage
self.wallet = wallet
self.iin = iin
}
}

Expand Down

0 comments on commit 15bf8b8

Please sign in to comment.