private SBNCreateProgramAccountRequestBody GetProgramAccountRequestBody(MicrosoftDynamicsCRMadoxioLicences licence, string suffix) { var programAccountRequestBody = new SBNCreateProgramAccountRequestBody(); //BN9 programAccountRequestBody.businessRegistrationNumber = licence.AdoxioLicencee.Accountnumber; //this code identifies that the message is from LCRB. It's the same in every message from LCRB programAccountRequestBody.businessProgramIdentifier = OneStopUtils.BUSINESS_PROGRAM_IDENTIFIER; //this identifies the licence type. if (licence?.AdoxioLicenceType?.AdoxioOnestopprogramaccounttype != null) { programAccountRequestBody.SBNProgramTypeCode = licence?.AdoxioLicenceType?.AdoxioOnestopprogramaccounttype.ToString(); } else { if ("Cannabis Retail Store" == licence?.AdoxioLicenceType?.AdoxioName) { programAccountRequestBody.SBNProgramTypeCode = OneStopUtils.PROGRAM_TYPE_CODE_CANNABIS_RETAIL_STORE; } } programAccountRequestBody.businessCore = GetBusinessCore(licence, suffix); programAccountRequestBody.programAccountStatus = GetProgramAccountStatus(); //the name of the applicant(licensee)- lastName, firstName middleName or company name programAccountRequestBody.legalName = licence.AdoxioLicencee.Name; programAccountRequestBody.operatingName = getOperatingName(licence); programAccountRequestBody.businessAddress = getBusinessAddress(licence); programAccountRequestBody.mailingAddress = getMailingAddress(licence); return(programAccountRequestBody); }
private SBNCreateProgramAccountRequestBody GetProgramAccountRequestBody() { var programAccountRequestBody = new SBNCreateProgramAccountRequestBody(); //BN9 programAccountRequestBody.businessRegistrationNumber = "ToGetFromDynamics"; //this code identifies that the message is from LCRB. It's the same in every message from LCRB programAccountRequestBody.businessProgramIdentifier = OneStopUtils.BUSINESS_PROGRAM_IDENTIFIER; //this identifies the licence type. Fixed number assigned by the OneStopHub programAccountRequestBody.SBNProgramTypeCode = OneStopUtils.PROGRAM_TYPE_CODE_CANNABIS_RETAIL_STORE; programAccountRequestBody.businessCore = GetBusinessCore(); programAccountRequestBody.programAccountStatus = GetProgramAccountStatus(); //the name of the applicant(licensee)- lastName, firstName middleName or company name programAccountRequestBody.legalName = "ToGetFromDynamics"; programAccountRequestBody.operatingName = getOperatingName(); programAccountRequestBody.businessAddress = getBusinessAddress(); programAccountRequestBody.mailingAddress = getMailingAddress(); return(programAccountRequestBody); }