Skip to content

Commit

Permalink
- Update fork to match v72 of stripe
Browse files Browse the repository at this point in the history
 - Add json field tags for all files
  • Loading branch information
chris-omni committed Sep 29, 2021
1 parent 5cdd044 commit f67b434
Show file tree
Hide file tree
Showing 90 changed files with 2,041 additions and 2,041 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
72.67.0
72.67.0-omni
306 changes: 153 additions & 153 deletions account.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions accountlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ const (

// AccountLinkParams are the parameters allowed during an account link creation.
type AccountLinkParams struct {
Params `form:"*"`
Account *string `form:"account"`
Collect *string `form:"collect"`
RefreshURL *string `form:"refresh_url"`
ReturnURL *string `form:"return_url"`
Type *string `form:"type"`
Params `form:"*" json:"*"`
Account *string `form:"account" json:"account"`
Collect *string `form:"collect" json:"collect"`
RefreshURL *string `form:"refresh_url" json:"refresh_url"`
ReturnURL *string `form:"return_url" json:"return_url"`
Type *string `form:"type" json:"type"`
}

// AccountLink is the resource representing an account link.
Expand Down
22 changes: 11 additions & 11 deletions address.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package stripe

// AddressParams describes the common parameters for an Address.
type AddressParams struct {
City *string `form:"city" json:"city"`
Country *string `form:"country" json:"country"`
Line1 *string `form:"line1" json:"line1"`
Line2 *string `form:"line2" json:"line2"`
PostalCode *string `form:"postal_code" json:"postal_code"`
State *string `form:"state" json:"state"`
City *string `form:"city" json:"city" json:"city" json:"city"`
Country *string `form:"country" json:"country" json:"country" json:"country"`
Line1 *string `form:"line1" json:"line1" json:"line1" json:"line1"`
Line2 *string `form:"line2" json:"line2" json:"line2" json:"line2"`
PostalCode *string `form:"postal_code" json:"postal_code" json:"postal_code" json:"postal_code"`
State *string `form:"state" json:"state" json:"state" json:"state"`
}

// Address describes common properties for an Address hash.
Expand All @@ -22,11 +22,11 @@ type Address struct {

// ShippingDetailsParams is the structure containing shipping information as parameters
type ShippingDetailsParams struct {
Address *AddressParams `form:"address"`
Carrier *string `form:"carrier"`
Name *string `form:"name"`
Phone *string `form:"phone"`
TrackingNumber *string `form:"tracking_number"`
Address *AddressParams `form:"address" json:"address"`
Carrier *string `form:"carrier" json:"carrier"`
Name *string `form:"name" json:"name"`
Phone *string `form:"phone" json:"phone"`
TrackingNumber *string `form:"tracking_number" json:"tracking_number"`
}

// ShippingDetails is the structure containing shipping information.
Expand Down
8 changes: 4 additions & 4 deletions applepaydomain.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ package stripe

// ApplePayDomainParams is the set of parameters that can be used when creating an ApplePayDomain object.
type ApplePayDomainParams struct {
Params `form:"*"`
DomainName *string `form:"domain_name"`
Params `form:"*" json:"*"`
DomainName *string `form:"domain_name" json:"domain_name"`
}

// ApplePayDomainListParams are the parameters allowed during ApplePayDomain listing.
type ApplePayDomainListParams struct {
ListParams `form:"*"`
DomainName *string `form:"domain_name"`
ListParams `form:"*" json:"*"`
DomainName *string `form:"domain_name" json:"domain_name"`
}

// ApplePayDomain is the resource representing a Stripe ApplePayDomain object
Expand Down
2 changes: 1 addition & 1 deletion balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type BalanceTransactionStatus string
// BalanceParams is the set of parameters that can be used when retrieving a balance.
// For more details see https://stripe.com/docs/api#balance.
type BalanceParams struct {
Params `form:"*"`
Params `form:"*" json:"*"`
}

// Amount is a structure wrapping an amount value and its currency.
Expand Down
20 changes: 10 additions & 10 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ const (
// BalanceTransactionParams is the set of parameters that can be used when retrieving a transaction.
// For more details see https://stripe.com/docs/api#retrieve_balance_transaction.
type BalanceTransactionParams struct {
Params `form:"*"`
Params `form:"*" json:"*"`
}

// BalanceTransactionListParams is the set of parameters that can be used when listing balance transactions.
// For more details see https://stripe.com/docs/api/#balance_history.
type BalanceTransactionListParams struct {
ListParams `form:"*"`
AvailableOn *int64 `form:"available_on"`
AvailableOnRange *RangeQueryParams `form:"available_on"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
Currency *string `form:"currency"`
Payout *string `form:"payout"`
Source *string `form:"source"`
Type *string `form:"type"`
ListParams `form:"*" json:"*"`
AvailableOn *int64 `form:"available_on" json:"available_on"`
AvailableOnRange *RangeQueryParams `form:"available_on" json:"available_on"`
Created *int64 `form:"created" json:"created"`
CreatedRange *RangeQueryParams `form:"created" json:"created"`
Currency *string `form:"currency" json:"currency"`
Payout *string `form:"payout" json:"payout"`
Source *string `form:"source" json:"source"`
Type *string `form:"type" json:"type"`
}

// BalanceTransactionSource describes the source of a balance Transaction.
Expand Down
36 changes: 18 additions & 18 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@ const (
// some unusual logic on creates that necessitates manual handling of all
// parameters. See AppendToAsSourceOrExternalAccount.
type BankAccountParams struct {
Params `form:"*"`
Params `form:"*" json:"*"`

// Account is the identifier of the parent account under which bank
// accounts are nested.
Account *string `form:"-"`

AccountHolderName *string `form:"account_holder_name"`
AccountHolderType *string `form:"account_holder_type"`
AccountType *string `form:"account_type"`
AccountNumber *string `form:"account_number"`
Country *string `form:"country"`
Currency *string `form:"currency"`
Customer *string `form:"-"`
DefaultForCurrency *bool `form:"default_for_currency"`
RoutingNumber *string `form:"routing_number"`
Account *string `form:"-" json:"-"`

AccountHolderName *string `form:"account_holder_name" json:"account_holder_name"`
AccountHolderType *string `form:"account_holder_type" json:"account_holder_type"`
AccountType *string `form:"account_type" json:"account_type"`
AccountNumber *string `form:"account_number" json:"account_number"`
Country *string `form:"country" json:"country"`
Currency *string `form:"currency" json:"currency"`
Customer *string `form:"-" json:"-"`
DefaultForCurrency *bool `form:"default_for_currency" json:"default_for_currency"`
RoutingNumber *string `form:"routing_number" json:"routing_number"`

// Token is a token referencing an external account like one returned from
// Stripe.js.
Token *string `form:"-"`
Token *string `form:"-" json:"-"`

// ID is used when tokenizing a bank account for shared customers
ID *string `form:"*"`
ID *string `form:"*" json:"*"`
}

// AppendToAsSourceOrExternalAccount appends the given BankAccountParams as
Expand Down Expand Up @@ -131,15 +131,15 @@ func (a *BankAccountParams) AppendToAsSourceOrExternalAccount(body *form.Values)

// BankAccountListParams is the set of parameters that can be used when listing bank accounts.
type BankAccountListParams struct {
ListParams `form:"*"`
ListParams `form:"*" json:"*"`

// The identifier of the parent account under which the bank accounts are
// nested. Either Account or Customer should be populated.
Account *string `form:"-"`
Account *string `form:"-" json:"-"`

// The identifier of the parent customer under which the bank accounts are
// nested. Either Account or Customer should be populated.
Customer *string `form:"-"`
Customer *string `form:"-" json:"-"`
}

// AppendTo implements custom encoding logic for BankAccountListParams
Expand All @@ -155,7 +155,7 @@ type BankAccount struct {
Account *Account `json:"account"`
AccountHolderName string `json:"account_holder_name"`
AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"`
AccountType *string `form:"account_type"`
AccountType *string `form:"account_type" json:"account_type"`
AvailablePayoutMethods []BankAccountAvailablePayoutMethod `json:"available_payout_methods"`
BankName string `json:"bank_name"`
Country string `json:"country"`
Expand Down
68 changes: 34 additions & 34 deletions billingportal_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,94 +82,94 @@ const (
// BillingPortalConfigurationListParams is the set of parameters that can be
// used when listing portal configurations.
type BillingPortalConfigurationListParams struct {
ListParams `form:"*"`
Active *bool `form:"active"`
IsDefault *bool `form:"is_default"`
ListParams `form:"*" json:"*"`
Active *bool `form:"active" json:"active"`
IsDefault *bool `form:"is_default" json:"is_default"`
}

// BillingPortalConfigurationBusinessProfileParams lets you pass the business
// profile details associated with a portal configuration.
type BillingPortalConfigurationBusinessProfileParams struct {
Headline *string `form:"headline"`
PrivacyPolicyURL *string `form:"privacy_policy_url"`
TermsOfServiceURL *string `form:"terms_of_service_url"`
Headline *string `form:"headline" json:"headline"`
PrivacyPolicyURL *string `form:"privacy_policy_url" json:"privacy_policy_url"`
TermsOfServiceURL *string `form:"terms_of_service_url" json:"terms_of_service_url"`
}

// BillingPortalConfigurationFeaturesCustomerUpdateParams lets you pass the
// customer update details on a portal configuration.
type BillingPortalConfigurationFeaturesCustomerUpdateParams struct {
AllowedUpdates []*string `form:"allowed_updates"`
Enabled *bool `form:"enabled"`
AllowedUpdates []*string `form:"allowed_updates" json:"allowed_updates"`
Enabled *bool `form:"enabled" json:"enabled"`
}

// BillingPortalConfigurationFeaturesInvoiceHistoryParams lets you pass the
// invoice history details on a portal configuration.
type BillingPortalConfigurationFeaturesInvoiceHistoryParams struct {
Enabled *bool `form:"enabled"`
Enabled *bool `form:"enabled" json:"enabled"`
}

// BillingPortalConfigurationFeaturesPaymentMethodUpdateParams lets you pass
// the payment method update details on a portal configuration.
type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams struct {
Enabled *bool `form:"enabled"`
Enabled *bool `form:"enabled" json:"enabled"`
}

// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams struct {
Enabled *bool `form:"enabled"`
Options []*string `form:"options"`
Enabled *bool `form:"enabled" json:"enabled"`
Options []*string `form:"options" json:"options"`
}

// BillingPortalConfigurationFeaturesSubscriptionCancelParams lets you pass the
// subscription cancel deetails on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionCancelParams struct {
CancellationReason *BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams `form:"cancellation_reason"`
Enabled *bool `form:"enabled"`
Mode *string `form:"mode"`
ProrationBehavior *string `form:"proration_behavior"`
CancellationReason *BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams `form:"cancellation_reason" json:"cancellation_reason"`
Enabled *bool `form:"enabled" json:"enabled"`
Mode *string `form:"mode" json:"mode"`
ProrationBehavior *string `form:"proration_behavior" json:"proration_behavior"`
}

// BillingPortalConfigurationFeaturesSubscriptionPauseParams lets you pass details on the
// subscription pause on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionPauseParams struct {
Enabled *bool `form:"enabled"`
Enabled *bool `form:"enabled" json:"enabled"`
}

// BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams lets you
// pass product details on the subscription update on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams struct {
Prices []*string `form:"prices"`
Product *string `form:"product"`
Prices []*string `form:"prices" json:"prices"`
Product *string `form:"product" json:"product"`
}

// BillingPortalConfigurationFeaturesSubscriptionUpdateParams lets you pass
// subscription update details on a portal configuration.
type BillingPortalConfigurationFeaturesSubscriptionUpdateParams struct {
DefaultAllowedUpdates []*string `form:"default_allowed_updates"`
Enabled *bool `form:"enabled"`
Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams `form:"products"`
ProrationBehavior *string `form:"proration_behavior"`
DefaultAllowedUpdates []*string `form:"default_allowed_updates" json:"default_allowed_updates"`
Enabled *bool `form:"enabled" json:"enabled"`
Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams `form:"products" json:"products"`
ProrationBehavior *string `form:"proration_behavior" json:"proration_behavior"`
}

// BillingPortalConfigurationFeaturesParams lets you pass details about the
// features available in the portal.
type BillingPortalConfigurationFeaturesParams struct {
CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdateParams `form:"customer_update"`
InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistoryParams `form:"invoice_history"`
PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdateParams `form:"payment_method_update"`
SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancelParams `form:"subscription_cancel"`
SubscriptionPause *BillingPortalConfigurationFeaturesSubscriptionPauseParams `form:"subscription_pause"`
SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdateParams `form:"subscription_update"`
CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdateParams `form:"customer_update" json:"customer_update"`
InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistoryParams `form:"invoice_history" json:"invoice_history"`
PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdateParams `form:"payment_method_update" json:"payment_method_update"`
SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancelParams `form:"subscription_cancel" json:"subscription_cancel"`
SubscriptionPause *BillingPortalConfigurationFeaturesSubscriptionPauseParams `form:"subscription_pause" json:"subscription_pause"`
SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdateParams `form:"subscription_update" json:"subscription_update"`
}

// BillingPortalConfigurationParams is the set of parameters that can be passed
// when creating or updating a portal configuration.
type BillingPortalConfigurationParams struct {
Params `form:"*"`
Active *bool `form:"active"`
BusinessProfile *BillingPortalConfigurationBusinessProfileParams `form:"business_profile"`
DefaultReturnURL *string `form:"default_return_url"`
Features *BillingPortalConfigurationFeaturesParams `form:"features"`
Params `form:"*" json:"*"`
Active *bool `form:"active" json:"active"`
BusinessProfile *BillingPortalConfigurationBusinessProfileParams `form:"business_profile" json:"business_profile"`
DefaultReturnURL *string `form:"default_return_url" json:"default_return_url"`
Features *BillingPortalConfigurationFeaturesParams `form:"features" json:"features"`
}

// BillingPortalConfiguration is a configuration that describes the
Expand Down
12 changes: 6 additions & 6 deletions billingportal_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import "encoding/json"

// BillingPortalSessionParams is the set of parameters that can be used when creating a billing portal session.
type BillingPortalSessionParams struct {
Params `form:"*"`
Configuration *string `form:"configuration"`
Customer *string `form:"customer"`
Locale *string `form:"locale"`
OnBehalfOf *string `form:"on_behalf_of"`
ReturnURL *string `form:"return_url"`
Params `form:"*" json:"*"`
Configuration *string `form:"configuration" json:"configuration"`
Customer *string `form:"customer" json:"customer"`
Locale *string `form:"locale" json:"locale"`
OnBehalfOf *string `form:"on_behalf_of" json:"on_behalf_of"`
ReturnURL *string `form:"return_url" json:"return_url"`
}

// BillingPortalSession is the resource representing a billing portal session.
Expand Down
8 changes: 4 additions & 4 deletions bitcoinreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
// BitcoinReceiverListParams is the set of parameters that can be used when listing BitcoinReceivers.
// For more details see https://stripe.com/docs/api/#list_bitcoin_receivers.
type BitcoinReceiverListParams struct {
ListParams `form:"*" json:"*"`
Active *bool `form:"active" json:"active"`
Filled *bool `form:"filled" json:"filled"`
UncapturedFunds *bool `form:"uncaptured_funds" json:"uncaptured_funds"`
ListParams `form:"*" json:"*" json:"*" json:"*"`
Active *bool `form:"active" json:"active" json:"active" json:"active"`
Filled *bool `form:"filled" json:"filled" json:"filled" json:"filled"`
UncapturedFunds *bool `form:"uncaptured_funds" json:"uncaptured_funds" json:"uncaptured_funds" json:"uncaptured_funds"`
}

// BitcoinReceiver is the resource representing a Stripe bitcoin receiver.
Expand Down
6 changes: 3 additions & 3 deletions bitcointransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import "encoding/json"

// BitcoinTransactionListParams is the set of parameters that can be used when listing BitcoinTransactions.
type BitcoinTransactionListParams struct {
ListParams `form:"*" json:"*"`
Customer *string `form:"customer" json:"customer"`
Receiver *string `form:"-" json:"-"` // Sent in with the URL
ListParams `form:"*" json:"*" json:"*" json:"*"`
Customer *string `form:"customer" json:"customer" json:"customer" json:"customer"`
Receiver *string `form:"-" json:"-" json:"-" json:"-"` // Sent in with the URL
}

// BitcoinTransactionList is a list object for BitcoinTransactions.
Expand Down
Loading

0 comments on commit f67b434

Please sign in to comment.