-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NT-438] Create backing with free shipping #901
Conversation
…create-backing-free-shipping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool minor comments!
|
||
let rewardId = reward == Reward.noReward ? nil : reward.graphID | ||
let pledgeParams | ||
= formattedPledgeParameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to the same line as let pledgeParams
let rewardId: String? = updateBackingData.reward.graphID | ||
let backingId = updateBackingData.backing.graphID | ||
let (pledgeTotal, rewardId, locationId) = | ||
formattedPledgeParameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here?
Library/SharedFunctions.swift
Outdated
@@ -216,3 +216,27 @@ internal func classNameWithoutModule(_ class: AnyClass) -> String { | |||
.dropFirst() | |||
.joined(separator: ".") | |||
} | |||
|
|||
typealias FormattedPledgeParameters = (pledgeTotal: String, rewardId: String?, locationId: String?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I read FormattedPledgeParameters
I think about this going through a formatter, I'm wondering if SanitizedPledgeParameters
or SanitizedPledgeParams
describes what we're doing more accurately?
…create-backing-free-shipping
…kstarter/ios-oss into create-backing-free-shipping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, works!
📲 What
Adds support for creating a pledge with a reward that has free shipping.
🤔 Why
This was missed during the create backing implementation – often rewards ship for free, so we shouldn't be checking on the cost of shipping being greater than 0.
🛠 How
Also includes the following:
👀 See
Also see the new free shipping summary item on the Apple Pay share sheet.
✅ Acceptance criteria