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 DefaultSettings to Subscription Schedules #987

Merged
merged 4 commits into from
Nov 6, 2019

Conversation

cjavilla-stripe
Copy link
Contributor

@cjavilla-stripe cjavilla-stripe commented Nov 5, 2019

r? @remi-stripe
cc @stripe/api-libraries

Updates API version to: 2019-11-05
Updates stripe-mock minimum version to 0.71.0
Adds: DefaultSettings with BillingThresholds, CollectionMethod, DefaultPaymentMethod, InvoiceSettings to SubscriptionSchedule
Removes: BillingThresholds, CollectionMethod, DefaultPaymentMethod, DefaultSource, InvoiceSettings from SubscriptionSchedule

subschedule.go Outdated
AmountGTE int64 `json:"amount_gte"`
ResetBillingCycleAnchor bool `json:"reset_billing_cycle_anchor"`
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be here. Sharing was done before and used the subscription's one SubscriptionBillingThresholdsParams and sharing is what the spec says to do (and what java does). Si you should remove that class and use SubscriptionBillingThresholdsParams instead.

subschedule.go Outdated
// SubscriptionScheduleDefaultSettings is a structure representing the
// subscription schedule’s default settings.
type SubscriptionScheduleDefaultSettings struct {
BillingThresholds *SubscriptionScheduleBillingThresholds `json:"billing_thresholds"`
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above. That class should not be here

subschedule.go Outdated
Params `form:"*"`
Customer *string `form:"customer"`
DefaultSettings *SubscriptionScheduleDefaultSettingsParams `form:"default_settings"`
DefaultSource *string `form:"default_source"`
Copy link
Contributor

Choose a reason for hiding this comment

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

you should remove DefaultSource

@remi-stripe
Copy link
Contributor

Looked and compared with stripe-dotnet and the changes lgtm. Assigning to @ob-stripe for final review.

Copy link
Contributor

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

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

Compared to release notes and this LGTM.

@remi-stripe remi-stripe merged commit 7a47683 into master Nov 6, 2019
@remi-stripe remi-stripe deleted the cjavilla/add-sub-schedule-default-settings branch November 6, 2019 00:13
nadaismail-stripe added a commit that referenced this pull request Oct 18, 2024
* added caching service to mapper

* added integer to list

* merged in main and cleaned up PR

* more cleanup

* reverted class change

* silenced CI failures for mapper

* updated git ignore

* Sanitize duration_in_months always (#985)

* Support amending orders with coupons  (#956)

* Productionize coupon order trigger (#934)

* Ensure updateCoupons trigger is deterministic (#988)

* Update 'add_invoice_items.period.end.type' on proration invoices (#987)

* Backend proration with amendment (#847)

* Add class access for coupon handler (#990)

* Manual Translation in Sync Preferences (#992)

* passing in mapper to amendment funcs

* removed extra backoff

* return empty list for non supported cache types

---------

Co-authored-by: Nada Ismail <[email protected]>
Co-authored-by: jmather-c <[email protected]>
Co-authored-by: mbianco-stripe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants