Skip to content

Commit c4e8c3b

Browse files
committed
Merge branch 'master' into HEAD
* Reapply form-to-json tagging * Bump version number to append an omni component
2 parents a8d706b + ac02233 commit c4e8c3b

File tree

6 files changed

+88
-88
lines changed

6 files changed

+88
-88
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
60.13.0
1+
60.13.0-omni.1

card.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,27 @@ const cardSource = "source"
7272
// cards have some unusual logic on creates that necessitates manual handling
7373
// of all parameters. See AppendToAsCardSourceOrExternalAccount.
7474
type CardParams struct {
75-
Params `form:"*"`
76-
Account *string `form:"-"`
77-
AddressCity *string `form:"address_city"`
78-
AddressCountry *string `form:"address_country"`
79-
AddressLine1 *string `form:"address_line1"`
80-
AddressLine2 *string `form:"address_line2"`
81-
AddressState *string `form:"address_state"`
82-
AddressZip *string `form:"address_zip"`
83-
CVC *string `form:"cvc"`
84-
Currency *string `form:"currency"`
85-
Customer *string `form:"-"`
86-
DefaultForCurrency *bool `form:"default_for_currency"`
87-
ExpMonth *string `form:"exp_month"`
88-
ExpYear *string `form:"exp_year"`
89-
Name *string `form:"name"`
90-
Number *string `form:"number"`
91-
Recipient *string `form:"-"`
92-
Token *string `form:"-"`
75+
Params `form:"*" json:"*"`
76+
Account *string `form:"-" json:"-"`
77+
AddressCity *string `form:"address_city" json:"address_city"`
78+
AddressCountry *string `form:"address_country" json:"address_country"`
79+
AddressLine1 *string `form:"address_line1" json:"address_line1"`
80+
AddressLine2 *string `form:"address_line2" json:"address_line2"`
81+
AddressState *string `form:"address_state" json:"address_state"`
82+
AddressZip *string `form:"address_zip" json:"address_zip"`
83+
CVC *string `form:"cvc" json:"cvc"`
84+
Currency *string `form:"currency" json:"currency"`
85+
Customer *string `form:"-" json:"-"`
86+
DefaultForCurrency *bool `form:"default_for_currency" json:"default_for_currency"`
87+
ExpMonth *string `form:"exp_month" json:"exp_month"`
88+
ExpYear *string `form:"exp_year" json:"exp_year"`
89+
Name *string `form:"name" json:"name"`
90+
Number *string `form:"number" json:"number"`
91+
Recipient *string `form:"-" json:"-"`
92+
Token *string `form:"-" json:"-"`
9393

9494
// ID is used when tokenizing a card for shared customers
95-
ID string `form:"*"`
95+
ID string `form:"*" json:"*"`
9696
}
9797

9898
// AppendToAsCardSourceOrExternalAccount appends the given CardParams as either a

