File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2179,9 +2179,11 @@ func (config InvoiceLinkConfig) params() (Params, error) {
21792179 params .AddNonZero ("subscription_period" , config .SubscriptionPeriod )
21802180 params .AddNonEmpty ("provider_token" , config .ProviderToken )
21812181 params .AddNonZero ("max_tip_amount" , config .MaxTipAmount )
2182- err = params .AddInterface ("suggested_tip_amounts" , config .SuggestedTipAmounts )
2183- if err != nil {
2184- return params , err
2182+ if len (config .SuggestedTipAmounts ) > 0 {
2183+ err := params .AddInterface ("suggested_tip_amounts" , config .SuggestedTipAmounts )
2184+ if err != nil {
2185+ return params , err
2186+ }
21852187 }
21862188 params .AddNonEmpty ("provider_data" , config .ProviderData )
21872189 params .AddNonEmpty ("photo_url" , config .PhotoURL )
@@ -2196,7 +2198,7 @@ func (config InvoiceLinkConfig) params() (Params, error) {
21962198 params .AddBool ("send_email_to_provider" , config .SendEmailToProvider )
21972199 params .AddBool ("is_flexible" , config .IsFlexible )
21982200
2199- return params , err
2201+ return params , nil
22002202}
22012203
22022204func (config InvoiceLinkConfig ) method () string {
You can’t perform that action at this time.
0 commit comments