Skip to content
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

add detachSourceFromCustomer and updateCustomer to BackendAPIAdapter #813

Merged
merged 5 commits into from Oct 17, 2017

Conversation

bg-stripe
Copy link
Contributor

@bg-stripe bg-stripe commented Oct 16, 2017

r? @bdorfman-stripe

Requested in #812 .

I decided to add these methods to STPBackendAPIAdapter, to keep STPCustomerContext.h clean (most users shouldn't need to know these exist). It also lets users that want to stick with STPBackendAPIAdapter to add deletion and shipping update functionality.

@bg-stripe bg-stripe changed the title make detachSourceFromCustomer public add detachSourceFromCustomer and updateCustomer to BackendAPIAdapter Oct 16, 2017
Copy link
Contributor

@bdorfman-stripe bdorfman-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remove deprecation flags and also looks like there's a logic error in source detach handling.

Instead of providing your own backend API adapter, you can now create an
`STPCustomerContext`, which will manage retrieving and updating a
Stripe customer for you. @see STPCustomerContext.h

*/
__attribute__((deprecated))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unmark this as deprecated?

your own backend instead of using `STPCustomerContext`, you should make your
application's API client conform to this interface. It provides a "bridge" from
the prebuilt UI we expose (such as `STPPaymentMethodsViewController`) to your
backend to fetch the information it needs to power those views.

@deprecated Use `STPCustomerContext`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unmark as deprecated?

// Cannot detach payment methods without customer context
return NO;
}

if (![self.apiAdapter respondsToSelector:@selector(detachSourceFromCustomer:completion:)]) {
// Cannot detach payment methods if customerContext is an apiAdapter
// that doesn't implement detachSource
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return NO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh derp, good catch

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
@property (nonatomic, strong, nullable, readwrite) id<STPBackendAPIAdapter> apiAdapter;
#pragma clang diagnostic pop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should unmark as deprecated and remove these pragmas

@bg-stripe
Copy link
Contributor Author

@bdorfman-stripe re-r? I've undeprecated and updated docs in a7e31aa

The documentation updates are a bit noisy - mostly fixing line breaks. I made some actual content changes in the STPBackendAPIAdapter docs.

Copy link
Contributor

@bdorfman-stripe bdorfman-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bg-stripe bg-stripe merged commit f65af9d into master Oct 17, 2017
@bg-stripe bg-stripe deleted the bg-public-customercontext-methods branch October 17, 2017 14:37
mludowise-stripe added a commit that referenced this pull request Mar 2, 2022
… of frame count (#813)

This change removes the frame minimum from the
MotionBlurDetector in place of a time minimum for
consecutive frames. This is more consistent
because different devices have different frame
rates, depending on their CPU or whether they
contain a neural engine. Previous to this change,
we were still seeing some motion blur in images
on faster performing devices.

The current default is 500ms, however this will
eventually be server driven.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants