@@ -75,11 +75,7 @@ func (c *Client) UpdateDispute(ctx context.Context, disputeId string, params *Up
75
75
if err != nil {
76
76
return err
77
77
}
78
- if err = c .SendWithAuth (req , nil ); err != nil {
79
- return err
80
- }
81
-
82
- return nil
78
+ return c .SendWithAuth (req , nil )
83
79
}
84
80
85
81
// Provides evidence for a dispute, by ID
@@ -90,11 +86,7 @@ func (c *Client) DisputeProvideEvidence(ctx context.Context, disputeId string, p
90
86
if err != nil {
91
87
return err
92
88
}
93
- if err = c .SendWithAuth (req , nil ); err != nil {
94
- return err
95
- }
96
-
97
- return nil
89
+ return c .SendWithAuth (req , nil )
98
90
}
99
91
100
92
// Appeals a dispute, by ID
@@ -105,11 +97,7 @@ func (c *Client) DisputeAppeal(ctx context.Context, disputeId string, params *Di
105
97
if err != nil {
106
98
return err
107
99
}
108
- if err = c .SendWithAuth (req , nil ); err != nil {
109
- return err
110
- }
111
-
112
- return nil
100
+ return c .SendWithAuth (req , nil )
113
101
}
114
102
115
103
// Accepts liability for a claim, by ID
@@ -120,11 +108,7 @@ func (c *Client) DisputeAcceptClaim(ctx context.Context, disputeId string, param
120
108
if err != nil {
121
109
return err
122
110
}
123
- if err = c .SendWithAuth (req , nil ); err != nil {
124
- return err
125
- }
126
-
127
- return nil
111
+ return c .SendWithAuth (req , nil )
128
112
}
129
113
130
114
// Settles a dispute in either the customer's or merchant's favor.
@@ -135,11 +119,7 @@ func (c *Client) SettleDispute(ctx context.Context, disputeId string, adjudicate
135
119
if err != nil {
136
120
return err
137
121
}
138
- if err = c .SendWithAuth (req , nil ); err != nil {
139
- return err
140
- }
141
-
142
- return nil
122
+ return c .SendWithAuth (req , nil )
143
123
}
144
124
145
125
// Updates the status of a dispute, by ID
@@ -151,11 +131,7 @@ func (c *Client) DisputeUpdateStatus(ctx context.Context, disputeId string, adju
151
131
if err != nil {
152
132
return err
153
133
}
154
- if err = c .SendWithAuth (req , nil ); err != nil {
155
- return err
156
- }
157
-
158
- return nil
134
+ return c .SendWithAuth (req , nil )
159
135
}
160
136
161
137
// Escalates the dispute, by ID
@@ -166,11 +142,7 @@ func (c *Client) DisputeEscalateToClaim(ctx context.Context, disputeId string, n
166
142
if err != nil {
167
143
return err
168
144
}
169
- if err = c .SendWithAuth (req , nil ); err != nil {
170
- return err
171
- }
172
-
173
- return nil
145
+ return c .SendWithAuth (req , nil )
174
146
}
175
147
176
148
// Sends a message about a dispute, by ID, to the other party in the dispute.
@@ -181,11 +153,7 @@ func (c *Client) DisputeSendMessageToOtherParty(ctx context.Context, disputeId s
181
153
if err != nil {
182
154
return err
183
155
}
184
- if err = c .SendWithAuth (req , nil ); err != nil {
185
- return err
186
- }
187
-
188
- return nil
156
+ return c .SendWithAuth (req , nil )
189
157
}
190
158
191
159
// Makes an offer to the other party to resolve a dispute, by ID
@@ -196,11 +164,7 @@ func (c *Client) DisputeMakeOffer(ctx context.Context, disputeId string, params
196
164
if err != nil {
197
165
return err
198
166
}
199
- if err = c .SendWithAuth (req , nil ); err != nil {
200
- return err
201
- }
202
-
203
- return nil
167
+ return c .SendWithAuth (req , nil )
204
168
}
205
169
206
170
// The customer accepts the offer from merchant to resolve a dispute, by ID
@@ -211,11 +175,7 @@ func (c *Client) DisputeAcceptOffer(ctx context.Context, disputeId string, note
211
175
if err != nil {
212
176
return err
213
177
}
214
- if err = c .SendWithAuth (req , nil ); err != nil {
215
- return err
216
- }
217
-
218
- return nil
178
+ return c .SendWithAuth (req , nil )
219
179
}
220
180
221
181
// Denies an offer that the merchant proposes for a dispute, by ID.
@@ -226,11 +186,7 @@ func (c *Client) DisputeDenyOffer(ctx context.Context, disputeId string, note st
226
186
if err != nil {
227
187
return err
228
188
}
229
- if err = c .SendWithAuth (req , nil ); err != nil {
230
- return err
231
- }
232
-
233
- return nil
189
+ return c .SendWithAuth (req , nil )
234
190
}
235
191
236
192
// Acknowledges that the customer returned an item for a dispute, by ID.
@@ -241,11 +197,7 @@ func (c *Client) DisputeAcknowledgeReturnItem(ctx context.Context, disputeId str
241
197
if err != nil {
242
198
return err
243
199
}
244
- if err = c .SendWithAuth (req , nil ); err != nil {
245
- return err
246
- }
247
-
248
- return nil
200
+ return c .SendWithAuth (req , nil )
249
201
}
250
202
251
203
// Provides supporting information for a dispute, by ID.
@@ -256,9 +208,5 @@ func (c *Client) DisputeProvideSupportingInfo(ctx context.Context, disputeId str
256
208
if err != nil {
257
209
return err
258
210
}
259
- if err = c .SendWithAuth (req , nil ); err != nil {
260
- return err
261
- }
262
-
263
- return nil
211
+ return c .SendWithAuth (req , nil )
264
212
}
0 commit comments