Updating a merchant

The boarding api uses the same data type for creating, reading, and updating a merchant. The safest way to change fields on an existing merchant is to first retrieve the merchant, change the desired fields then send an update request using the changed merchant object.

Client client = new Client();
client.SetBasicAuth("[email protected]", "notArealpassw0rd");

string merchantId = "9900000301"
var merchant = client.GetMerchantAsync(merchantId).Result;

//change the monthly limit for the merchant
merchant.MonthlyLimit = 1000;
var updatedMerchant = client.UpdateMerchantAsync(merchantId, merchantUpdate).Result;
ApiClient defaultClient = Configuration.getDefaultApiClient();
        
HttpBasicAuth auth = (HttpBasicAuth)defaultClient.getAuthentication("basicAuth");
auth.setUsername("[email protected]);
auth.setPassword("notArealpassw0rd");

MerchantsApi apiInstance = new MerchantsApi();

String merchantId = "9900000301"
                 
Merchant merchant = apiInstance.getMerchant(merchantId);

//change the monthly limit for the merchant
merchant.setMonthlyLimit(new BigDecimal(1000));
apiInstance.updateMerchant(merchantId, merchant);
[[ACHConfiguration sharedConfig] username] = @"[email protected]";
[[ACHConfiguration sharedConfig] password] = @"notArealpassword";

ACHMerchantsApi *apiInstance = [[ACHMerchantsApi alloc] init];

[apiInstance getMerchantWithMerchantId:output.merchantId completionHandler:^(ACHMerchant *output, NSError *error) {
	if (output) {
    //change the monthly limit for the merchant
    [output setMonthlyLimit:@1000];
    
    [apiInstance updateMerchantWithMerchantId: output.merchantId client: output completionHandler:^(ACHMerchant *output, NSError *error) {
      waitingForBlock = NO;
      if (output) {
				NSLog(@"%@", output);
      }
      if (error) {
        NSLog(@"Error calling ACHMerchantsApi->getMerchantWithMerchantId: %@", error);
      }
    }];
  }
  if (error){
  	NSLog(@"Error calling ACHMerchantsApi->getMerchantWithMerchantId: %@", error);
  }
}