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

API Updates #1595

Merged
merged 1 commit into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v217
v219
24 changes: 14 additions & 10 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,20 @@ type AccountCompanyVerificationDocumentDetailsCode string

// List of values that AccountCompanyVerificationDocumentDetailsCode can take
const (
AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode"
AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent"
AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid"
AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated"
AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable"
AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded"
AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large"
AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt"
AccountCompanyVerificationDocumentDetailsCodeDocumentExpired AccountCompanyVerificationDocumentDetailsCode = "document_expired"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode"
AccountCompanyVerificationDocumentDetailsCodeDocumentFailedGreyscale AccountCompanyVerificationDocumentDetailsCode = "document_failed_greyscale"
AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent"
AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid"
AccountCompanyVerificationDocumentDetailsCodeDocumentIncomplete AccountCompanyVerificationDocumentDetailsCode = "document_incomplete"
AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated"
AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable"
AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded"
AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large"
AccountCompanyVerificationDocumentDetailsCodeDocumentTypeNotSupported AccountCompanyVerificationDocumentDetailsCode = "document_type_not_supported"
)

// The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
Expand Down
3 changes: 2 additions & 1 deletion balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const (
)

// Retrieves the current account balance, based on the authentication that was used to make the request.
// For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
//
// For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
type BalanceParams struct {
Params `form:"*"`
}
Expand Down
8 changes: 4 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,13 @@ type CheckoutSessionConsentCollectionParams struct {

// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddressParams struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextSubmitParams struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message *string `form:"message"`
}

