private static GetInstrumentResponse Create(string type) { if (CheckoutUtils.GetEnumMemberValue(InstrumentType.BankAccount).Equals(type)) { return(new GetBankAccountInstrumentResponse()); } if (CheckoutUtils.GetEnumMemberValue(InstrumentType.Card).Equals(type)) { return(new GetCardInstrumentResponse()); } return(new GetInstrumentResponse( CheckoutUtils.GetEnumFromStringMemberValue <InstrumentType>(type))); }
private static ScheduleResponse RetrieveScheduleResponseType(JToken jToken) { string sourceType = jToken.SelectToken(CheckoutUtils.Frequency)?.Value <string>()?.ToLowerInvariant(); if (CheckoutUtils.GetEnumMemberValue(ScheduleFrequency.Daily).Equals(sourceType)) { return(new ScheduleFrequencyDailyResponse()); } if (CheckoutUtils.GetEnumMemberValue(ScheduleFrequency.Weekly).Equals(sourceType)) { return(new ScheduleFrequencyWeeklyResponse()); } if (CheckoutUtils.GetEnumMemberValue(ScheduleFrequency.Monthly).Equals(sourceType)) { return(new ScheduleFrequencyMonthlyResponse()); } return(new ScheduleResponse(CheckoutUtils.GetEnumFromStringMemberValue <ScheduleFrequency>(sourceType))); }
public PaymentSourceType?Type() { return(CheckoutUtils.GetEnumFromStringMemberValue <PaymentSourceType>( (string)base[CheckoutUtils.Type])); }