Skip to content

Commit

Permalink
Deprecations and naming fixes (#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe authored Aug 15, 2023
1 parent b38eae5 commit 9654410
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 193 deletions.
66 changes: 30 additions & 36 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,24 +618,21 @@ type CheckoutSessionShippingCostTaxTaxabilityReason string

// List of values that CheckoutSessionShippingCostTaxTaxabilityReason can take
const (
CheckoutSessionShippingCostTaxTaxabilityReasonCustomerExempt CheckoutSessionShippingCostTaxTaxabilityReason = "customer_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonExcludedTerritory CheckoutSessionShippingCostTaxTaxabilityReason = "excluded_territory"
CheckoutSessionShippingCostTaxTaxabilityReasonJurisdictionUnsupported CheckoutSessionShippingCostTaxTaxabilityReason = "jurisdiction_unsupported"
CheckoutSessionShippingCostTaxTaxabilityReasonNotCollecting CheckoutSessionShippingCostTaxTaxabilityReason = "not_collecting"
CheckoutSessionShippingCostTaxTaxabilityReasonNotSubjectToTax CheckoutSessionShippingCostTaxTaxabilityReason = "not_subject_to_tax"
CheckoutSessionShippingCostTaxTaxabilityReasonNotSupported CheckoutSessionShippingCostTaxTaxabilityReason = "not_supported"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "portion_product_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_reduced_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_standard_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonProductExemptHoliday CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt_holiday"
CheckoutSessionShippingCostTaxTaxabilityReasonProportionallyRated CheckoutSessionShippingCostTaxTaxabilityReason = "proportionally_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "reduced_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonReverseCharge CheckoutSessionShippingCostTaxTaxabilityReason = "reverse_charge"
CheckoutSessionShippingCostTaxTaxabilityReasonStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "standard_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
CheckoutSessionShippingCostTaxTaxabilityReasonVATExempt CheckoutSessionShippingCostTaxTaxabilityReason = "vat_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonZeroRated CheckoutSessionShippingCostTaxTaxabilityReason = "zero_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonCustomerExempt CheckoutSessionShippingCostTaxTaxabilityReason = "customer_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonNotCollecting CheckoutSessionShippingCostTaxTaxabilityReason = "not_collecting"
CheckoutSessionShippingCostTaxTaxabilityReasonNotSubjectToTax CheckoutSessionShippingCostTaxTaxabilityReason = "not_subject_to_tax"
CheckoutSessionShippingCostTaxTaxabilityReasonNotSupported CheckoutSessionShippingCostTaxTaxabilityReason = "not_supported"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "portion_product_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_reduced_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_standard_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonProductExemptHoliday CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt_holiday"
CheckoutSessionShippingCostTaxTaxabilityReasonProportionallyRated CheckoutSessionShippingCostTaxTaxabilityReason = "proportionally_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "reduced_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonReverseCharge CheckoutSessionShippingCostTaxTaxabilityReason = "reverse_charge"
CheckoutSessionShippingCostTaxTaxabilityReasonStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "standard_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
CheckoutSessionShippingCostTaxTaxabilityReasonZeroRated CheckoutSessionShippingCostTaxTaxabilityReason = "zero_rated"
)

// The status of the Checkout Session, one of `open`, `complete`, or `expired`.
Expand Down Expand Up @@ -667,24 +664,21 @@ type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason string

// List of values that CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason can take
const (
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "excluded_territory"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "jurisdiction_unsupported"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSupported CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_supported"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonVATExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "vat_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonZeroRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSupported CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_supported"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonZeroRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated"
)

// Only return the Checkout Sessions for the Customer details specified.
Expand Down
33 changes: 15 additions & 18 deletions creditnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,21 @@ type CreditNoteShippingCostTaxTaxabilityReason string

// List of values that CreditNoteShippingCostTaxTaxabilityReason can take
const (
CreditNoteShippingCostTaxTaxabilityReasonCustomerExempt CreditNoteShippingCostTaxTaxabilityReason = "customer_exempt"
CreditNoteShippingCostTaxTaxabilityReasonExcludedTerritory CreditNoteShippingCostTaxTaxabilityReason = "excluded_territory"
CreditNoteShippingCostTaxTaxabilityReasonJurisdictionUnsupported CreditNoteShippingCostTaxTaxabilityReason = "jurisdiction_unsupported"
CreditNoteShippingCostTaxTaxabilityReasonNotCollecting CreditNoteShippingCostTaxTaxabilityReason = "not_collecting"
CreditNoteShippingCostTaxTaxabilityReasonNotSubjectToTax CreditNoteShippingCostTaxTaxabilityReason = "not_subject_to_tax"
CreditNoteShippingCostTaxTaxabilityReasonNotSupported CreditNoteShippingCostTaxTaxabilityReason = "not_supported"
CreditNoteShippingCostTaxTaxabilityReasonPortionProductExempt CreditNoteShippingCostTaxTaxabilityReason = "portion_product_exempt"
CreditNoteShippingCostTaxTaxabilityReasonPortionReducedRated CreditNoteShippingCostTaxTaxabilityReason = "portion_reduced_rated"
CreditNoteShippingCostTaxTaxabilityReasonPortionStandardRated CreditNoteShippingCostTaxTaxabilityReason = "portion_standard_rated"
CreditNoteShippingCostTaxTaxabilityReasonProductExempt CreditNoteShippingCostTaxTaxabilityReason = "product_exempt"
CreditNoteShippingCostTaxTaxabilityReasonProductExemptHoliday CreditNoteShippingCostTaxTaxabilityReason = "product_exempt_holiday"
CreditNoteShippingCostTaxTaxabilityReasonProportionallyRated CreditNoteShippingCostTaxTaxabilityReason = "proportionally_rated"
CreditNoteShippingCostTaxTaxabilityReasonReducedRated CreditNoteShippingCostTaxTaxabilityReason = "reduced_rated"
CreditNoteShippingCostTaxTaxabilityReasonReverseCharge CreditNoteShippingCostTaxTaxabilityReason = "reverse_charge"
CreditNoteShippingCostTaxTaxabilityReasonStandardRated CreditNoteShippingCostTaxTaxabilityReason = "standard_rated"
CreditNoteShippingCostTaxTaxabilityReasonTaxableBasisReduced CreditNoteShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
CreditNoteShippingCostTaxTaxabilityReasonVATExempt CreditNoteShippingCostTaxTaxabilityReason = "vat_exempt"
CreditNoteShippingCostTaxTaxabilityReasonZeroRated CreditNoteShippingCostTaxTaxabilityReason = "zero_rated"
CreditNoteShippingCostTaxTaxabilityReasonCustomerExempt CreditNoteShippingCostTaxTaxabilityReason = "customer_exempt"
CreditNoteShippingCostTaxTaxabilityReasonNotCollecting CreditNoteShippingCostTaxTaxabilityReason = "not_collecting"
CreditNoteShippingCostTaxTaxabilityReasonNotSubjectToTax CreditNoteShippingCostTaxTaxabilityReason = "not_subject_to_tax"
CreditNoteShippingCostTaxTaxabilityReasonNotSupported CreditNoteShippingCostTaxTaxabilityReason = "not_supported"
CreditNoteShippingCostTaxTaxabilityReasonPortionProductExempt CreditNoteShippingCostTaxTaxabilityReason = "portion_product_exempt"
CreditNoteShippingCostTaxTaxabilityReasonPortionReducedRated CreditNoteShippingCostTaxTaxabilityReason = "portion_reduced_rated"
CreditNoteShippingCostTaxTaxabilityReasonPortionStandardRated CreditNoteShippingCostTaxTaxabilityReason = "portion_standard_rated"
CreditNoteShippingCostTaxTaxabilityReasonProductExempt CreditNoteShippingCostTaxTaxabilityReason = "product_exempt"
CreditNoteShippingCostTaxTaxabilityReasonProductExemptHoliday CreditNoteShippingCostTaxTaxabilityReason = "product_exempt_holiday"
CreditNoteShippingCostTaxTaxabilityReasonProportionallyRated CreditNoteShippingCostTaxTaxabilityReason = "proportionally_rated"
CreditNoteShippingCostTaxTaxabilityReasonReducedRated CreditNoteShippingCostTaxTaxabilityReason = "reduced_rated"
CreditNoteShippingCostTaxTaxabilityReasonReverseCharge CreditNoteShippingCostTaxTaxabilityReason = "reverse_charge"
CreditNoteShippingCostTaxTaxabilityReasonStandardRated CreditNoteShippingCostTaxTaxabilityReason = "standard_rated"
CreditNoteShippingCostTaxTaxabilityReasonTaxableBasisReduced CreditNoteShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
CreditNoteShippingCostTaxTaxabilityReasonZeroRated CreditNoteShippingCostTaxTaxabilityReason = "zero_rated"
)

// Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
Expand Down
6 changes: 0 additions & 6 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const (
ErrorCodeCaptureUnauthorizedPayment ErrorCode = "capture_unauthorized_payment"
ErrorCodeCardDeclineRateLimitExceeded ErrorCode = "card_decline_rate_limit_exceeded"
ErrorCodeCardDeclined ErrorCode = "card_declined"
ErrorCodeCardDeclinedRateLimitExceeded ErrorCode = "card_decline_rate_limit_exceeded"
ErrorCodeCardholderPhoneNumberRequired ErrorCode = "cardholder_phone_number_required"
ErrorCodeChargeAlreadyCaptured ErrorCode = "charge_already_captured"
ErrorCodeChargeAlreadyRefunded ErrorCode = "charge_already_refunded"
Expand Down Expand Up @@ -88,14 +87,12 @@ const (
ErrorCodeInvalidExpiryYear ErrorCode = "invalid_expiry_year"
ErrorCodeInvalidNumber ErrorCode = "invalid_number"
ErrorCodeInvalidSourceUsage ErrorCode = "invalid_source_usage"
ErrorCodeInvalidSwipeData ErrorCode = "invalid_swipe_data"
ErrorCodeInvalidTaxLocation ErrorCode = "invalid_tax_location"
ErrorCodeInvoiceNoCustomerLineItems ErrorCode = "invoice_no_customer_line_items"
ErrorCodeInvoiceNoPaymentMethodTypes ErrorCode = "invoice_no_payment_method_types"
ErrorCodeInvoiceNoSubscriptionLineItems ErrorCode = "invoice_no_subscription_line_items"
ErrorCodeInvoiceNotEditable ErrorCode = "invoice_not_editable"
ErrorCodeInvoiceOnBehalfOfNotEditable ErrorCode = "invoice_on_behalf_of_not_editable"
ErrorCodeInvoicePamentIntentRequiresAction ErrorCode = "invoice_payment_intent_requires_action"
ErrorCodeInvoicePaymentIntentRequiresAction ErrorCode = "invoice_payment_intent_requires_action"
ErrorCodeInvoiceUpcomingNone ErrorCode = "invoice_upcoming_none"
ErrorCodeLivemodeMismatch ErrorCode = "livemode_mismatch"
Expand Down Expand Up @@ -160,15 +157,13 @@ const (
ErrorCodeSEPAUnsupportedAccount ErrorCode = "sepa_unsupported_account"
ErrorCodeSKUInactive ErrorCode = "sku_inactive"
ErrorCodeSecretKeyRequired ErrorCode = "secret_key_required"
ErrorCodeSepaUnsupportedAccount ErrorCode = "sepa_unsupported_account"
ErrorCodeSetupAttemptFailed ErrorCode = "setup_attempt_failed"
ErrorCodeSetupIntentAuthenticationFailure ErrorCode = "setup_intent_authentication_failure"
ErrorCodeSetupIntentInvalidParameter ErrorCode = "setup_intent_invalid_parameter"
ErrorCodeSetupIntentMandateInvalid ErrorCode = "setup_intent_mandate_invalid"
ErrorCodeSetupIntentSetupAttemptExpired ErrorCode = "setup_intent_setup_attempt_expired"
ErrorCodeSetupIntentUnexpectedState ErrorCode = "setup_intent_unexpected_state"
ErrorCodeShippingCalculationFailed ErrorCode = "shipping_calculation_failed"
ErrorCodeSkuInactive ErrorCode = "sku_inactive"
ErrorCodeStateUnsupported ErrorCode = "state_unsupported"
ErrorCodeStatusTransitionInvalid ErrorCode = "status_transition_invalid"
ErrorCodeTLSVersionUnsupported ErrorCode = "tls_version_unsupported"
Expand All @@ -184,7 +179,6 @@ const (
ErrorCodeTransferSourceBalanceParametersMismatch ErrorCode = "transfer_source_balance_parameters_mismatch"
ErrorCodeTransfersNotAllowed ErrorCode = "transfers_not_allowed"
ErrorCodeURLInvalid ErrorCode = "url_invalid"
ErrorCodeinstantPayoutsLimitExceeded ErrorCode = "instant_payouts_limit_exceeded"
)

// The end of the section generated from our OpenAPI spec
Expand Down
Loading

0 comments on commit 9654410

Please sign in to comment.