|
2 | 2 | #import "QueryParamCollection.h"
|
3 | 3 | #import "ApiClient.h"
|
4 | 4 | #import "CommonResponseError.h"
|
5 |
| -#import "CreditcardmerchantCreateObjectV1Request.h" |
6 |
| -#import "CreditcardmerchantCreateObjectV1Response.h" |
7 |
| -#import "CreditcardmerchantDeleteObjectV1Response.h" |
8 |
| -#import "CreditcardmerchantEditObjectV1Request.h" |
9 |
| -#import "CreditcardmerchantEditObjectV1Response.h" |
10 | 5 | #import "CreditcardmerchantGetAutocompleteV2Response.h"
|
11 | 6 | #import "CreditcardmerchantGetListV1Response.h"
|
12 | 7 | #import "CreditcardmerchantGetObjectV2Response.h"
|
@@ -58,223 +53,6 @@ -(NSDictionary *)defaultHeaders {
|
58 | 53 |
|
59 | 54 | #pragma mark - Api Methods
|
60 | 55 |
|
61 |
| -/// |
62 |
| -/// Create a new Creditcardmerchant |
63 |
| -/// The endpoint allows to create one or many elements at once. |
64 |
| -/// @param creditcardmerchantCreateObjectV1Request |
65 |
| -/// |
66 |
| -/// @returns CreditcardmerchantCreateObjectV1Response* |
67 |
| -/// |
68 |
| --(NSURLSessionTask*) creditcardmerchantCreateObjectV1WithCreditcardmerchantCreateObjectV1Request: (CreditcardmerchantCreateObjectV1Request*) creditcardmerchantCreateObjectV1Request |
69 |
| - completionHandler: (void (^)(CreditcardmerchantCreateObjectV1Response* output, NSError* error)) handler { |
70 |
| - // verify the required parameter 'creditcardmerchantCreateObjectV1Request' is set |
71 |
| - if (creditcardmerchantCreateObjectV1Request == nil) { |
72 |
| - NSParameterAssert(creditcardmerchantCreateObjectV1Request); |
73 |
| - if(handler) { |
74 |
| - NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"creditcardmerchantCreateObjectV1Request"] }; |
75 |
| - NSError* error = [NSError errorWithDomain:kObjectCreditcardmerchantApiErrorDomain code:kObjectCreditcardmerchantApiMissingParamErrorCode userInfo:userInfo]; |
76 |
| - handler(nil, error); |
77 |
| - } |
78 |
| - return nil; |
79 |
| - } |
80 |
| - |
81 |
| - NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/1/object/creditcardmerchant"]; |
82 |
| - |
83 |
| - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; |
84 |
| - |
85 |
| - NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; |
86 |
| - NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; |
87 |
| - [headerParams addEntriesFromDictionary:self.defaultHeaders]; |
88 |
| - // HTTP header `Accept` |
89 |
| - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]]; |
90 |
| - if(acceptHeader.length > 0) { |
91 |
| - headerParams[@"Accept"] = acceptHeader; |
92 |
| - } |
93 |
| - |
94 |
| - // response content type |
95 |
| - NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; |
96 |
| - |
97 |
| - // request content type |
98 |
| - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; |
99 |
| - |
100 |
| - // Authentication setting |
101 |
| - NSArray *authSettings = @[@"Authorization"]; |
102 |
| - |
103 |
| - id bodyParam = nil; |
104 |
| - NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; |
105 |
| - NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; |
106 |
| - bodyParam = creditcardmerchantCreateObjectV1Request; |
107 |
| - |
108 |
| - return [self.apiClient requestWithPath: resourcePath |
109 |
| - method: @"POST" |
110 |
| - pathParams: pathParams |
111 |
| - queryParams: queryParams |
112 |
| - formParams: formParams |
113 |
| - files: localVarFiles |
114 |
| - body: bodyParam |
115 |
| - headerParams: headerParams |
116 |
| - authSettings: authSettings |
117 |
| - requestContentType: requestContentType |
118 |
| - responseContentType: responseContentType |
119 |
| - responseType: @"CreditcardmerchantCreateObjectV1Response*" |
120 |
| - completionBlock: ^(id data, NSError *error) { |
121 |
| - if(handler) { |
122 |
| - handler((CreditcardmerchantCreateObjectV1Response*)data, error); |
123 |
| - } |
124 |
| - }]; |
125 |
| -} |
126 |
| - |
127 |
| -/// |
128 |
| -/// Delete an existing Creditcardmerchant |
129 |
| -/// |
130 |
| -/// @param pkiCreditcardmerchantID The unique ID of the Creditcardmerchant |
131 |
| -/// |
132 |
| -/// @returns CreditcardmerchantDeleteObjectV1Response* |
133 |
| -/// |
134 |
| --(NSURLSessionTask*) creditcardmerchantDeleteObjectV1WithPkiCreditcardmerchantID: (NSNumber*) pkiCreditcardmerchantID |
135 |
| - completionHandler: (void (^)(CreditcardmerchantDeleteObjectV1Response* output, NSError* error)) handler { |
136 |
| - // verify the required parameter 'pkiCreditcardmerchantID' is set |
137 |
| - if (pkiCreditcardmerchantID == nil) { |
138 |
| - NSParameterAssert(pkiCreditcardmerchantID); |
139 |
| - if(handler) { |
140 |
| - NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"pkiCreditcardmerchantID"] }; |
141 |
| - NSError* error = [NSError errorWithDomain:kObjectCreditcardmerchantApiErrorDomain code:kObjectCreditcardmerchantApiMissingParamErrorCode userInfo:userInfo]; |
142 |
| - handler(nil, error); |
143 |
| - } |
144 |
| - return nil; |
145 |
| - } |
146 |
| - |
147 |
| - NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/1/object/creditcardmerchant/{pkiCreditcardmerchantID}"]; |
148 |
| - |
149 |
| - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; |
150 |
| - if (pkiCreditcardmerchantID != nil) { |
151 |
| - pathParams[@"pkiCreditcardmerchantID"] = pkiCreditcardmerchantID; |
152 |
| - } |
153 |
| - |
154 |
| - NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; |
155 |
| - NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; |
156 |
| - [headerParams addEntriesFromDictionary:self.defaultHeaders]; |
157 |
| - // HTTP header `Accept` |
158 |
| - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]]; |
159 |
| - if(acceptHeader.length > 0) { |
160 |
| - headerParams[@"Accept"] = acceptHeader; |
161 |
| - } |
162 |
| - |
163 |
| - // response content type |
164 |
| - NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; |
165 |
| - |
166 |
| - // request content type |
167 |
| - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; |
168 |
| - |
169 |
| - // Authentication setting |
170 |
| - NSArray *authSettings = @[@"Authorization"]; |
171 |
| - |
172 |
| - id bodyParam = nil; |
173 |
| - NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; |
174 |
| - NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; |
175 |
| - |
176 |
| - return [self.apiClient requestWithPath: resourcePath |
177 |
| - method: @"DELETE" |
178 |
| - pathParams: pathParams |
179 |
| - queryParams: queryParams |
180 |
| - formParams: formParams |
181 |
| - files: localVarFiles |
182 |
| - body: bodyParam |
183 |
| - headerParams: headerParams |
184 |
| - authSettings: authSettings |
185 |
| - requestContentType: requestContentType |
186 |
| - responseContentType: responseContentType |
187 |
| - responseType: @"CreditcardmerchantDeleteObjectV1Response*" |
188 |
| - completionBlock: ^(id data, NSError *error) { |
189 |
| - if(handler) { |
190 |
| - handler((CreditcardmerchantDeleteObjectV1Response*)data, error); |
191 |
| - } |
192 |
| - }]; |
193 |
| -} |
194 |
| - |
195 |
| -/// |
196 |
| -/// Edit an existing Creditcardmerchant |
197 |
| -/// |
198 |
| -/// @param pkiCreditcardmerchantID The unique ID of the Creditcardmerchant |
199 |
| -/// |
200 |
| -/// @param creditcardmerchantEditObjectV1Request |
201 |
| -/// |
202 |
| -/// @returns CreditcardmerchantEditObjectV1Response* |
203 |
| -/// |
204 |
| --(NSURLSessionTask*) creditcardmerchantEditObjectV1WithPkiCreditcardmerchantID: (NSNumber*) pkiCreditcardmerchantID |
205 |
| - creditcardmerchantEditObjectV1Request: (CreditcardmerchantEditObjectV1Request*) creditcardmerchantEditObjectV1Request |
206 |
| - completionHandler: (void (^)(CreditcardmerchantEditObjectV1Response* output, NSError* error)) handler { |
207 |
| - // verify the required parameter 'pkiCreditcardmerchantID' is set |
208 |
| - if (pkiCreditcardmerchantID == nil) { |
209 |
| - NSParameterAssert(pkiCreditcardmerchantID); |
210 |
| - if(handler) { |
211 |
| - NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"pkiCreditcardmerchantID"] }; |
212 |
| - NSError* error = [NSError errorWithDomain:kObjectCreditcardmerchantApiErrorDomain code:kObjectCreditcardmerchantApiMissingParamErrorCode userInfo:userInfo]; |
213 |
| - handler(nil, error); |
214 |
| - } |
215 |
| - return nil; |
216 |
| - } |
217 |
| - |
218 |
| - // verify the required parameter 'creditcardmerchantEditObjectV1Request' is set |
219 |
| - if (creditcardmerchantEditObjectV1Request == nil) { |
220 |
| - NSParameterAssert(creditcardmerchantEditObjectV1Request); |
221 |
| - if(handler) { |
222 |
| - NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"creditcardmerchantEditObjectV1Request"] }; |
223 |
| - NSError* error = [NSError errorWithDomain:kObjectCreditcardmerchantApiErrorDomain code:kObjectCreditcardmerchantApiMissingParamErrorCode userInfo:userInfo]; |
224 |
| - handler(nil, error); |
225 |
| - } |
226 |
| - return nil; |
227 |
| - } |
228 |
| - |
229 |
| - NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/1/object/creditcardmerchant/{pkiCreditcardmerchantID}"]; |
230 |
| - |
231 |
| - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; |
232 |
| - if (pkiCreditcardmerchantID != nil) { |
233 |
| - pathParams[@"pkiCreditcardmerchantID"] = pkiCreditcardmerchantID; |
234 |
| - } |
235 |
| - |
236 |
| - NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; |
237 |
| - NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; |
238 |
| - [headerParams addEntriesFromDictionary:self.defaultHeaders]; |
239 |
| - // HTTP header `Accept` |
240 |
| - NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]]; |
241 |
| - if(acceptHeader.length > 0) { |
242 |
| - headerParams[@"Accept"] = acceptHeader; |
243 |
| - } |
244 |
| - |
245 |
| - // response content type |
246 |
| - NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; |
247 |
| - |
248 |
| - // request content type |
249 |
| - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; |
250 |
| - |
251 |
| - // Authentication setting |
252 |
| - NSArray *authSettings = @[@"Authorization"]; |
253 |
| - |
254 |
| - id bodyParam = nil; |
255 |
| - NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; |
256 |
| - NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; |
257 |
| - bodyParam = creditcardmerchantEditObjectV1Request; |
258 |
| - |
259 |
| - return [self.apiClient requestWithPath: resourcePath |
260 |
| - method: @"PUT" |
261 |
| - pathParams: pathParams |
262 |
| - queryParams: queryParams |
263 |
| - formParams: formParams |
264 |
| - files: localVarFiles |
265 |
| - body: bodyParam |
266 |
| - headerParams: headerParams |
267 |
| - authSettings: authSettings |
268 |
| - requestContentType: requestContentType |
269 |
| - responseContentType: responseContentType |
270 |
| - responseType: @"CreditcardmerchantEditObjectV1Response*" |
271 |
| - completionBlock: ^(id data, NSError *error) { |
272 |
| - if(handler) { |
273 |
| - handler((CreditcardmerchantEditObjectV1Response*)data, error); |
274 |
| - } |
275 |
| - }]; |
276 |
| -} |
277 |
| - |
278 | 56 | ///
|
279 | 57 | /// Retrieve Creditcardmerchants and IDs
|
280 | 58 | /// Get the list of Creditcardmerchant to be used in a dropdown or autocomplete control.
|
|
0 commit comments