equal
deleted
inserted
replaced
8 |
8 |
9 import ( |
9 import ( |
10 "fmt" |
10 "fmt" |
11 "strconv" |
11 "strconv" |
12 |
12 |
|
13 "github.com/pkg/errors" |
13 "github.com/sendgrid/rest" |
14 "github.com/sendgrid/rest" |
14 ) |
15 ) |
15 |
16 |
16 // updateStatusOptions contains option fields for POST and DELETE API calls |
17 // updateStatusOptions contains option fields for POST and DELETE API calls |
17 type updateStatusOptions struct { |
18 type updateStatusOptions struct { |
95 // Okay |
96 // Okay |
96 default: |
97 default: |
97 return ErrInvalidParameter |
98 return ErrInvalidParameter |
98 } |
99 } |
99 if len(opts.MediaIDs) > 4 { |
100 if len(opts.MediaIDs) > 4 { |
100 return fmt.Errorf("too many (>4) media IDs") |
101 return errors.New("too many (>4) media IDs") |
101 } |
102 } |
102 case "delete": |
103 case "delete": |
103 method = rest.Delete |
104 method = rest.Delete |
104 if opts.ID < 1 { |
105 if opts.ID < 1 { |
105 return ErrInvalidID |
106 return ErrInvalidID |