customer.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,33 @@ const (
3535
// CustomerParams is the set of parameters that can be used when creating or updating a customer.
3636
// For more details see https://stripe.com/docs/api#create_customer and https://stripe.com/docs/api#update_customer.
3737
type CustomerParams struct {
38-
Params `form:"*"`
39-
AccountBalance *int64 `form:"account_balance"`
40-
Address *AddressParams `form:"address"`
41-
Coupon *string `form:"coupon"`
42-
DefaultSource *string `form:"default_source"`
43-
Description *string `form:"description"`
44-
Email *string `form:"email"`
45-
InvoicePrefix *string `form:"invoice_prefix"`
46-
InvoiceSettings *CustomerInvoiceSettingsParams `form:"invoice_settings"`
47-
Name *string `form:"name"`
48-
PaymentMethod *string `form:"payment_method"`
49-
Phone *string `form:"phone"`
50-
PreferredLocales []*string `form:"preferred_locales"`
51-
Shipping *CustomerShippingDetailsParams `form:"shipping"`
52-
Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*"
53-
TaxExempt *string `form:"tax_exempt"`
54-
TaxIDData []*CustomerTaxIDDataParams `form:"tax_id_data"`
55-
Token *string `form:"-"` // This doesn't seem to be used?
38+
Params `form:"*" json:"*"`
39+
AccountBalance *int64 `form:"account_balance" json:"account_balance"`
40+
Address *AddressParams `form:"address" json:"address"`
41+
Coupon *string `form:"coupon" json:"coupon"`
42+
DefaultSource *string `form:"default_source" json:"default_source"`
43+
Description *string `form:"description" json:"description"`
44+
Email *string `form:"email" json:"email"`
45+
InvoicePrefix *string `form:"invoice_prefix" json:"invoice_prefix"`
46+
InvoiceSettings *CustomerInvoiceSettingsParams `form:"invoice_settings" json:"invoice_settings"`
47+
Name *string `form:"name" json:"name"`
48+
PaymentMethod *string `form:"payment_method" json:"payment_method"`
49+
Phone *string `form:"phone" json:"phone"`
50+
PreferredLocales []*string `form:"preferred_locales" json:"preferred_locales"`
51+
Shipping *CustomerShippingDetailsParams `form:"shipping" json:"shipping"`
52+
Source *SourceParams `form:"*" json:"*"` // SourceParams has custom encoding so brought to top level with "*"
53+
TaxExempt *string `form:"tax_exempt" json:"tax_exempt"`
54+
TaxIDData []*CustomerTaxIDDataParams `form:"tax_id_data" json:"tax_id_data"`
55+
Token *string `form:"-" json:"-"` // This doesn't seem to be used?
5656

5757
// The following parameter is deprecated. Use TaxIDData instead.
58-
TaxInfo *CustomerTaxInfoParams `form:"tax_info"`
58+
TaxInfo *CustomerTaxInfoParams `form:"tax_info" json:"tax_info"`
5959

6060
// The parameters below are considered deprecated. Consider creating a Subscription separately instead.
61-
Plan *string `form:"plan"`
62-
Quantity *int64 `form:"quantity"`
63-
TaxPercent *float64 `form:"tax_percent"`
64-
TrialEnd *int64 `form:"trial_end"`
61+
Plan *string `form:"plan" json:"plan"`
62+
Quantity *int64 `form:"quantity" json:"quantity"`
63+
TaxPercent *float64 `form:"tax_percent" json:"tax_percent"`
64+
TrialEnd *int64 `form:"trial_end" json:"trial_end"`
6565
}
6666

6767
// CustomerInvoiceCustomFieldParams represents the parameters associated with one custom field on

product.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ type PackageDimensionsParams struct {
2222

2323
// ProductParams is the set of parameters that can be used when creating or updating a product.
2424
type ProductParams struct {
25-
Params `form:"*"`
26-
Active *bool `form:"active"`
27-
Attributes []*string `form:"attributes"`
28-
Caption *string `form:"caption"`
29-
DeactivateOn []*string `form:"deactivate_on"`
30-
Description *string `form:"description"`
31-
ID *string `form:"id"`
32-
Images []*string `form:"images"`
33-
Name *string `form:"name"`
34-
PackageDimensions *PackageDimensionsParams `form:"package_dimensions"`
35-
Shippable *bool `form:"shippable"`
36-
StatementDescriptor *string `form:"statement_descriptor"`
37-
Type *string `form:"type"`
38-
UnitLabel *string `form:"unit_label"`
39-
URL *string `form:"url"`
25+
Params `form:"*" json:"*"`
26+
Active *bool `form:"active" json:"active"`
27+
Attributes []*string `form:"attributes" json:"attributes"`
28+
Caption *string `form:"caption" json:"caption"`
29+
DeactivateOn []*string `form:"deactivate_on" json:"deactivate_on"`
30+
Description *string `form:"description" json:"description"`
31+
ID *string `form:"id" json:"id"`
32+
Images []*string `form:"images" json:"images"`
33+
Name *string `form:"name" json:"name"`
34+
PackageDimensions *PackageDimensionsParams `form:"package_dimensions" json:"package_dimensions"`
35+
Shippable *bool `form:"shippable" json:"shippable"`
36+
StatementDescriptor *string `form:"statement_descriptor" json:"statement_descriptor"`
37+
Type *string `form:"type" json:"type"`
38+
UnitLabel *string `form:"unit_label" json:"unit_label"`
39+
URL *string `form:"url" json:"url"`
4040
}
4141

4242
// PackageDimensions represents the dimension of a product or a SKU from the

stripe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ func StringSlice(v []string) []*string {
862862
const apiURL = "https://api.stripe.com"
863863

864864
// clientversion is the binding version
865-
const clientversion = "60.13.0"
865+
const clientversion = "60.13.0-omni.1"
866866

867867
// defaultHTTPTimeout is the default timeout on the http.Client used by the library.
868868
// This is chosen to be consistent with the other Stripe language libraries and

sub.go

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,37 +38,37 @@ type SubscriptionTransferDataParams struct {
3838
// SubscriptionParams is the set of parameters that can be used when creating or updating a subscription.
3939
// For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription.
4040
type SubscriptionParams struct {
41-
Params `form:"*"`
42-
ApplicationFeePercent *float64 `form:"application_fee_percent"`
43-
BackdateStartDate *int64 `form:"backdate_start_date"`
44-
Billing *string `form:"billing"`
45-
BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`
46-
BillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo
47-
BillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo
48-
BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"`
49-
CancelAt *int64 `form:"cancel_at"`
50-
CancelAtPeriodEnd *bool `form:"cancel_at_period_end"`
51-
Card *CardParams `form:"card"`
52-
Coupon *string `form:"coupon"`
53-
Customer *string `form:"customer"`
54-
DaysUntilDue *int64 `form:"days_until_due"`
55-
DefaultPaymentMethod *string `form:"default_payment_method"`
56-
DefaultSource *string `form:"default_source"`
57-
DefaultTaxRates []*string `form:"default_tax_rates"`
58-
Items []*SubscriptionItemsParams `form:"items"`
59-
OnBehalfOf *string `form:"on_behalf_of"`
60-
Plan *string `form:"plan"`
61-
Prorate *bool `form:"prorate"`
62-
ProrationDate *int64 `form:"proration_date"`
63-
Quantity *int64 `form:"quantity"`
64-
TrialEnd *int64 `form:"trial_end"`
65-
TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
66-
TrialEndNow *bool `form:"-"` // See custom AppendTo
67-
TrialFromPlan *bool `form:"trial_from_plan"`
68-
TrialPeriodDays *int64 `form:"trial_period_days"`
41+
Params `form:"*" json:"*"`
42+
ApplicationFeePercent *float64 `form:"application_fee_percent" json:"application_fee_percent"`
43+
BackdateStartDate *int64 `form:"backdate_start_date" json:"backdate_start_date"`
44+
Billing *string `form:"billing" json:"billing"`
45+
BillingCycleAnchor *int64 `form:"billing_cycle_anchor" json:"billing_cycle_anchor"`
46+
BillingCycleAnchorNow *bool `form:"-" json:"-"` // See custom AppendTo
47+
BillingCycleAnchorUnchanged *bool `form:"-" json:"-"` // See custom AppendTo
48+
BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds" json:"billing_thresholds"`
49+
CancelAt *int64 `form:"cancel_at" json:"cancel_at"`
50+
CancelAtPeriodEnd *bool `form:"cancel_at_period_end" json:"cancel_at_period_end"`
51+
Card *CardParams `form:"card" json:"card"`
52+
Coupon *string `form:"coupon" json:"coupon"`
53+
Customer *string `form:"customer" json:"customer"`
54+
DaysUntilDue *int64 `form:"days_until_due" json:"days_until_due"`
55+
DefaultPaymentMethod *string `form:"default_payment_method" json:"default_payment_method"`
56+
DefaultSource *string `form:"default_source" json:"default_source"`
57+
DefaultTaxRates []*string `form:"default_tax_rates" json:"default_tax_rates"`
58+
Items []*SubscriptionItemsParams `form:"items" json:"items"`
59+
OnBehalfOf *string `form:"on_behalf_of" json:"on_behalf_of"`
60+
Plan *string `form:"plan" json:"plan"`
61+
Prorate *bool `form:"prorate" json:"prorate"`
62+
ProrationDate *int64 `form:"proration_date" json:"proration_date"`
63+
Quantity *int64 `form:"quantity" json:"quantity"`
64+
TrialEnd *int64 `form:"trial_end" json:"trial_end"`
65+
TransferData *SubscriptionTransferDataParams `form:"transfer_data" json:"transfer_data"`
66+
TrialEndNow *bool `form:"-" json:"-"` // See custom AppendTo
67+
TrialFromPlan *bool `form:"trial_from_plan" json:"trial_from_plan"`
68+
TrialPeriodDays *int64 `form:"trial_period_days" json:"trial_period_days"`
6969

7070
// This parameter is deprecated and we recommend that you use TaxRates instead.
71-
TaxPercent *float64 `form:"tax_percent"`
71+
TaxPercent *float64 `form:"tax_percent" json:"tax_percent"`
7272
}
7373

7474
// SubscriptionBillingThresholdsParams is a structure representing the parameters allowed to control

0 commit comments

Comments
 (0)