Expand Down Expand Up @@ -1540,13 +1540,13 @@ type CheckoutSessionConsentCollection struct {

// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddress struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextSubmit struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message string `json:"message"`
}
type CheckoutSessionCustomText struct {
Expand Down
2 changes: 0 additions & 2 deletions creditnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ type CreditNoteLineParams struct {
// its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
// in any combination of the following:
//
//
// Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
// Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
// Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
//
//
// For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
//
// You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
Expand Down
6 changes: 4 additions & 2 deletions ephemeralkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ type EphemeralKeyParams struct {
// The ID of the Customer you'd like to modify using the resulting ephemeral key.
Customer *string `form:"customer"`
// The ID of the Issuing Card you'd like to access using the resulting ephemeral key.
IssuingCard *string `form:"issuing_card"`
StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header
IssuingCard *string `form:"issuing_card"`
// The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key
VerificationSession *string `form:"verification_session"`
StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header
}
type EphemeralKey struct {
APIResource
Expand Down
14 changes: 7 additions & 7 deletions financialconnections_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ const (

// If `category` is `cash`, one of:
//
// - `checking`
// - `savings`
// - `other`
// - `checking`
// - `savings`
// - `other`
//
// If `category` is `credit`, one of:
//
// - `mortgage`
// - `line_of_credit`
// - `credit_card`
// - `other`
// - `mortgage`
// - `line_of_credit`
// - `credit_card`
// - `other`
//
// If `category` is `investment` or `other`, this will be `other`.
type FinancialConnectionsAccountSubcategory string
Expand Down
4 changes: 2 additions & 2 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ type InvoiceUpcomingParams struct {
SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"`
// A list of up to 20 subscription items, each with an attached price.
SubscriptionItems []*SubscriptionItemsParams `form:"subscription_items"`
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`
// If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
Expand Down Expand Up @@ -768,7 +768,7 @@ type InvoiceUpcomingLinesParams struct {
SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"`
// A list of up to 20 subscription items, each with an attached price.
SubscriptionItems []*InvoiceUpcomingLinesSubscriptionItemParams `form:"subscription_items"`
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`
// If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
Expand Down
8 changes: 4 additions & 4 deletions paymentlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ type PaymentLinkConsentCollectionParams struct {

// Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddressParams struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type PaymentLinkCustomTextSubmitParams struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message *string `form:"message"`
}

Expand Down Expand Up @@ -366,13 +366,13 @@ type PaymentLinkConsentCollection struct {

// Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddress struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type PaymentLinkCustomTextSubmit struct {
// Text may be up to 500 characters in length.
// Text may be up to 1000 characters in length.
Message string `json:"message"`
}
type PaymentLinkCustomText struct {
Expand Down
20 changes: 16 additions & 4 deletions person.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,41 @@ type PersonVerificationDocumentDetailsCode string
// List of values that PersonVerificationDocumentDetailsCode can take
const (
PersonVerificationDocumentDetailsCodeDocumentCorrupt PersonVerificationDocumentDetailsCode = "document_corrupt"
PersonVerificationDocumentDetailsCodeDocumentCountryNotSupported PersonVerificationDocumentDetailsCode = "document_country_not_supported"
PersonVerificationDocumentDetailsCodeDocumentExpired PersonVerificationDocumentDetailsCode = "document_expired"
PersonVerificationDocumentDetailsCodeDocumentFailedCopy PersonVerificationDocumentDetailsCode = "document_failed_copy"
PersonVerificationDocumentDetailsCodeDocumentFailedGreyscale PersonVerificationDocumentDetailsCode = "document_failed_greyscale"
PersonVerificationDocumentDetailsCodeDocumentFailedOther PersonVerificationDocumentDetailsCode = "document_failed_other"
PersonVerificationDocumentDetailsCodeDocumentFailedTestMode PersonVerificationDocumentDetailsCode = "document_failed_test_mode"
PersonVerificationDocumentDetailsCodeDocumentFraudulent PersonVerificationDocumentDetailsCode = "document_fraudulent"
PersonVerificationDocumentDetailsCodeDocumentIDTypeNotSupported PersonVerificationDocumentDetailsCode = "document_id_type_not_supported"
PersonVerificationDocumentDetailsCodeDocumentIDCountryNotSupported PersonVerificationDocumentDetailsCode = "document_id_country_not_supported"
PersonVerificationDocumentDetailsCodeDocumentFailedGreyscale PersonVerificationDocumentDetailsCode = "document_failed_greyscale"
PersonVerificationDocumentDetailsCodeDocumentIncomplete PersonVerificationDocumentDetailsCode = "document_incomplete"
PersonVerificationDocumentDetailsCodeDocumentInvalid PersonVerificationDocumentDetailsCode = "document_invalid"
PersonVerificationDocumentDetailsCodeDocumentManipulated PersonVerificationDocumentDetailsCode = "document_manipulated"
PersonVerificationDocumentDetailsCodeDocumentMissingBack PersonVerificationDocumentDetailsCode = "document_missing_back"
PersonVerificationDocumentDetailsCodeDocumentMissingFront PersonVerificationDocumentDetailsCode = "document_missing_front"
PersonVerificationDocumentDetailsCodeDocumentNotReadable PersonVerificationDocumentDetailsCode = "document_not_readable"
PersonVerificationDocumentDetailsCodeDocumentNotUploaded PersonVerificationDocumentDetailsCode = "document_not_uploaded"
PersonVerificationDocumentDetailsCodeDocumentPhotoMismatch PersonVerificationDocumentDetailsCode = "document_photo_mismatch"
PersonVerificationDocumentDetailsCodeDocumentTooLarge PersonVerificationDocumentDetailsCode = "document_too_large"
PersonVerificationDocumentDetailsCodeDocumentTypeNotSupported PersonVerificationDocumentDetailsCode = "document_type_not_supported"
)

// One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.
type PersonVerificationDetailsCode string

// List of values that PersonVerificationDetailsCode can take
const (
PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity"
PersonVerificationDetailsCodeFailedOther PersonVerificationDetailsCode = "failed_other"
PersonVerificationDetailsCodeScanNameMismatch PersonVerificationDetailsCode = "scan_name_mismatch"
PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity"
PersonVerificationDetailsCodeFailedOther PersonVerificationDetailsCode = "failed_other"
PersonVerificationDetailsCodeScanNameMismatch PersonVerificationDetailsCode = "scan_name_mismatch"
PersonVerificationDetailsCodeDocumentAddressMismatch PersonVerificationDetailsCode = "document_address_mismatch"
PersonVerificationDetailsCodeDocumentDOBMismatch PersonVerificationDetailsCode = "document_dob_mismatch"
PersonVerificationDetailsCodeDocumentDuplicateType PersonVerificationDetailsCode = "document_duplicate_type"
PersonVerificationDetailsCodeDocumentIDNumberMismatch PersonVerificationDetailsCode = "document_id_number_mismatch"
PersonVerificationDetailsCodeDocumentNameMismatch PersonVerificationDetailsCode = "document_name_mismatch"
PersonVerificationDetailsCodeDocumentNationalityMismatch PersonVerificationDetailsCode = "document_nationality_mismatch"
)

// The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.
Expand Down
9 changes: 5 additions & 4 deletions refund.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ type RefundStatus string

// List of values that RefundStatus can take
const (
RefundStatusCanceled RefundStatus = "canceled"
RefundStatusFailed RefundStatus = "failed"
RefundStatusPending RefundStatus = "pending"
RefundStatusSucceeded RefundStatus = "succeeded"
RefundStatusCanceled RefundStatus = "canceled"
RefundStatusFailed RefundStatus = "failed"
RefundStatusPending RefundStatus = "pending"
RefundStatusSucceeded RefundStatus = "succeeded"
RefundStatusRequiresAction RefundStatus = "requires_action"
)

// Returns a list of all refunds you've previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.
Expand Down
5 changes: 3 additions & 2 deletions reporting_reportrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
package stripe

// Status of this report run. This will be `pending` when the run is initially created.
// When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
// Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
//
// When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
// Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
type ReportingReportRunStatus string

// List of values that ReportingReportRunStatus can take
Expand Down
1 change: 1 addition & 0 deletions review.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (
ReviewReasonManual ReviewReason = "manual"
ReviewReasonRefunded ReviewReason = "refunded"
ReviewReasonRefundedAsFraud ReviewReason = "refunded_as_fraud"
ReviewReasonRedacted ReviewReason = "redacted"
ReviewReasonRule ReviewReason = "rule"
)

Expand Down
2 changes: 1 addition & 1 deletion subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ type SubscriptionParams struct {
PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"`
// The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.
PromotionCode *string `form:"promotion_code"`
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
ProrationBehavior *string `form:"proration_behavior"`
// If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
ProrationDate *int64 `form:"proration_date"`
Expand Down
Loading