• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperwallet / hyperwallet-ios-sdk / 15826401626

21 May 2025 02:36PM UTC coverage: 96.705%. Remained the same
15826401626

push

github

web-flow
Initial commit for CodeQL (#152)

* Initial commit for CodeQL

* Updating language

1937 of 2003 relevant lines covered (96.7%)

18.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.51
/Sources/Model/TransferMethod/HyperwalletBankAccount.swift
1
//
2
// Copyright 2018 - Present Hyperwallet
3
//
4
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5
// and associated documentation files (the "Software"), to deal in the Software without restriction,
6
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
7
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
8
// furnished to do so, subject to the following conditions:
9
//
10
// The above copyright notice and this permission notice shall be included in all copies or
11
// substantial portions of the Software.
12
//
13
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
14
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18

19
import Foundation
20

21
/// Representation of the user's bank account
22
@objcMembers
23
public final class HyperwalletBankAccount: HyperwalletTransferMethod {
24
    override private init(data: [String: AnyCodable]) {
8✔
25
        super.init(data: data)
8✔
26
    }
8✔
27
    /// The required initializer
28
    public required init(from decoder: Decoder) throws {
9✔
29
        try super.init(from: decoder)
9✔
30
    }
9✔
31

32
    /// The bank account holder's street address.
33
    public var addressLine1: String? {
4✔
34
        getField(TransferMethodField.addressLine1.rawValue)
4✔
35
    }
4✔
36

37
    /// The bank account holder's address, second line.
38
    public var addressLine2: String? {
4✔
39
        getField(TransferMethodField.addressLine2.rawValue)
4✔
40
    }
4✔
41

42
    /// The bank account number, IBAN or equivalent. If you are providing an IBAN, the first two
43
    /// letters of the IBAN must match the `transferMethodCountry`
44
    public var bankAccountId: String? {
5✔
45
        getField(TransferMethodField.bankAccountId.rawValue)
5✔
46
    }
5✔
47

48
    /// The purpose of the bank account (e.g. checking, savings, etc).
49
    public var bankAccountPurpose: String? {
5✔
50
        getField(TransferMethodField.bankAccountPurpose.rawValue)
5✔
51
    }
5✔
52

53
    /// The user's relationship with the bank account holder.
54
    public var bankAccountRelationship: String? {
4✔
55
        getField(TransferMethodField.bankAccountRelationship.rawValue)
4✔
56
    }
4✔
57

58
    /// The bank code or equivalent (e.g. BIC/SWIFT code).
59
    public var bankId: String? {
1✔
60
        getField(TransferMethodField.bankId.rawValue)
1✔
61
    }
1✔
62

63
    /// The bank name.
64
    public var bankName: String? {
2✔
65
        getField(TransferMethodField.bankName.rawValue)
2✔
66
    }
2✔
67

68
    /// The branch code, transit number, routing number or equivalent.
69
    public var branchId: String? {
6✔
70
        getField(TransferMethodField.branchId.rawValue)
6✔
71
    }
6✔
72

73
    /// The branch name.
74
    public var branchName: String? {
1✔
75
        getField(TransferMethodField.branchName.rawValue)
1✔
76
    }
1✔
77

78
    /// The bank account holder's role in the organization.
79
    public var businessContactRole: String? {
1✔
80
        getField(TransferMethodField.businessContactRole.rawValue)
1✔
81
    }
1✔
82

83
    /// The name of the bank account holder's business.
84
    public var businessName: String? {
2✔
85
        getField(TransferMethodField.businessName.rawValue)
2✔
86
    }
2✔
87

88
    /// The country where the bank account holder's business is registered.
89
    public var businessRegistrationCountry: String? {
1✔
90
        getField(TransferMethodField.businessRegistrationCountry.rawValue)
1✔
91
    }
1✔
92

93
    /// The bank account holder's business registration number or identifier,
94
    /// as assigned by the relevant government body.
95
    public var businessRegistrationId: String? {
1✔
96
        getField(TransferMethodField.businessRegistrationId.rawValue)
1✔
97
    }
1✔
98

99
    /// The state, province or region where the bank account holder's business is registered.
100
    public var businessRegistrationStateProvince: String? {
1✔
101
        getField(TransferMethodField.businessRegistrationStateProvince.rawValue)
1✔
102
    }
1✔
103

104
    /// The bank account holder's business type.
105
    public var businessType: String? {
1✔
106
        getField(TransferMethodField.businessType.rawValue)
1✔
107
    }
1✔
108

109
    /// The bank account holder's city.
110
    public var city: String? {
4✔
111
        getField(TransferMethodField.city.rawValue)
4✔
112
    }
4✔
113

114
    /// The bank account holder's country.
115
    public var country: String? {
4✔
116
        getField(TransferMethodField.country.rawValue)
4✔
117
    }
4✔
118

119
    /// The bank account holder's birth country.
120
    public var countryOfBirth: String? {
1✔
121
        getField(TransferMethodField.countryOfBirth.rawValue)
1✔
122
    }
1✔
123

124
    /// The bank account holder's nationality country.
125
    public var countryOfNationality: String? {
×
126
        getField(TransferMethodField.countryOfNationality.rawValue)
×
127
    }
×
128

129
    /// The bank account holder's date of birth (All users must be at least 13 years old).
130
    public var dateOfBirth: String? {
3✔
131
        getField(TransferMethodField.dateOfBirth.rawValue)
3✔
132
    }
3✔
133

134
    /// The bank account holder's driver's license number.
135
    public var driversLicenseId: String? {
1✔
136
        getField(TransferMethodField.driversLicenseId.rawValue)
1✔
137
    }
1✔
138

139
    /// The bank account holder's employer identifier, generally used for tax purposes.
140
    public var employerId: String? {
1✔
141
        getField(TransferMethodField.employerId.rawValue)
1✔
142
    }
1✔
143

144
    /// The bank account holder's first name.
145
    public var firstName: String? {
2✔
146
        getField(TransferMethodField.firstName.rawValue)
2✔
147
    }
2✔
148

149
    /// The bank account holder's gender.
150
    public var gender: String? {
1✔
151
        getField(TransferMethodField.gender.rawValue)
1✔
152
    }
1✔
153

154
    /// The bank account holder's government ID number, such as a Social Security Number.
155
    public var governmentId: String? {
1✔
156
        getField(TransferMethodField.governmentId.rawValue)
1✔
157
    }
1✔
158

159
    /// The bank account holder's government ID type.
160
    public var governmentIdType: String? {
×
161
        getField(TransferMethodField.governmentIdType.rawValue)
×
162
    }
×
163

164
    /// The account number at the intermediary bank.
165
    public var intermediaryBankAccountId: String? {
2✔
166
        getField(TransferMethodField.intermediaryBankAccountId.rawValue)
2✔
167
    }
2✔
168

169
    /// The intermediary bank street address.
170
    public var intermediaryBankAddressLine1: String? {
2✔
171
        getField(TransferMethodField.intermediaryBankAddressLine1.rawValue)
2✔
172
    }
2✔
173

174
    /// The intermediary bank street address, second line.
175
    public var intermediaryBankAddressLine2: String? {
2✔
176
        getField(TransferMethodField.intermediaryBankAddressLine2.rawValue)
2✔
177
    }
2✔
178

179
    /// The intermediary bank city.
180
    public var intermediaryBankCity: String? {
2✔
181
        getField(TransferMethodField.intermediaryBankCity.rawValue)
2✔
182
    }
2✔
183

184
    /// The intermediary bank country.
185
    public var intermediaryBankCountry: String? {
2✔
186
        getField(TransferMethodField.intermediaryBankCountry.rawValue)
2✔
187
    }
2✔
188

189
    /// The intermediary bank's 11-character SWIFT code.
190
    public var intermediaryBankId: String? {
2✔
191
        getField(TransferMethodField.intermediaryBankId.rawValue)
2✔
192
    }
2✔
193

194
    /// The intermediary bank name.
195
    public var intermediaryBankName: String? {
2✔
196
        getField(TransferMethodField.intermediaryBankName.rawValue)
2✔
197
    }
2✔
198

199
    /// The intermediary bank postal code.
200
    public var intermediaryBankPostalCode: String? {
2✔
201
        getField(TransferMethodField.intermediaryBankPostalCode.rawValue)
2✔
202
    }
2✔
203

204
    /// The intermediary bank state, province or region.
205
    public var intermediaryBankStateProvince: String? {
2✔
206
        getField(TransferMethodField.intermediaryBankStateProvince.rawValue)
2✔
207
    }
2✔
208

209
    /// The bank account holder's last name.
210
    public var lastName: String? {
2✔
211
        getField(TransferMethodField.lastName.rawValue)
2✔
212
    }
2✔
213

214
    /// The bank account holder's middle name.
215
    public var middleName: String? {
1✔
216
        getField(TransferMethodField.middleName.rawValue)
1✔
217
    }
1✔
218

219
    /// The bank account holder's cell phone number.
220
    public var mobileNumber: String? {
4✔
221
        getField(TransferMethodField.mobileNumber.rawValue)
4✔
222
    }
4✔
223

224
    /// The bank account holder's passport number.
225
    public var passportId: String? {
1✔
226
        getField(TransferMethodField.passportId.rawValue)
1✔
227
    }
1✔
228

229
    /// The bank account holder's phone number.
230
    public var phoneNumber: String? {
4✔
231
        getField(TransferMethodField.phoneNumber.rawValue)
4✔
232
    }
4✔
233

234
    /// The bank account holder's postal code.
235
    public var postalCode: String? {
4✔
236
        getField(TransferMethodField.postalCode.rawValue)
4✔
237
    }
4✔
238

239
    /// The bank account holder's state, province or region.
240
    public var stateProvince: String? {
4✔
241
        getField(TransferMethodField.stateProvince.rawValue)
4✔
242
    }
4✔
243

244
    /// The wire transfer instructions
245
    public var wireInstructions: String? {
2✔
246
        getField(TransferMethodField.wireInstructions.rawValue)
2✔
247
    }
2✔
248

249
    /// A helper class to build the `HyperwalletBankAccount` instance.
250
    public final class Builder {
251
        private var storage = [String: AnyCodable]()
8✔
252

253
        /// Creates a new instance of the `HyperwalletBankAccount.Builder` based on the required parameter to update
254
        /// Bank account.
255
        ///
256
        /// - Parameter token: The unique, auto-generated user identifier. Max 64 characters, prefixed with "usr-".
257
        public init(token: String) {
2✔
258
            storage[TransferMethodField.token.rawValue] = AnyCodable(value: token)
2✔
259
        }
2✔
260

261
        /// Creates a new instance of the `HyperwalletBankAccount.Builder` based on the required parameters to create
262
        /// Bank account.
263
        ///
264
        /// - Parameters:
265
        ///   - transferMethodCountry: The bank account country.
266
        ///   - transferMethodCurrency: The bank account currency.
267
        ///   - transferMethodProfileType: The bank account holder's profile type, e.g. INDIVIDUAL or BUSINESS
268
        ///   - transferMethodType: The bank account type, e.g. BANK_ACCOUNT or WIRE_ACCOUNT
269
        public init(transferMethodCountry: String,
270
                    transferMethodCurrency: String,
271
                    transferMethodProfileType: String,
272
                    transferMethodType: String) {
6✔
273
            storage[TransferMethodField.type.rawValue] = AnyCodable(value: transferMethodType)
6✔
274
            storage[TransferMethodField.transferMethodCountry.rawValue] = AnyCodable(value: transferMethodCountry)
6✔
275
            storage[TransferMethodField.transferMethodCurrency.rawValue] = AnyCodable(value: transferMethodCurrency)
6✔
276
            storage[TransferMethodField.profileType.rawValue] = AnyCodable(value: transferMethodProfileType)
6✔
277
        }
6✔
278

279
        /// Sets the bank account holder's street address.
280
        ///
281
        /// - Parameter addressLine1: The bank account holder's street address.
282
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
283
        public func addressLine1(_ addressLine1: String) -> Builder {
4✔
284
            storage[TransferMethodField.addressLine1.rawValue] = AnyCodable(value: addressLine1)
4✔
285
            return self
4✔
286
        }
4✔
287

288
        /// Sets the bank account holder's address, second line.
289
        ///
290
        /// - Parameter addressLine2: The bank account holder's address, second line.
291
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
292
        public func addressLine2(_ addressLine2: String) -> Builder {
4✔
293
            storage[TransferMethodField.addressLine2.rawValue] = AnyCodable(value: addressLine2)
4✔
294
            return self
4✔
295
        }
4✔
296

297
        /// Sets the bank account number, IBAN or equivalent. If you are providing an IBAN, the first two
298
        /// letters of the IBAN must match the `transferMethodCountry`
299
        ///
300
        /// - Parameter bankAccountId: The bank account number, IBAN or equivalent.
301
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
302
        public func bankAccountId(_ bankAccountId: String) -> Builder {
6✔
303
            storage[TransferMethodField.bankAccountId.rawValue] = AnyCodable(value: bankAccountId)
6✔
304
            return self
6✔
305
        }
6✔
306

307
        /// Sets the purpose of the bank account (e.g. checking, savings, etc).
308
        ///
309
        /// - Parameter purpose: The `PurposeType`
310
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
311
        public func bankAccountPurpose(_ purpose: String) -> Builder {
6✔
312
            storage[TransferMethodField.bankAccountPurpose.rawValue] = AnyCodable(value: purpose)
6✔
313
            return self
6✔
314
        }
6✔
315

316
        /// Sets the user's relationship with the bank account holder.
317
        ///
318
        /// - Parameter relationship: The `RelationshipType`
319
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
320
        public func bankAccountRelationship(_ relationship: String) -> Builder {
4✔
321
            storage[TransferMethodField.bankAccountRelationship.rawValue] = AnyCodable(value: relationship)
4✔
322
            return self
4✔
323
        }
4✔
324

325
        /// Sets the bank code or equivalent (e.g. BIC/SWIFT code).
326
        ///
327
        /// - Parameter bankId: The bank code or equivalent (e.g. BIC/SWIFT code)
328
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
329
        public func bankId(_ bankId: String) -> Builder {
2✔
330
            storage[TransferMethodField.bankId.rawValue] = AnyCodable(value: bankId)
2✔
331
            return self
2✔
332
        }
2✔
333

334
        /// Sets the bank name.
335
        ///
336
        /// - Parameter bankName: The bank name
337
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
338
        public func bankName(_ bankName: String) -> Builder {
2✔
339
            storage[TransferMethodField.bankName.rawValue] = AnyCodable(value: bankName)
2✔
340
            return self
2✔
341
        }
2✔
342

343
        /// Sets the branch code, transit number, routing number or equivalent.
344
        ///
345
        /// - Parameter branchId: The branch code, transit number, routing number or equivalent.
346
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
347
        public func branchId(_ branchId: String) -> Builder {
8✔
348
            storage[TransferMethodField.branchId.rawValue] = AnyCodable(value: branchId)
8✔
349
            return self
8✔
350
        }
8✔
351

352
        /// Sets the branch name.
353
        ///
354
        /// - Parameter branchName: The branch name.
355
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
356
        public func branchName(_ branchName: String) -> Builder {
1✔
357
            storage[TransferMethodField.branchName.rawValue] = AnyCodable(value: branchName)
1✔
358
            return self
1✔
359
        }
1✔
360

361
        /// Sets the bank account holder's role in the organization.
362
        ///
363
        /// - Parameter businessContactRole: The bank account holder's role in the organization.
364
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
365
        public func businessContactRole(_ businessContactRole: String) -> Builder {
2✔
366
            storage[TransferMethodField.businessContactRole.rawValue] = AnyCodable(value: businessContactRole)
2✔
367
            return self
2✔
368
        }
2✔
369

370
        /// Sets the name of the bank account holder's business.
371
        ///
372
        /// - Parameter businessName: The name of the bank account holder's business.
373
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
374
        public func businessName(_ businessName: String) -> Builder {
2✔
375
            storage[TransferMethodField.businessName.rawValue] = AnyCodable(value: businessName)
2✔
376
            return self
2✔
377
        }
2✔
378

379
        /// Sets the country where the bank account holder's business is registered.
380
        ///
381
        /// - Parameter businessRegistrationCountry: The country where the bank account holder's business is registered.
382
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
383
        public func businessRegistrationCountry(_ country: String) -> Builder {
2✔
384
            storage[TransferMethodField.businessRegistrationCountry.rawValue] = AnyCodable(value: country)
2✔
385
            return self
2✔
386
        }
2✔
387

388
        /// Sets the bank account holder's business registration number or identifier,
389
        /// as assigned by the relevant government body.
390
        ///
391
        /// - Parameter businessRegistrationId: The bank account holder's business
392
        ///   registration number or identifier, as assigned by the relevant government body.
393
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
394
        public func businessRegistrationId(_ businessRegistrationId: String) -> Builder {
2✔
395
            storage[TransferMethodField.businessRegistrationId.rawValue] = AnyCodable(value: businessRegistrationId)
2✔
396
            return self
2✔
397
        }
2✔
398

399
        /// Sets the state, province or region where the bank account holder's business is registered.
400
        ///
401
        /// - Parameter businessRegistrationStateProvince: The state, province or region
402
        ///   where the bank account holder's business is registered.
403
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
404
        public func businessRegistrationStateProvince(_ stateProvince: String) -> Builder {
2✔
405
            storage[TransferMethodField.businessRegistrationStateProvince.rawValue] = AnyCodable(value: stateProvince)
2✔
406
            return self
2✔
407
        }
2✔
408

409
        /// Sets the bank account holder's business type.
410
        ///
411
        /// - Parameter businessType: The bank account holder's business type.
412
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
413
        public func businessType(_ businessType: String) -> Builder {
1✔
414
            storage[TransferMethodField.businessType.rawValue] = AnyCodable(value: businessType)
1✔
415
            return self
1✔
416
        }
1✔
417

418
        /// Sets the bank account holder's city.
419
        ///
420
        /// - Parameter city: The bank account holder's city.
421
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
422
        public func city(_ city: String) -> Builder {
4✔
423
            storage[TransferMethodField.city.rawValue] = AnyCodable(value: city)
4✔
424
            return self
4✔
425
        }
4✔
426

427
        /// Sets the bank account holder's country.
428
        ///
429
        /// - Parameter country: The bank account holder's country.
430
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
431
        public func country(_ country: String) -> Builder {
4✔
432
            storage[TransferMethodField.country.rawValue] = AnyCodable(value: country)
4✔
433
            return self
4✔
434
        }
4✔
435

436
        /// Sets the bank account holder's birth country.
437
        ///
438
        /// - Parameter countryOfBirth: The bank account holder's birth country.
439
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
440
        public func countryOfBirth(_ countryOfBirth: String) -> Builder {
1✔
441
            storage[TransferMethodField.countryOfBirth.rawValue] = AnyCodable(value: countryOfBirth)
1✔
442
            return self
1✔
443
        }
1✔
444

445
        // Sets the bank account holder's nationality country.
446
        ///
447
        /// - Parameter countryOfNationality: The bank account holder's birth country.
448
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
449
        public func countryOfNationality(_ countryOfNationality: String) -> Builder {
×
450
            storage[TransferMethodField.countryOfNationality.rawValue] = AnyCodable(value: countryOfNationality)
×
451
            return self
×
452
        }
×
453

454
        /// Sets the bank account holder's date of birth (All users must be at least 13 years old).
455
        ///
456
        /// - Parameter dateOfBirth: The bank account holder's date of birth
457
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
458
        public func dateOfBirth(_ dateOfBirth: String) -> Builder {
2✔
459
            storage[TransferMethodField.dateOfBirth.rawValue] = AnyCodable(value: dateOfBirth)
2✔
460
            return self
2✔
461
        }
2✔
462

463
        /// Sets the bank account holder's driver's license number.
464
        ///
465
        /// - Parameter driversLicenseId: The bank account holder's driver's license number.
466
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
467
        public func driversLicenseId(_ driversLicenseId: String) -> Builder {
1✔
468
            storage[TransferMethodField.driversLicenseId.rawValue] = AnyCodable(value: driversLicenseId)
1✔
469
            return self
1✔
470
        }
1✔
471

472
        /// Sets the bank account holder's employer identifier, generally used for tax purposes.
473
        ///
474
        /// - Parameter employerId: The bank account holder's employer identifier, generally used for tax purposes.
475
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
476
        public func employerId(_ employerId: String) -> Builder {
1✔
477
            storage[TransferMethodField.employerId.rawValue] = AnyCodable(value: employerId)
1✔
478
            return self
1✔
479
        }
1✔
480

481
        /// Sets the bank account holder's first name.
482
        ///
483
        /// - Parameter firstName: The bank account holder's first name.
484
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
485
        public func firstName(_ firstName: String) -> Builder {
2✔
486
            storage[TransferMethodField.firstName.rawValue] = AnyCodable(value: firstName)
2✔
487
            return self
2✔
488
        }
2✔
489

490
        /// Sets the bank account holder's gender.
491
        ///
492
        /// - Parameter gender: The bank account holder's gender.
493
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
494
        public func gender(_ gender: String) -> Builder {
1✔
495
            storage[TransferMethodField.gender.rawValue] = AnyCodable(value: gender)
1✔
496
            return self
1✔
497
        }
1✔
498

499
        /// Sets the bank account holder's government ID number, such as a Social Security Number.
500
        ///
501
        /// - Parameter governmentId: The bank account holder's government ID number, such as a Social Security Number.
502
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
503
        public func governmentId(_ governmentId: String) -> Builder {
1✔
504
            storage[TransferMethodField.governmentId.rawValue] = AnyCodable(value: governmentId)
1✔
505
            return self
1✔
506
        }
1✔
507

508
        /// Sets the bank account holder's government ID type.
509
        ///
510
        /// - Parameter governmentIdType: The bank account holder's government ID type.
511
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
512
        public func governmentIdType(_ governmentIdType: String) -> Builder {
1✔
513
            storage[TransferMethodField.governmentIdType.rawValue] = AnyCodable(value: governmentIdType)
1✔
514
            return self
1✔
515
        }
1✔
516

517
        /// Sets the account number at the intermediary bank.
518
        ///
519
        /// - Parameter intermediaryBankAccountId: The account number at the intermediary bank.
520
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
521
        public func intermediaryBankAccountId(_ accountId: String) -> Builder {
3✔
522
            storage[TransferMethodField.intermediaryBankAccountId.rawValue] = AnyCodable(value: accountId)
3✔
523
            return self
3✔
524
        }
3✔
525

526
        /// Sets the intermediary bank street address.
527
        ///
528
        /// - Parameter intermediaryBankAddressLine1: The intermediary bank street address.
529
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
530
        public func intermediaryBankAddressLine1(_ addressLine1: String) -> Builder {
2✔
531
            storage[TransferMethodField.intermediaryBankAddressLine1.rawValue] = AnyCodable(value: addressLine1)
2✔
532
            return self
2✔
533
        }
2✔
534

535
        /// Sets the intermediary bank street address, second line.
536
        ///
537
        /// - Parameter intermediaryBankAddressLine2: The intermediary bank street address, second line.
538
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
539
        public func intermediaryBankAddressLine2(_ addressLine2: String) -> Builder {
2✔
540
            storage[TransferMethodField.intermediaryBankAddressLine2.rawValue] = AnyCodable(value: addressLine2)
2✔
541
            return self
2✔
542
        }
2✔
543

544
        /// Sets the intermediary bank city.
545
        ///
546
        /// - Parameter intermediaryBankCity: The intermediary bank city.
547
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
548
        public func intermediaryBankCity(_ city: String) -> Builder {
2✔
549
            storage[TransferMethodField.intermediaryBankCity.rawValue] = AnyCodable(value: city)
2✔
550
            return self
2✔
551
        }
2✔
552

553
        /// Sets the intermediary bank country.
554
        ///
555
        /// - Parameter intermediaryBankCountry: The intermediary bank country.
556
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
557
        public func intermediaryBankCountry(_ country: String) -> Builder {
2✔
558
            storage[TransferMethodField.intermediaryBankCountry.rawValue] = AnyCodable(value: country)
2✔
559
            return self
2✔
560
        }
2✔
561

562
        /// Sets the intermediary bank's 11-character SWIFT code.
563
        ///
564
        /// - Parameter intermediaryBankId: The intermediary bank's 11-character SWIFT code.
565
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
566
        public func intermediaryBankId(_ intermediaryBankId: String) -> Builder {
3✔
567
            storage[TransferMethodField.intermediaryBankId.rawValue] = AnyCodable(value: intermediaryBankId)
3✔
568
            return self
3✔
569
        }
3✔
570

571
        /// Sets the intermediary bank name.
572
        ///
573
        /// - Parameter intermediaryBankName: The intermediary bank name.
574
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
575
        public func intermediaryBankName(_ name: String) -> Builder {
2✔
576
            storage[TransferMethodField.intermediaryBankName.rawValue] = AnyCodable(value: name)
2✔
577
            return self
2✔
578
        }
2✔
579

580
        /// Sets the intermediary bank postal code.
581
        ///
582
        /// - Parameter intermediaryBankPostalCode: The intermediary bank postal code.
583
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
584
        public func intermediaryBankPostalCode(_ postalCode: String) -> Builder {
2✔
585
            storage[TransferMethodField.intermediaryBankPostalCode.rawValue] = AnyCodable(value: postalCode)
2✔
586
            return self
2✔
587
        }
2✔
588

589
        /// Sets the intermediary bank state, province or region.
590
        ///
591
        /// - Parameter intermediaryBankStateProvince: The intermediary bank state, province or region.
592
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
593
        public func intermediaryBankStateProvince(_ stateProvince: String) -> Builder {
2✔
594
            storage[TransferMethodField.intermediaryBankStateProvince.rawValue] = AnyCodable(value: stateProvince)
2✔
595
            return self
2✔
596
        }
2✔
597

598
        /// Sets the bank account holder's last name.
599
        ///
600
        /// - Parameter lastName: The bank account holder's last name.
601
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
602
        public func lastName(_ lastName: String) -> Builder {
2✔
603
            storage[TransferMethodField.lastName.rawValue] = AnyCodable(value: lastName)
2✔
604
            return self
2✔
605
        }
2✔
606

607
        /// Sets the bank account holder's middle name.
608
        ///
609
        /// - Parameter middleName: The bank account holder's middle name.
610
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
611
        public func middleName(_ middleName: String) -> Builder {
1✔
612
            storage[TransferMethodField.middleName.rawValue] = AnyCodable(value: middleName)
1✔
613
            return self
1✔
614
        }
1✔
615

616
        /// Sets the bank account holder's cell phone number.
617
        ///
618
        /// - Parameter mobileNumber: The bank account holder's cell phone number.
619
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
620
        public func mobileNumber(_ mobileNumber: String) -> Builder {
4✔
621
            storage[TransferMethodField.mobileNumber.rawValue] = AnyCodable(value: mobileNumber)
4✔
622
            return self
4✔
623
        }
4✔
624

625
        /// Sets the bank account holder's passport number.
626
        ///
627
        /// - Parameter passportId: The bank account holder's passport number.
628
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
629
        public func passportId(_ passportId: String) -> Builder {
1✔
630
            storage[TransferMethodField.passportId.rawValue] = AnyCodable(value: passportId)
1✔
631
            return self
1✔
632
        }
1✔
633

634
        /// Sets the bank account holder's phone number.
635
        ///
636
        /// - Parameter phoneNumber: The bank account holder's phone number.
637
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
638
        public func phoneNumber(_ phoneNumber: String) -> Builder {
4✔
639
            storage[TransferMethodField.phoneNumber.rawValue] = AnyCodable(value: phoneNumber)
4✔
640
            return self
4✔
641
        }
4✔
642

643
        /// Sets the bank account holder's postal code.
644
        ///
645
        /// - Parameter postalCode: The bank account holder's postal code.
646
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
647
        public func postalCode(_ postalCode: String) -> Builder {
4✔
648
            storage[TransferMethodField.postalCode.rawValue] = AnyCodable(value: postalCode)
4✔
649
            return self
4✔
650
        }
4✔
651

652
        /// Sets the bank account holder's profile type.
653
        ///
654
        /// - Parameter profileType: The bank account holder's profile type, e.g. INDIVIDUAL or BUSINESS
655
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
656
        public func profileType(_ profileType: String) -> Builder {
×
657
            storage[TransferMethodField.profileType.rawValue] = AnyCodable(value: profileType)
×
658
            return self
×
659
        }
×
660

661
        /// Sets the bank account holder's state, province or region.
662
        ///
663
        /// - Parameter stateProvince: The bank account holder's state, province or region.
664
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
665
        public func stateProvince(_ stateProvince: String) -> Builder {
4✔
666
            storage[TransferMethodField.stateProvince.rawValue] = AnyCodable(value: stateProvince)
4✔
667
            return self
4✔
668
        }
4✔
669

670
        /// Sets the type of transfer method, e.g. BANK_ACCOUNT or WIRE_ACCOUNT.
671
        ///
672
        /// - Parameter type: The type of transfer method, e.g. BANK_ACCOUNT or WIRE_ACCOUNT.
673
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
674
        public func type(_ type: String) -> Builder {
×
675
            storage[TransferMethodField.type.rawValue] = AnyCodable(value: type)
×
676
            return self
×
677
        }
×
678

679
        /// Sets wire transfer instructions.
680
        ///
681
        /// - Parameter wireInstructions: Wire transfer instructions.
682
        /// - Returns: a self `HyperwalletBankAccount.Builder` instance.
683
        public func wireInstructions(_ wireInstructions: String) -> Builder {
2✔
684
            storage[TransferMethodField.wireInstructions.rawValue] = AnyCodable(value: wireInstructions)
2✔
685
            return self
2✔
686
        }
2✔
687

688
        /// Builds a new instance of the `HyperwalletBankAccount`.
689
        ///
690
        /// - Returns: a new instance of the `HyperwalletBankAccount`.
691
        public func build() -> HyperwalletBankAccount {
8✔
692
            HyperwalletBankAccount(data: self.storage)
8✔
693
        }
8✔
694
    }
695
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc