001package com.plivo.api.models.account; 002 003import com.plivo.api.models.base.Updater; 004import retrofit2.Call; 005 006public class SubaccountUpdater extends Updater<SubaccountUpdateResponse> { 007 008 private final String name; 009 private Boolean enabled; 010 011 /** 012 * @param subauthId Authentication ID of the subaccount to update. 013 * @param name Name of the subaccount 014 */ 015 public SubaccountUpdater(String subauthId, String name) { 016 super(subauthId); 017 this.name = name; 018 } 019 020 /** 021 * @return Name of the subaccount 022 */ 023 public String name() { 024 return name; 025 } 026 027 /** 028 * @return Specify if the subaccount should be enabled or not. 029 */ 030 public Boolean enabled() { 031 return this.enabled; 032 } 033 034 /** 035 * @param enabled Specify if the subaccount should be enabled or not. 036 */ 037 public SubaccountUpdater enabled(final Boolean enabled) { 038 this.enabled = enabled; 039 return this; 040 } 041 042 @Override 043 protected Call<SubaccountUpdateResponse> obtainCall() { 044 return client().getApiService().subaccountModify(client().getAuthId(), id, this); 045 } 046}