コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerInventory" /> class.
 /// </summary>
 /// <param name="profile">profile.</param>
 /// <param name="loyalty">loyalty.</param>
 /// <param name="referrals">referrals.</param>
 /// <param name="coupons">coupons.</param>
 public CustomerInventory(CustomerProfile profile = default(CustomerProfile), Loyalty loyalty = default(Loyalty), List <Referral> referrals = default(List <Referral>), List <Coupon> coupons = default(List <Coupon>))
 {
     this.Profile   = profile;
     this.Loyalty   = loyalty;
     this.Referrals = referrals;
     this.Coupons   = coupons;
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IntegrationState" /> class.
        /// </summary>
        /// <param name="session">session (required).</param>
        /// <param name="profile">profile (required).</param>
        /// <param name="_event">_event (required).</param>
        /// <param name="loyalty">loyalty.</param>
        /// <param name="coupon">coupon.</param>
        public IntegrationState(CustomerSession session = default(CustomerSession), CustomerProfile profile = default(CustomerProfile), Event _event = default(Event), Loyalty loyalty = default(Loyalty), Coupon coupon = default(Coupon))
        {
            // to ensure "session" is required (not null)
            if (session == null)
            {
                throw new InvalidDataException("session is a required property for IntegrationState and cannot be null");
            }
            else
            {
                this.Session = session;
            }

            // to ensure "profile" is required (not null)
            if (profile == null)
            {
                throw new InvalidDataException("profile is a required property for IntegrationState and cannot be null");
            }
            else
            {
                this.Profile = profile;
            }

            // to ensure "_event" is required (not null)
            if (_event == null)
            {
                throw new InvalidDataException("_event is a required property for IntegrationState and cannot be null");
            }
            else
            {
                this.Event = _event;
            }

            this.Loyalty = loyalty;
            this.Coupon  = coupon;
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IntegrationStateV2" /> class.
        /// </summary>
        /// <param name="customerSession">customerSession.</param>
        /// <param name="customerProfile">customerProfile.</param>
        /// <param name="_event">_event.</param>
        /// <param name="loyalty">loyalty.</param>
        /// <param name="referral">referral.</param>
        /// <param name="coupons">coupons.</param>
        /// <param name="triggeredCampaigns">triggeredCampaigns.</param>
        /// <param name="effects">effects (required).</param>
        /// <param name="createdCoupons">createdCoupons (required).</param>
        /// <param name="createdReferrals">createdReferrals (required).</param>
        public IntegrationStateV2(CustomerSessionV2 customerSession = default(CustomerSessionV2), CustomerProfile customerProfile = default(CustomerProfile), Event _event = default(Event), Loyalty loyalty = default(Loyalty), Referral referral = default(Referral), List <Coupon> coupons = default(List <Coupon>), List <Campaign> triggeredCampaigns = default(List <Campaign>), List <Effect> effects = default(List <Effect>), List <Coupon> createdCoupons = default(List <Coupon>), List <Referral> createdReferrals = default(List <Referral>))
        {
            // to ensure "effects" is required (not null)
            if (effects == null)
            {
                throw new InvalidDataException("effects is a required property for IntegrationStateV2 and cannot be null");
            }
            else
            {
                this.Effects = effects;
            }

            // to ensure "createdCoupons" is required (not null)
            if (createdCoupons == null)
            {
                throw new InvalidDataException("createdCoupons is a required property for IntegrationStateV2 and cannot be null");
            }
            else
            {
                this.CreatedCoupons = createdCoupons;
            }

            // to ensure "createdReferrals" is required (not null)
            if (createdReferrals == null)
            {
                throw new InvalidDataException("createdReferrals is a required property for IntegrationStateV2 and cannot be null");
            }
            else
            {
                this.CreatedReferrals = createdReferrals;
            }

            this.CustomerSession    = customerSession;
            this.CustomerProfile    = customerProfile;
            this.Event              = _event;
            this.Loyalty            = loyalty;
            this.Referral           = referral;
            this.Coupons            = coupons;
            this.TriggeredCampaigns = triggeredCampaigns;
        }