public static CreatePromoCodeRequest ToRPC(this PromoCodeContent content) { var request = new CreatePromoCodeRequest(); var code = new SIPromoCode(); code.MaxClaims = (int)content.MaxClaimCount; code.Code = content.Code; code.Properties = content.Data; if (content._startDate != 0) { code.ValidFrom = content._startDate; } if (content._endDate != 0) { code.ValidUntil = content._endDate; } request.Code = code; return(request); }
public void CreatePromoCode(PromoCodeContent content, Action <PromoCode> success, Action <GetSocialError> failure) { CallAsync("PromoCodes.create", GSJson.Serialize(content), success, failure); }
public static void Create(PromoCodeContent content, Action <PromoCode> success, Action <GetSocialError> failure) { GetSocialFactory.Bridge.CreatePromoCode(content, success, failure); }