Skip to content

Conversation

@erickc-el
Copy link

@erickc-el erickc-el commented Mar 5, 2025

The duration param is now deprecated in Stripe API v1, instead we will be using end_time_ms

I decided to create the commit myself instead of keeping up to date with the fork because:

  1. There were merge conflicts if we tried to sync. There are only 2 commits in this repo ahead from the parent fork, but still, I considered outside-of-scope solving that as part of this upsell MVP test.
  2. I preferred to fully remove the duration param to avoid any usage

Comment on lines +23 to +24
Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec No newline at end of file
Copy link
Author

Choose a reason for hiding this comment

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

There are dev dependencies declared in the gemspec. Instead of changing the structure of the gem I modified the enforced style

protected

def perform(method:, path:, key:, headers: {}, body: nil, &block)
def perform(method:, path:, key:, headers: {}, body: nil, &block) # rubocop:disable Metrics/AbcSize
Copy link
Author

Choose a reason for hiding this comment

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

CI was failing, I disabled this rule here instead of changing the entire library

end

def get_or_create(&block) # rubocop:disable Naming/AccessorMethodName
def get_or_create(&block)
Copy link
Author

Choose a reason for hiding this comment

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

rubocop -a did this 🤷

def grant_promotional(duration:, start_time_ms: nil, &block)
def grant_promotional(start_time_ms: nil, end_time_ms: nil, &block)
body = {
duration: duration,
Copy link
Author

Choose a reason for hiding this comment

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

I preferred to remove the duration to avoid any usage. This entailed creating a commit in this repo instead of merging the commit from the fork parent

def list(platform, &block)
response = perform(method: :get, path: path.to_s, headers: { 'x-platform': platform.to_s }, key: :public, &block)
response =
perform(method: :get, path: path.to_s, headers: { 'x-platform': platform.to_s }, key: :public, &block)
Copy link
Author

Choose a reason for hiding this comment

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

rubocop

@Girardvjonathan
Copy link

@erickc-el I think we could also just drop tarpoon if it becomes a chore

@erickc-el erickc-el merged commit 0bd8bf0 into main Mar 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants