Skip to content

Commit

Permalink
Remove unnecessary parameters methods
Browse files Browse the repository at this point in the history
  • Loading branch information
richherrera committed Jan 13, 2025
1 parent df8eba1 commit 3fa9a0d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,4 @@ public struct BTPayPalBillingCycle: Encodable {
case startDate = "start_date"
case pricing = "pricing_scheme"
}

// MARK: - Internal Methods

func parameters() -> [String: Any] {
var parameters: [String: Any] = [
"number_of_executions": numberOfExecutions,
"trial": isTrial
]

if let interval {
parameters["billing_frequency_unit"] = interval.rawValue
}

if let intervalCount {
parameters["billing_frequency"] = intervalCount
}

if let sequence {
parameters["sequence"] = sequence
}

if let startDate {
parameters["start_date"] = startDate
}

if let pricing {
parameters["pricing_scheme"] = pricing.parameters()
}

return parameters
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,4 @@ public struct BTPayPalBillingPricing: Encodable {
case pricingModel = "pricing_model"
case reloadThresholdAmount = "reload_threshold_amount"
}

// MARK: - Internal Methods

func parameters() -> [String: Any] {
var parameters: [String: Any] = [
"pricing_model": pricingModel.rawValue
]

if let amount {
parameters["price"] = amount
}

if let reloadThresholdAmount {
parameters["reload_threshold_amount"] = reloadThresholdAmount
}

return parameters
}
}

0 comments on commit 3fa9a0d

Please sign in to comment.