Hi, I tried to add several similar customers with ...
# announcements
m
Hi, I tried to add several similar customers with only difference - name. When I do it in the following way, customers name is accumulated with the previous one: like "customersList_ISNFWvD", ""customersList_ISNFWvDtgkhGtf" and so on
Copy code
repeat(times) {
            val customerInfoResponse = RequestBuilder("Customer", "add_customer")
                    .sendPost<AuthInfoSID,CustomerInfo>(sessionID,
                            customerModel.also { model ->
                                model.customerInfo?.apply { name = name?.addRandomPart(7) }
                    })
                    .extractBody<AddUpdateCustomerResponse>()
        }
What is the proper way to use fresh customerModel in every iteration?