public Protocols.ToolkitResultProtocol CreateCountry(Protocols.Interfaces.CreateCountrySetupProtocol setupParam) { ClarifySession session = Global.GetSession( AuthHeader ); FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session ); FChoice.Toolkits.Clarify.Interfaces.CreateCountrySetup setup; switch( setupParam.ConstructorCue ) { case 0: setup = new FChoice.Toolkits.Clarify.Interfaces.CreateCountrySetup(setupParam.Country, setupParam.CountryCode); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if( Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags) ) { setup.Country = setupParam.Country; } if( Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags) ) { setup.CountryCode = setupParam.CountryCode; } if( Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags) ) { setup.Currency = setupParam.Currency; } if( Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags) ) { setup.CurrencySymbol = setupParam.CurrencySymbol; } if( Global.IsPropertyDirty(16, setupParam.DirtyFieldFlags) ) { setup.CurrencyDescription = setupParam.CurrencyDescription; } if( Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags) ) { setup.CurrencyConversionRate = setupParam.CurrencyConversionRate; } if( Global.IsPropertyDirty(64, setupParam.DirtyFieldFlags) ) { setup.CurrencyISOCode = setupParam.CurrencyISOCode; } return new Protocols.ToolkitResultProtocol( toolkit.CreateCountry(setup) ); }
public Protocols.ToolkitResultProtocol CreateCountry(System.String country, System.Int32 countryCode) { ClarifySession session = Global.GetSession( AuthHeader ); FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session ); return new Protocols.ToolkitResultProtocol( toolkit.CreateCountry(country, countryCode) ); }