Initial project's source code check-in.

This commit is contained in:
ptsurbeleu 2011-07-13 16:07:32 -07:00
commit b03b0b373f
4573 changed files with 981205 additions and 0 deletions

View file

@ -0,0 +1,80 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class BillingCycle
{
private int cycleId;
private int resellerId;
private string cycleName;
private string billingPeriod;
private int periodLength;
private DateTime created;
public int CycleId
{
get { return this.cycleId; }
set { this.cycleId = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
public string CycleName
{
get { return this.cycleName; }
set { this.cycleName = value; }
}
public string BillingPeriod
{
get { return this.billingPeriod; }
set { this.billingPeriod = value; }
}
public int PeriodLength
{
get { return this.periodLength; }
set { this.periodLength = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
}
}

View file

@ -0,0 +1,123 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class Category
{
private int categoryId;
private string categoryName;
private string categorySku;
private int parentId;
private int level;
private string shortDescription;
private string fullDescription;
private DateTime created;
private DateTime modified;
private int creatorId;
private int modifierId;
private int itemOrder;
public int CategoryId
{
get { return this.categoryId; }
set { this.categoryId = value; }
}
public string CategoryName
{
get { return this.categoryName; }
set { this.categoryName = value; }
}
public string CategorySku
{
get { return this.categorySku; }
set { this.categorySku = value; }
}
public int ParentId
{
get { return this.parentId; }
set { this.parentId = value; }
}
public string ShortDescription
{
get { return this.shortDescription; }
set { this.shortDescription = value; }
}
public string FullDescription
{
get { return this.fullDescription; }
set { this.fullDescription = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public System.DateTime Modified
{
get { return this.modified; }
set { this.modified = value; }
}
public int CreatorId
{
get { return this.creatorId; }
set { this.creatorId = value; }
}
public int ModifierId
{
get { return this.modifierId; }
set { this.modifierId = value; }
}
public int Level
{
get { return this.level; }
set { this.level = value; }
}
public int ItemOrder
{
get { return this.itemOrder; }
set { this.itemOrder = value; }
}
}
}

View file

@ -0,0 +1,64 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class CheckDomainResult
{
public const int QUERY_ERROR = -21;
public const int DOMAIN_BUSY = -22;
public const int UNSPECIFIED_ERROR = -23;
private string errorMessage;
private int resultCode;
private bool succeed;
public string ErrorMessage
{
get { return errorMessage; }
set { errorMessage = value; }
}
public int ResultCode
{
get { return resultCode; }
set { resultCode = value; }
}
public bool Succeed
{
get { return succeed; }
set { succeed = value; }
}
}
}

View file

@ -0,0 +1,117 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Xml.Serialization;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
/// <summary>
/// Stores all necessary details for the checkout operation.
/// </summary>
public class CheckoutDetails
{
private bool persistent;
private NameValueCollection hash = null;
public string[][] DetailsArray;
[XmlIgnore]
NameValueCollection Details
{
get
{
if (hash == null)
{
// create new dictionary
hash = new NameValueCollection();
// fill dictionary
if (DetailsArray != null)
{
foreach (string[] pair in DetailsArray)
hash.Add(pair[0], pair[1]);
}
}
return hash;
}
}
[XmlIgnore]
public string this[string key]
{
get
{
return Details[key];
}
set
{
// set details
Details[key] = value;
// rebuild array
DetailsArray = new string[Details.Count][];
for (int i = 0; i < Details.Count; i++)
{
DetailsArray[i] = new string[] { Details.Keys[i], Details[Details.Keys[i]] };
}
}
}
public bool Persistent
{
get { return persistent; }
set { persistent = value; }
}
public string[] GetAllKeys()
{
return Details.AllKeys;
}
public void Remove(string name)
{
Details.Remove(name);
}
public int GetInt32(string key)
{
return Int32.Parse(Details[key]);
}
public long GetInt64(string key)
{
return Int64.Parse(Details[key]);
}
public bool GetBoolean(string key)
{
return Boolean.Parse(Details[key]);
}
}
}

View file

@ -0,0 +1,64 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class CheckoutFormParams : KeyValueBunch
{
public const string POST_METHOD = "POST";
public const string GET_METHOD = "GET";
public const string TARGET_SITE = "target_site";
private string method;
private string action;
/// <summary>
/// Form action
/// </summary>
public string Action
{
get { return action; }
set { action = value; }
}
/// <summary>
/// Form method (GET/POST)
/// </summary>
public string Method
{
get { return method; }
set { method = value; }
}
}
}

View file

@ -0,0 +1,80 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class CheckoutKeys
{
public const string PaymentProcessor = "PaymentProcessor";
public const string CardNumber = "CardNumber";
/// <summary>Visa, MasterCard, Discover, Amex, Switch, Solo</summary>
public const string CardType = "CardType";
public const string VerificationCode = "VerificationCode";
//
public const string ExpireYear = "ExpireYear";
public const string ExpireMonth = "ExpireMonth";
//
public const string StartMonth = "StartMonth";
public const string StartYear = "StartYear";
//
public const string IssueNumber = "IssueNumber";
public const string Amount = "Amount";
public const string Currency = "Currency";
public const string ContractNumber = "ContractNumber";
public const string InvoiceNumber = "InvoiceNumber";
public const string FirstName = "FirstName";
public const string LastName = "LastName";
public const string CustomerEmail = "CustomerEmail";
public const string CompanyName = "CompanyName";
public const string Address = "Address";
public const string Zip = "Zip";
public const string City = "City";
public const string State = "State";
public const string Country = "Country";
public const string Phone = "Phone";
public const string Fax = "Fax";
public const string CustomerId = "CustomerId";
public const string ShipToFirstName = "ShipToFirstName";
public const string ShipToLastName = "ShipToLastName";
public const string ShipToCompany = "ShipToCompany";
public const string ShipToZip = "ShipToZip";
public const string ShipToAddress = "ShipToAddress";
public const string ShipToCity = "ShipToCity";
public const string ShipToState = "ShipToState";
public const string ShipToCountry = "ShipToCountry";
public const string IPAddress = "IPAddress";
private CheckoutKeys()
{
}
}
}

View file

@ -0,0 +1,61 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class CheckoutResult
{
private bool succeed;
private string statusCode;
private int paymentId;
public bool Succeed
{
get { return succeed; }
set { succeed = value; }
}
public string StatusCode
{
get { return this.statusCode; }
set { this.statusCode = value; }
}
public int PaymentId
{
get { return this.paymentId; }
set { this.paymentId = value; }
}
}
}

View file

@ -0,0 +1,188 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Text;
using System.Collections;
using System.Xml.Serialization;
using System.Collections.Generic;
using System.Collections.Specialized;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class SystemTasks
{
public const string TASK_SET_PAYMENT_PROFILE = "SET_PAYMENT_PROFILE";
public const string TASK_ADD_INVOICE = "ADD_INVOICE";
public const string TASK_ADD_PAYMENT = "ADD_PAYMENT";
public const string TASK_ADD_CONTRACT = "ADD_CONTRACT";
public const string TASK_UPDATE_PAYMENT = "UPDATE_PAYMENT";
public const string TASK_EXEC_SYSTEM_TRIGGER = "EXEC_SYSTEM_TRIGGER";
public const string SVC_ACTIVATE = "SVC_ACTIVATE";
public const string SVC_SUSPEND = "SVC_SUSPEND";
public const string SVC_CANCEL = "SVC_CANCEL";
public const string SOURCE_ECOMMERCE = "ECOMMERCE";
public const string SOURCE_SPF = "SPF";
}
public class SystemTaskParams
{
public const string PARAM_SERVICE = "Service";
public const string PARAM_PAYMENT = "Payment";
public const string PARAM_INVOICE = "Invoice";
public const string PARAM_CONTRACT = "Contract";
public const string PARAM_CUSTOMER_ID = "CustomerId";
public const string PARAM_CONTRACT_ACCOUNT = "ContractAccount";
public const string PARAM_INVOICE_LINES = "InvoiceLines";
public const string PARAM_EXTRA_ARGS = "ExtraArgs";
public const string PARAM_SKIP_HANDLERS = "SkipHandlers";
public const string PARAM_SEND_EMAIL = "SendEmail";
}
[Serializable]
public class GenericResult : KeyValueBunchBase
{
private bool succeed;
public bool Succeed
{
get { return succeed; }
set { succeed = value; }
}
}
[Serializable]
public abstract class KeyValueBunchBase : IKeyValueBunch
{
private string propertyNames;
private string propertyValues;
[XmlIgnore]
public string PropertyNames
{
get { return this.propertyNames; }
set { this.propertyNames = value; }
}
[XmlIgnore]
public string PropertyValues
{
get { return this.propertyValues; }
set { this.propertyValues = value; }
}
public bool PropertyExists(string name)
{
string keyValue = Properties.Get(name);
return keyValue != null;
}
public T GetProperty<T>(string name)
{
return (T)Convert.ChangeType(Properties[name], typeof(T));
}
public void SetProperty(string name, object value)
{
this[name] = Convert.ToString(value);
}
#region IKeyValueBunch Members
public string this[string settingName]
{
get
{
return Properties[settingName];
}
set
{
// set setting
Properties[settingName] = value;
//
SyncCollectionsState(false);
}
}
public string[] GetAllKeys()
{
if (Properties != null)
return Properties.AllKeys;
return null;
}
#endregion
private NameValueCollection properties;
public string[][] KeyValueArray;
[XmlIgnore]
NameValueCollection Properties
{
get
{
//
SyncCollectionsState(true);
//
return properties;
}
}
private void SyncCollectionsState(bool inputSync)
{
if (inputSync)
{
if (properties == null)
{
// create new dictionary
properties = new NameValueCollection();
// fill dictionary
if (KeyValueArray != null)
{
foreach (string[] pair in KeyValueArray)
properties.Add(pair[0], pair[1]);
}
}
}
else
{
// rebuild array
KeyValueArray = new string[Properties.Count][];
//
for (int i = 0; i < Properties.Count; i++)
{
KeyValueArray[i] = new string[] { Properties.Keys[i], Properties[Properties.Keys[i]] };
}
}
}
}
}

View file

@ -0,0 +1,230 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public enum ContractStatus
{
Pending = 0,
Active = 1,
Suspended = 2,
Closed = 3
};
[Serializable]
public class ContractAccount : KeyValueBunchBase
{
public const string USERNAME = "Username";
public const string PASSWORD = "Password";
public const string COMPANY_NAME = "CompanyName";
public const string FIRST_NAME = "FirstName";
public const string LAST_NAME = "LastName";
public const string EMAIL = "Email";
public const string ADDRESS = "Address";
public const string CITY = "City";
public const string COUNTRY = "Country";
public const string STATE = "State";
public const string ZIP = "Zip";
public const string PHONE_NUMBER = "PhoneNumber";
public const string FAX_NUMBER = "FaxNumber";
public const string INSTANT_MESSENGER = "InstantMessenger";
public const string MAIL_FORMAT = "MailFormat";
public const string CUSTOMER_ID = "CustomerId";
}
[Serializable]
public class Contract
{
private string accountName;
private decimal balance;
private DateTime closedDate;
private string companyName;
private string contractId;
private int customerId;
private int resellerId;
private string email;
private string firstName;
private string lastName;
private DateTime openedDate;
private int statusId;
public string AccountName
{
get
{
return accountName;
}
set
{
accountName = value;
}
}
public decimal Balance
{
get
{
return balance;
}
set
{
balance = value;
}
}
public DateTime ClosedDate
{
get
{
return closedDate;
}
set
{
closedDate = value;
}
}
public string CompanyName
{
get
{
return companyName;
}
set
{
companyName = value;
}
}
public string ContractId
{
get
{
return contractId;
}
set
{
contractId = value;
}
}
public int CustomerId
{
get
{
return customerId;
}
set
{
customerId = value;
}
}
public int ResellerId
{
get
{
return resellerId;
}
set
{
resellerId = value;
}
}
public string Email
{
get
{
return email;
}
set
{
email = value;
}
}
public string FirstName
{
get
{
return firstName;
}
set
{
firstName = value;
}
}
public string LastName
{
get
{
return lastName;
}
set
{
lastName = value;
}
}
public DateTime OpenedDate
{
get
{
return openedDate;
}
set
{
openedDate = value;
}
}
public int StatusId
{
get
{
return statusId;
}
set
{
statusId = value;
}
}
public ContractStatus Status
{
get { return (ContractStatus)statusId;}
set { statusId = (int)value; }
}
}
}

View file

@ -0,0 +1,95 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class DomainNameCycle
{
private int cycleId;
private string cycleName;
private string billingPeriod;
private int periodLength;
private decimal setupFee;
private decimal recurringFee;
private decimal transferFee;
private int sortOrder;
public int CycleId
{
get { return cycleId; }
set { cycleId = value; }
}
public string CycleName
{
get { return cycleName; }
set { cycleName = value; }
}
public string BillingPeriod
{
get { return billingPeriod; }
set { billingPeriod = value; }
}
public int PeriodLength
{
get { return periodLength; }
set { periodLength = value; }
}
public decimal SetupFee
{
get { return setupFee; }
set { setupFee = value; }
}
public decimal RecurringFee
{
get { return recurringFee; }
set { recurringFee = value; }
}
public decimal TransferFee
{
get { return transferFee; }
set { transferFee = value; }
}
public int SortOrder
{
get { return sortOrder; }
set { sortOrder = value; }
}
}
}

View file

@ -0,0 +1,54 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class FormParameters : NameValueCollection
{
public const string FIRST_NAME = "FirstName";
public const string LAST_NAME = "LastName";
public const string EMAIL = "Email";
public const string ADDRESS = "Address";
public const string CITY = "City";
public const string STATE = "State";
public const string COUNTRY = "Country";
public const string ZIP = "Zip";
public const string PHONE = "Phone";
public const string FAX = "Fax";
public const string AMOUNT = "Amount";
public const string INVOICE = "Invoice";
public const string TAX_AMOUNT = "TaxAmount";
public const string CURRENCY = "Currency";
public const string CONTRACT = "ContractId";
}
}

View file

@ -0,0 +1,67 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class GenericSvcResult
{
private bool succeed;
private int resultCode;
private string errorCode;
private string error;
public bool Succeed
{
get { return succeed; }
set { succeed = value; }
}
public int ResultCode
{
get { return resultCode; }
set { resultCode = value; }
}
public string ErrorCode
{
get { return errorCode; }
set { errorCode = value; }
}
public string Error
{
get { return error; }
set { error = value; }
}
}
}

View file

@ -0,0 +1,137 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class HostingAddon
{
private int productId;
private string productName;
private string productSku;
private string description;
private DateTime created;
private bool enabled;
private int resellerId;
private int planId;
private bool recurring;
private bool dummyAddon;
private bool countable;
private decimal setupFee;
private decimal oneTimeFee;
private bool taxInclusive;
public bool TaxInclusive
{
get { return this.taxInclusive; }
set { this.taxInclusive = value; }
}
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public string ProductName
{
get { return this.productName; }
set { this.productName = value; }
}
public string ProductSku
{
get { return this.productSku; }
set { this.productSku = value; }
}
public string Description
{
get { return this.description; }
set { this.description = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
public int PlanId
{
get { return this.planId; }
set { this.planId = value; }
}
public bool Recurring
{
get { return this.recurring; }
set { this.recurring = value; }
}
public bool DummyAddon
{
get { return this.dummyAddon; }
set { this.dummyAddon = value; }
}
public bool Countable
{
get { return this.countable; }
set { this.countable = value; }
}
public decimal SetupFee
{
get { return this.setupFee; }
set { this.setupFee = value; }
}
public decimal OneTimeFee
{
get { return this.oneTimeFee; }
set { this.oneTimeFee = value; }
}
}
}

View file

@ -0,0 +1,131 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class HostingPlan
{
#region Constants for DomainOption feature
public const int DOMAIN_REQUIRED = 1;
public const int DOMAIN_OPTIONAL = 2;
public const int DOMAIN_HIDE = 3;
#endregion
private int productId;
private string productName;
private string productSku;
private string description;
private DateTime created;
private bool enabled;
private int resellerId;
private int planId;
private int userRole;
private int initialStatus;
private int domainOption;
private bool taxInclusive;
public bool TaxInclusive
{
get { return this.taxInclusive; }
set { this.taxInclusive = value; }
}
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public string ProductName
{
get { return this.productName; }
set { this.productName = value; }
}
public string ProductSku
{
get { return this.productSku; }
set { this.productSku = value; }
}
public string Description
{
get { return this.description; }
set { this.description = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
public int PlanId
{
get { return this.planId; }
set { this.planId = value; }
}
public int UserRole
{
get { return this.userRole; }
set { this.userRole = value; }
}
public int InitialStatus
{
get { return this.initialStatus; }
set { this.initialStatus = value; }
}
public int DomainOption
{
get { return this.domainOption; }
set { this.domainOption = value; }
}
}
}

View file

@ -0,0 +1,81 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class HostingPlanCycle
{
private int cycleId;
private string cycleName;
private string billingPeriod;
private int periodLength;
private decimal setupFee;
private decimal recurringFee;
public int CycleId
{
get { return this.cycleId; }
set { this.cycleId = value; }
}
public string CycleName
{
get { return this.cycleName; }
set { this.cycleName = value; }
}
public string BillingPeriod
{
get { return this.billingPeriod; }
set { this.billingPeriod = value; }
}
public int PeriodLength
{
get { return this.periodLength; }
set { this.periodLength = value; }
}
public decimal SetupFee
{
get { return this.setupFee; }
set { this.setupFee = value; }
}
public decimal RecurringFee
{
get { return this.recurringFee; }
set { this.recurringFee = value; }
}
}
}

View file

@ -0,0 +1,240 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Text;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public interface IDomainRegistrar : ISystemPlugin
{
//bool SubAccountRequired { get; }
//bool CheckSubAccountExists(string account, string emailAddress);
//AccountResult GetSubAccount(string account, string emailAddress);
//AccountResult CreateSubAccount(CommandParams args);
//DomainStatus CheckDomain(string domain);
void RegisterDomain(DomainNameSvc domainSvc, ContractAccount accountInfo, string[] nameServers);
void RenewDomain(DomainNameSvc domainSvc, ContractAccount accountInfo, string[] nameServers);
TransferDomainResult TransferDomain(CommandParams args, DomainContacts contacts);
//DomainContacts GetAccountContacts(CommandParams args);
}
#region Registrar's results
public abstract class RegistrarResultBase
{
private bool succeed;
private NameValueCollection resultData;
public const string REGISTRAR = "Registrar";
public bool Succeed
{
get { return this.succeed; }
set { this.succeed = value; }
}
public int Count
{
get
{
EnsureResultDataCreated();
return resultData.Count;
}
}
public string[] AllKeys
{
get
{
EnsureResultDataCreated();
return resultData.AllKeys;
}
}
public string this[string keyName]
{
get
{
EnsureResultDataCreated();
return resultData[keyName];
}
set
{
EnsureResultDataCreated();
resultData[keyName] = value;
}
}
public string this[int index]
{
get
{
EnsureResultDataCreated();
return resultData[index];
}
}
protected void EnsureResultDataCreated()
{
if (resultData == null)
resultData = new NameValueCollection();
}
}
public enum DomainStatus
{
Registered = 0,
NotFound = 1,
UnableToCheck = 2
};
public class RegisterDomainResult : RegistrarResultBase
{
public const string ORDER_NUMBER = "OrderNumber";
public const string STATUS_CODE = "StatusCode";
public const string STATUS_REASON = "StatusReason";
}
public class RenewDomainResult : RegistrarResultBase
{
public const string RENEW_ORDER_NUMBER = "RenewOrderNumber";
public const string STATUS_CODE = "StatusCode";
public const string STATUS_REASON = "StatusReason";
}
public class TransferDomainResult : RegistrarResultBase
{
public const string TRANSFER_ORDER_NUMBER = "TransferOrderNumber";
public const string ERROR_MESSAGE = "ErrorMessage";
}
public class AccountResult : RegistrarResultBase
{
public const string STATUS_CODE = "StatusCode";
public const string STATUS_REASON = "StatusReason";
public const string DEFAULT_CONTACT_ID = "DefaultContactID";
public const string REGISTRAR_ACCOUNT_ID = "RegistrarAccountID";
public const string ACCOUNT_LOGIN_ID = "AccountLoginID";
public const string ACCOUNT_ID = "AccountID";
public const string ACCOUNT_PARTY_ID = "AccountPartyID";
}
#endregion
#region Registrar's core types
public class CommandParams : NameValueCollection
{
public const string USERNAME = "Username";
public const string NAME_SERVERS = "NameServers";
public const string DOMAIN_NAME = "DomainName";
public const string DOMAIN_TLD = "DomainTLD";
public const string YEARS = "Years";
public const string EMAIL = "Email";
public const string PASSWORD = "Password";
public const string FIRST_NAME = "FirstName";
public const string LAST_NAME = "LastName";
public const string ADDRESS = "Address";
public const string CITY = "City";
public const string STATE = "State";
public const string COUNTRY = "Country";
public const string ZIP = "Zip";
public const string PHONE = "Phone";
public const string FAX = "Fax";
public bool HasKey(string keyName)
{
return !String.IsNullOrEmpty(
this[keyName]
);
}
}
public class DomainContacts : NameObjectCollectionBase
{
public DomainContact this[string contactType]
{
get
{
DomainContact contact = (DomainContact)BaseGet(contactType);
if (contact == null)
{
contact = new DomainContact();
BaseSet(contactType, contact);
}
return contact;
}
}
}
public class DomainContact
{
private NameValueCollection contactInfo;
public string this[string keyName]
{
get { return contactInfo[keyName]; }
set { contactInfo[keyName] = value; }
}
public string[] Keys
{
get { return contactInfo.AllKeys; }
}
public bool HasKey(string keyName)
{
return !String.IsNullOrEmpty(
contactInfo[keyName]
);
}
public DomainContact()
{
contactInfo = new NameValueCollection();
}
}
#endregion
}

View file

@ -0,0 +1,35 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public interface IInteractivePaymentGatewayProvider : IPaymentGatewayProvider
{
CheckoutFormParams GetCheckoutFormParams(FormParameters formParams, InvoiceItem[] invoiceLines);
}
}

View file

@ -0,0 +1,35 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public interface IPaymentGatewayProvider
{
TransactionResult SubmitPaymentTransaction(CheckoutDetails details);
}
}

View file

@ -0,0 +1,142 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class InvoiceResult
{
public bool Succeed;
public int InvoiceId;
public bool NotificationSent;
public string ErrorMessage;
}
[Serializable]
public class Invoice
{
public const string INVOICE_ITEM_TYPE = "INVOICE";
public const int INVOICE_ITEM_SEVERITY = 2;
private int invoiceId;
private string contractId;
private DateTime created;
private DateTime dueDate;
private string invoiceNumber;
private decimal total;
private decimal subTotal;
private int taxationId;
private decimal taxAmount;
private string currency;
private string username;
private int customerId;
private bool paid;
public int InvoiceId
{
get { return this.invoiceId; }
set { this.invoiceId = value; }
}
public int CustomerId
{
get { return this.customerId; }
set { this.customerId = value; }
}
public string ContractId
{
get { return this.contractId; }
set { this.contractId = value; }
}
public string Username
{
get { return this.username; }
set { this.username = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public System.DateTime DueDate
{
get { return this.dueDate; }
set { this.dueDate = value; }
}
public string InvoiceNumber
{
get { return this.invoiceNumber; }
set { this.invoiceNumber = value; }
}
public decimal Total
{
get { return this.total; }
set { this.total = value; }
}
public decimal SubTotal
{
get { return this.subTotal; }
set { this.subTotal = value; }
}
public int TaxationId
{
get { return this.taxationId; }
set { this.taxationId = value; }
}
public decimal TaxAmount
{
get { return this.taxAmount; }
set { this.taxAmount = value; }
}
public string Currency
{
get { return this.currency; }
set { this.currency = value; }
}
public bool Paid
{
get { return this.paid; }
set { this.paid = value; }
}
}
}

View file

@ -0,0 +1,109 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class InvoiceItem
{
private int itemId;
private int invoiceId;
private int serviceId;
private string itemName;
private string typeName;
private int quantity;
private decimal total;
private decimal subTotal;
private decimal unitPrice;
private bool processed;
public int ItemId
{
get { return this.itemId; }
set { this.itemId = value; }
}
public int InvoiceId
{
get { return this.invoiceId; }
set { this.invoiceId = value; }
}
public int ServiceId
{
get { return this.serviceId; }
set { this.serviceId = value; }
}
public string ItemName
{
get { return this.itemName; }
set { this.itemName = value; }
}
public string TypeName
{
get { return this.typeName; }
set { this.typeName = value; }
}
public int Quantity
{
get { return this.quantity; }
set { this.quantity = value; }
}
public decimal Total
{
get { return this.total; }
set { this.total = value; }
}
public decimal SubTotal
{
get { return this.subTotal; }
set { this.subTotal = value; }
}
public decimal UnitPrice
{
get { return this.unitPrice; }
set { this.unitPrice = value; }
}
public bool Processed
{
get { return this.processed; }
set { this.processed = value; }
}
}
}

View file

@ -0,0 +1,220 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Xml.Serialization;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public interface IKeyValueBunch
{
/// <summary>
///
/// </summary>
/// <param name="settingName"></param>
/// <returns></returns>
[XmlIgnore]
string this[string settingName] { get; set; }
/// <summary>
///
/// </summary>
/// <returns></returns>
string[] GetAllKeys();
}
[Serializable]
public class KeyValueBunch : IKeyValueBunch
{
private NameValueCollection _settings;
private bool hasPendingChanges;
public string[][] KeyValueArray;
[XmlIgnore]
public bool IsEmpty
{
get { return (KeyValueArray == null || KeyValueArray.Length == 0); }
}
[XmlIgnore]
public bool HasPendingChanges
{
get { return hasPendingChanges; }
}
[XmlIgnore]
NameValueCollection Settings
{
get
{
//
SyncCollectionsState(true);
//
hasPendingChanges = false;
//
return _settings;
}
}
public string this[string settingName]
{
get
{
return Settings[settingName];
}
set
{
// check whether changes are really made
if (!String.Equals(Settings[settingName], value))
hasPendingChanges = true;
// set setting
Settings[settingName] = value;
//
SyncCollectionsState(false);
}
}
private void SyncCollectionsState(bool inputSync)
{
if (inputSync)
{
if (_settings == null)
{
// create new dictionary
_settings = new NameValueCollection();
// fill dictionary
if (KeyValueArray != null)
{
foreach (string[] pair in KeyValueArray)
_settings.Add(pair[0], pair[1]);
}
}
}
else
{
// rebuild array
KeyValueArray = new string[Settings.Count][];
//
for (int i = 0; i < Settings.Count; i++)
{
KeyValueArray[i] = new string[] { Settings.Keys[i], Settings[Settings.Keys[i]] };
}
}
}
public string[] GetAllKeys()
{
if (Settings != null)
return Settings.AllKeys;
return null;
}
public void RemoveKey(string name)
{
Settings.Remove(name);
//
SyncCollectionsState(false);
}
}
/*public class CommonSettings
{
public const string INTERACTIVE = "interactive";
public const string LIVE_MODE = "live_mode";
public const string USERNAME = "username";
public const string PASSWORD = "password";
}*/
public class ToCheckoutSettings
{
public const string FIXED_CART = "fixed_cart";
public const string SECRET_WORD = "secret_word";
public const string ACCOUNT_SID = "account_sid";
public const string CURRENCY = "2co_currency";
public const string LIVE_MODE = "live_mode";
public const string INTERACTIVE = "interactive";
public const string CONTINUE_SHOPPING_URL = "continue_shopping_url";
}
public class AuthNetSettings
{
public const string MD5_HASH = "md5_hash";
public const string TRANSACTION_KEY = "trans_key";
public const string DEMO_ACCOUNT = "demo_account";
public const string SEND_CONFIRMATION = "send_confirm";
public const string MERCHANT_EMAIL = "merchant_email";
public const string INTERACTIVE = "interactive";
public const string LIVE_MODE = "live_mode";
public const string USERNAME = "username";
}
public class DirectiSettings
{
public const string PARENT_ID = "parent_id";
public const string LIVE_MODE = "live_mode";
public const string USERNAME = "username";
public const string PASSWORD = "password";
public const string SECURE_CHANNEL = "secure_channel";
}
public class EnomSettings
{
public const string LIVE_MODE = "live_mode";
public const string USERNAME = "username";
public const string PASSWORD = "password";
}
public class OffPaymentSettings
{
public const string AUTO_APPROVE = "auto_approve";
public const string TRANSACTION_NUMBER_FORMAT = "transaction_number_format";
}
public class PayPalProSettings
{
public const string INTERACTIVE = "interactive";
public const string USERNAME = "username";
public const string PASSWORD = "password";
public const string SIGNATURE = "signature";
public const string LIVE_MODE = "live_mode";
}
public class PayPalStdSettings
{
public const string BUSINESS = "business";
public const string RETURN_URL = "return_url";
public const string CANCEL_RETURN_URL = "cancel_return_url";
public const string LIVE_MODE = "live_mode";
public const string INTERACTIVE = "interactive";
}
}

View file

@ -0,0 +1,168 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class OrderItem : KeyValueBunch
{
private int productId;
private int typeId;
private bool recurring;
private int billingCycle;
private string itemName;
private int parentIndex = -1;
private int parentSvcId;
private int quantity;
public int Quantity
{
get { return quantity; }
set { quantity = value; }
}
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public int TypeId
{
get { return this.typeId; }
set { this.typeId = value; }
}
public int BillingCycle
{
get { return this.billingCycle; }
set { this.billingCycle = value; }
}
public bool Recurring
{
get { return this.recurring; }
set { this.recurring = value; }
}
public string ItemName
{
get { return this.itemName; }
set { this.itemName = value; }
}
public int ParentIndex
{
get { return this.parentIndex; }
set { this.parentIndex = value; }
}
public int ParentSvcId
{
get { return this.parentSvcId; }
set { this.parentSvcId = value; }
}
public static OrderItem GetHostingPlanItem(int productId, string planName, int cycleId)
{
OrderItem plan = new OrderItem();
plan.productId = productId;
plan.billingCycle = cycleId;
plan.itemName = planName;
plan.recurring = true;
plan.quantity = 1;
plan.typeId = Product.HOSTING_PLAN;
//
return plan;
}
public static OrderItem GetTopLevelDomainItem(int productId, int cycleId, string itemName)
{
OrderItem item = new OrderItem();
item.recurring = true;
item.typeId = Product.TOP_LEVEL_DOMAIN;
item.productId = productId;
item.quantity = 1;
item.billingCycle = cycleId;
item.itemName = itemName;
return item;
}
public static OrderItem GetHostingAddonItem(int productId, int cycleId, int quantity, string itemName)
{
OrderItem item = new OrderItem();
item.billingCycle = cycleId;
item.recurring = cycleId > 0;
item.quantity = quantity;
item.productId = productId;
item.typeId = Product.HOSTING_ADDON;
item.itemName = itemName;
return item;
}
public static OrderItem GetHostingAddonItem(int productId, int quantity, string itemName)
{
return GetHostingAddonItem(productId, quantity, 0, itemName);
}
}
public class OrderResult
{
private bool succeed;
private int resultCode;
private int orderInvoice;
public bool Succeed
{
get { return this.succeed; }
set { this.succeed = value; }
}
public int ResultCode
{
get { return this.resultCode; }
set { this.resultCode = value; }
}
public int OrderInvoice
{
get { return this.orderInvoice; }
set { this.orderInvoice = value; }
}
}
}

View file

@ -0,0 +1,132 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class CustomerPayment
{
public const string PAYMENT_ITEM_TYPE = "PAYMENT";
public const int PAYMENT_ITEM_SEVERITY = 2;
private int paymentId;
private int invoiceId;
private string contractId;
private string transactionId;
private decimal total;
private string currency;
private DateTime created;
private string methodName;
private int pluginId;
private string providerName;
private int statusId;
private string invoiceNumber;
public int PaymentId
{
get { return this.paymentId; }
set { this.paymentId = value; }
}
public int InvoiceId
{
get { return this.invoiceId; }
set { this.invoiceId = value; }
}
public string ContractId
{
get { return this.contractId; }
set { this.contractId = value; }
}
public string TransactionId
{
get { return this.transactionId; }
set { this.transactionId = value; }
}
public decimal Total
{
get { return this.total; }
set { this.total = value; }
}
public string Currency
{
get { return currency; }
set { currency = value; }
}
public DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public string MethodName
{
get { return methodName; }
set { methodName = value; }
}
public int PluginId
{
get { return this.pluginId; }
set { this.pluginId = value; }
}
public string ProviderName
{
get { return this.providerName; }
set { this.providerName = value; }
}
public int StatusId
{
get { return this.statusId; }
set { this.statusId = value; }
}
public TransactionStatus Status
{
get { return (TransactionStatus)this.statusId; }
set { this.statusId = (int)value; }
}
public string InvoiceNumber
{
get { return this.invoiceNumber; }
set { this.invoiceNumber = value; }
}
}
}

View file

@ -0,0 +1,85 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class PaymentMethod
{
public const string CREDIT_CARD = "CREDITCARD";
public const string TCO = "2CO";
public const string PP_ACCOUNT = "PPACCOUNT";
public const string OFFLINE = "OFFLINE";
private int resellerId;
private string methodName;
private int pluginId;
private string displayName;
private bool interactive;
private string supportedItems;
public string MethodName
{
get { return methodName; }
set { methodName = value; }
}
public int PluginId
{
get { return pluginId; }
set { pluginId = value; }
}
public string DisplayName
{
get { return displayName; }
set { displayName = value; }
}
public int ResellerId
{
get { return resellerId; }
set { resellerId = value; }
}
public bool Interactive
{
get { return interactive; }
set { interactive = value; }
}
public string SupportedItems
{
get { return supportedItems; }
set { supportedItems = value; }
}
}
}

View file

@ -0,0 +1,110 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class Product
{
public const int HOSTING_PLAN = 1;
public const int HOSTING_ADDON = 2;
public const int TOP_LEVEL_DOMAIN = 3;
public const string HOSTING_PLAN_NAME = "Hosting Plan";
public const string HOSTING_ADDON_NAME = "Hosting Addon";
public const string TOP_LEVEL_DOMAIN_NAME = "Domain Name";
private int productId;
private string productName;
private string productSku;
private int typeId;
private string description;
private DateTime created;
private bool enabled;
private bool taxInclusive;
private int resellerId;
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public string ProductName
{
get { return this.productName; }
set { this.productName = value; }
}
public string ProductSku
{
get { return this.productSku; }
set { this.productSku = value; }
}
public string Description
{
get { return this.description; }
set { this.description = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public int TypeId
{
get { return this.typeId; }
set { this.typeId = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public bool TaxInclusive
{
get { return this.taxInclusive; }
set { this.taxInclusive = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
}
}

View file

@ -0,0 +1,88 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public enum ProductTypeEnum
{
HostingPlan = 1,
HostingAddon = 2,
DomainName = 3
};
[Serializable]
public class ProductType
{
private int typeId;
private string typeName;
private string provisioningController;
private DateTime created;
private string nativeItemType;
private string serviceItemType;
public int TypeId
{
get { return typeId; }
set { typeId = value; }
}
public string TypeName
{
get { return typeName; }
set { typeName = value; }
}
public string ProvisioningController
{
get { return provisioningController; }
set { provisioningController = value; }
}
public DateTime Created
{
get { return created; }
set { created = value; }
}
public string NativeItemType
{
get { return nativeItemType; }
set { nativeItemType = value; }
}
public string ServiceItemType
{
get { return serviceItemType; }
set { serviceItemType = value; }
}
}
}

View file

@ -0,0 +1,84 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public sealed class EcommerceErrorCodes
{
#region Store Settings
public const int ERROR_NTFY_SUBJECT_TEMPLATE = -20001;
public const int ERROR_NTFY_HTML_TEMPLATE = -20002;
public const int ERROR_NTFY_TEXT_TEMPLATE = -20003;
#endregion
#region Security Checks
public const int ERROR_INSUFFICIENT_USER_ROLE = -20200;
#endregion
#region SPF
public const int ERROR_PARENT_SVC_NOT_FOUND = -20100;
public const int ERROR_PCKG_ADDON_NOT_FOUND = -20101;
#endregion
}
[Serializable]
public class RoutineResult
{
private int resultCode;
private bool succeed;
private string message;
public int ResultCode
{
get { return resultCode; }
set { resultCode = value; }
}
public bool Succeed
{
get { return succeed; }
set { succeed = value; }
}
public string Message
{
get { return message; }
set { message = value; }
}
}
}

View file

@ -0,0 +1,579 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class Service
{
public const string SERVICE_ITEM_TYPE = "ECSERVICE";
public const int SERVICE_ITEM_SEVERITY = 2;
private int serviceId;
private int customerId;
private string username;
private int resellerId;
private string contractId;
private int parentId;
private string serviceName;
private int typeId;
private ServiceStatus status;
private DateTime created;
private DateTime modified;
public int ServiceId
{
get { return this.serviceId; }
set { this.serviceId = value; }
}
public int CustomerId
{
get { return this.customerId; }
set { this.customerId = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
public string ContractId
{
get { return this.contractId; }
set { this.contractId = value; }
}
public string Username
{
get { return this.username; }
set { this.username = value; }
}
public int ParentId
{
get { return this.parentId; }
set { this.parentId = value; }
}
public string ServiceName
{
get { return this.serviceName; }
set { this.serviceName = value; }
}
public int TypeId
{
get { return this.typeId; }
set { this.typeId = value; }
}
public ServiceStatus Status
{
get { return this.status; }
set { this.status = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public System.DateTime Modified
{
get { return this.modified; }
set { this.modified = value; }
}
}
[Serializable]
public class HostingPackageSvc : Service
{
#region Fields
private int productId;
private int planId;
private int packageId;
private UserRole userRole;
private PackageStatus initialStatus;
private int svcCycleId;
private string cycleName;
private string billingPeriod;
private int periodLength;
private decimal setupFee;
private decimal recurringFee;
private string currency;
#endregion
#region Properties
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public int PlanId
{
get { return this.planId; }
set { this.planId = value; }
}
public int PackageId
{
get { return this.packageId; }
set { this.packageId = value; }
}
public WebsitePanel.EnterpriseServer.UserRole UserRole
{
get { return this.userRole; }
set { this.userRole = value; }
}
public WebsitePanel.EnterpriseServer.PackageStatus InitialStatus
{
get { return this.initialStatus; }
set { this.initialStatus = value; }
}
public int SvcCycleId
{
get { return svcCycleId; }
set { svcCycleId = value; }
}
public string CycleName
{
get { return this.cycleName; }
set { this.cycleName = value; }
}
public string BillingPeriod
{
get { return this.billingPeriod; }
set { this.billingPeriod = value; }
}
public int PeriodLength
{
get { return this.periodLength; }
set { this.periodLength = value; }
}
public decimal SetupFee
{
get { return this.setupFee; }
set { this.setupFee = value; }
}
public decimal RecurringFee
{
get { return this.recurringFee; }
set { this.recurringFee = value; }
}
public string Currency
{
get { return this.currency; }
set { this.currency = value; }
}
#endregion
}
[Serializable]
public class HostingAddonSvc : Service
{
#region Fields
private int productId;
private int planId;
private int packageAddonId;
private int quantity;
private bool recurring;
private bool dummyAddon;
private int svcCycleId;
private string cycleName;
private string billingPeriod;
private int periodLength;
private decimal setupFee;
private decimal cyclePrice;
private string currency;
#endregion
#region Properties
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public int PlanId
{
get { return this.planId; }
set { this.planId = value; }
}
public int PackageAddonId
{
get { return this.packageAddonId; }
set { this.packageAddonId = value; }
}
public int Quantity
{
get { return this.quantity; }
set { this.quantity = value; }
}
public bool Recurring
{
get { return this.recurring; }
set { this.recurring = value; }
}
public bool DummyAddon
{
get { return this.dummyAddon; }
set { this.dummyAddon = value; }
}
public int SvcCycleId
{
get { return this.svcCycleId; }
set { this.svcCycleId = value; }
}
public string CycleName
{
get { return this.cycleName; }
set { this.cycleName = value; }
}
public string BillingPeriod
{
get { return this.billingPeriod; }
set { this.billingPeriod = value; }
}
public int PeriodLength
{
get { return this.periodLength; }
set { this.periodLength = value; }
}
public decimal SetupFee
{
get { return this.setupFee; }
set { this.setupFee = value; }
}
public decimal CyclePrice
{
get { return this.cyclePrice; }
set { this.cyclePrice = value; }
}
public string Currency
{
get { return this.currency; }
set { this.currency = value; }
}
#endregion
}
[Serializable]
public class DomainNameSvc : Service, IKeyValueBunch
{
public const string SPF_UPDATE_NS_ACTION = "UPDATE_NS";
public const string SPF_TRANSFER_ACTION = "TRANSFER";
public const string SPF_REGISTER_ACTION = "REGISTER";
#region Fields
private int productId;
private int domainId;
private string providerName;
private int pluginId;
private string fqdn;
private int svcCycleId;
private string cycleName;
private string billingPeriod;
private int periodLength;
private decimal setupFee;
private decimal recurringFee;
private string currency;
private string propertyNames;
private string propertyValues;
#endregion
#region Properties
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public int DomainId
{
get { return this.domainId; }
set { this.domainId = value; }
}
public string ProviderName
{
get { return this.providerName; }
set { this.providerName = value; }
}
public int PluginId
{
get { return this.pluginId; }
set { this.pluginId = value; }
}
public string Fqdn
{
get { return this.fqdn; }
set { this.fqdn = value; }
}
public int SvcCycleId
{
get { return this.svcCycleId; }
set { this.svcCycleId = value; }
}
public string CycleName
{
get { return this.cycleName; }
set { this.cycleName = value; }
}
public string BillingPeriod
{
get { return this.billingPeriod; }
set { this.billingPeriod = value; }
}
public int PeriodLength
{
get { return this.periodLength; }
set { this.periodLength = value; }
}
public decimal SetupFee
{
get { return this.setupFee; }
set { this.setupFee = value; }
}
public decimal RecurringFee
{
get { return this.recurringFee; }
set { this.recurringFee = value; }
}
public string Currency
{
get { return this.currency; }
set { this.currency = value; }
}
[XmlIgnore]
public string PropertyNames
{
get { return this.propertyNames; }
set { this.propertyNames = value; }
}
[XmlIgnore]
public string PropertyValues
{
get { return this.propertyValues; }
set { this.propertyValues = value; }
}
#endregion
private NameValueCollection properties;
public string[][] KeyValueArray;
[XmlIgnore]
NameValueCollection Properties
{
get
{
//
SyncCollectionsState(true);
//
return properties;
}
}
public string this[string settingName]
{
get
{
return Properties[settingName];
}
set
{
// set setting
Properties[settingName] = value;
//
SyncCollectionsState(false);
}
}
private void SyncCollectionsState(bool inputSync)
{
if (inputSync)
{
if (properties == null)
{
// create new dictionary
properties = new NameValueCollection();
// fill dictionary
if (KeyValueArray != null)
{
foreach (string[] pair in KeyValueArray)
properties.Add(pair[0], pair[1]);
}
}
}
else
{
// rebuild array
KeyValueArray = new string[Properties.Count][];
//
for (int i = 0; i < Properties.Count; i++)
{
KeyValueArray[i] = new string[] { Properties.Keys[i], Properties[Properties.Keys[i]] };
}
}
}
public string[] GetAllKeys()
{
if (Properties != null)
return Properties.AllKeys;
return null;
}
}
[Serializable]
public class ServiceHistoryRecord
{
private string cycleName;
private string billingPeriod;
private int periodLength;
private decimal setupFee;
private decimal recurringFee;
private string currency;
private DateTime startDate;
private DateTime endDate;
public string CycleName
{
get { return cycleName; }
set { cycleName = value; }
}
public string BillingPeriod
{
get { return billingPeriod; }
set { billingPeriod = value; }
}
public int PeriodLength
{
get { return periodLength; }
set { periodLength = value; }
}
public decimal SetupFee
{
get { return setupFee; }
set { setupFee = value; }
}
public decimal RecurringFee
{
get { return recurringFee; }
set { recurringFee = value; }
}
public string Currency
{
get { return currency; }
set { currency = value; }
}
public DateTime StartDate
{
get { return startDate; }
set { startDate = value; }
}
public DateTime EndDate
{
get { return endDate; }
set { endDate = value; }
}
}
public enum ServiceStatus
{
Ordered = 0,
Active = 1,
Suspended = 2,
Cancelled = 3
};
}

View file

@ -0,0 +1,101 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class HandlerResponse
{
private int responseId;
private string serviceId;
private int resellerId;
private int invoiceId;
private string contractId;
private string textResponse;
private DateTime received;
private string errorMessage;
private string methodName;
public int ResponseId
{
get { return responseId; }
set { responseId = value; }
}
public string ServiceId
{
get { return serviceId; }
set { serviceId = value; }
}
public int ResellerId
{
get { return resellerId; }
set { resellerId = value; }
}
public int InvoiceId
{
get { return invoiceId; }
set { invoiceId = value; }
}
public string ContractId
{
get { return contractId; }
set { contractId = value; }
}
public string TextResponse
{
get { return textResponse; }
set { textResponse = value; }
}
public DateTime Received
{
get { return received; }
set { received = value; }
}
public string ErrorMessage
{
get { return errorMessage; }
set { errorMessage = value; }
}
public string MethodName
{
get { return methodName; }
set { methodName = value; }
}
}
}

View file

@ -0,0 +1,52 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Xml.Serialization;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class StoreSettings : KeyValueBunch
{
public const string SIGNUP_SETTINGS = "SignupSettings";
public const string SYSTEM_SETTINGS = "SystemSettings";
public const string NEW_INVOICE = "EmitInvoiceTemplate";
public const string PAYMENT_RECEIVED = "PaymentReceivedTemplate";
public const string SERVICE_CANCELLED = "CancelServicesTemplate";
public const string SERVICE_ACTIVATED = "ActivateServicesTemplate";
public const string SERVICE_SUSPENDED = "SuspendServicesTemplate";
public const string TERMS_AND_CONDITIONS = "TermsAndConditions";
public const string WELCOME_MESSAGE = "WelcomeMessage";
}
}

View file

@ -0,0 +1,104 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class SupportedPlugin
{
public const string DOMAIN_REGISTRAR_GROUP = "DOMAIN_REGISTRAR";
public const string CC_GATEWAY_GROUP = "CC_GATEWAY";
public const string TCO_GROUP = "2CO";
public const string PP_ACCOUNT_GROUP = "PP_ACCOUNT";
public const string OFFLINE_GROUP = "OFFLINE";
/*public const string PAYPAL_PRO = "PayPalPro";
public const string AUTHORIZE_NET = "AuthorizeNet";
public const string OFFLINE_PAYMENT = "OfflinePayment";
public const string ENOM = "Enom";
public const string DIRECTI = "Directi";
public const string TO_CHECKOUT = "2Checkout";
public const string PAYPAL_STANDARD = "PayPalStd";*/
public const int AUTHORIZE_NET = 1;
public const int PAYPAL_PRO = 2;
public const int TO_CHECKOUT = 3;
public const int PAYPAL_STANDARD = 4;
public const int OFFLINE_PAYMENTS = 5;
public const int ENOM = 6;
public const int DIRECTI = 7;
public const int OFFLINE_REGISTRAR = 8;
private int pluginId;
private string pluginName;
private string displayName;
private string pluginGroup;
private string typeName;
private bool interactive;
public int PluginId
{
get { return this.pluginId; }
set { this.pluginId = value; }
}
public string PluginName
{
get { return this.pluginName; }
set { this.pluginName = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string PluginGroup
{
get { return this.pluginGroup; }
set { this.pluginGroup = value; }
}
public string TypeName
{
get { return this.typeName; }
set { this.typeName = value; }
}
public bool Interactive
{
get { return this.interactive; }
set { this.interactive = value; }
}
}
}

View file

@ -0,0 +1,55 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public interface ISystemPlugin
{
int ResellerId { get; set; }
/// <summary>
/// Gets or sets Plugin ID
/// </summary>
int PluginId { get; set; }
/// <summary>
/// Gets or sets Plugin Name
/// </summary>
string PluginName { get; set; }
/// <summary>
/// Gets or sets plugin settings
/// </summary>
KeyValueBunch PluginSettings { get; set; }
/// <summary>
/// Gets setting keys that should be encrypted when saving to the metabase
/// </summary>
string[] SecureSettings { get; }
}
}

View file

@ -0,0 +1,113 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public abstract class SystemPluginBase : ISystemPlugin
{
private int resellerId;
private int pluginId;
private string pluginName;
private KeyValueBunch pluginSettings;
public static Hashtable NexusCategories;
public static Hashtable AppPurposes;
static SystemPluginBase()
{
// setup nexus categories
NexusCategories = new Hashtable();
NexusCategories.Add("C11", "US Citizen");
NexusCategories.Add("C12", "Permanent Resident");
NexusCategories.Add("C21", "Business Entity");
NexusCategories.Add("C31", "Foreign Entity");
NexusCategories.Add("C32", "US Based Office");
// setup app purposes
AppPurposes = new Hashtable();
AppPurposes.Add("P1", "For Profit");
AppPurposes.Add("P2", "Non-profit");
AppPurposes.Add("P3", "Personal");
AppPurposes.Add("P4", "Educational");
AppPurposes.Add("P5", "Government");
}
#region ISystemPlugin Members
public int ResellerId
{
get { return resellerId; }
set { resellerId = value; }
}
public int PluginId
{
get { return pluginId; }
set { pluginId = value; }
}
public string PluginName
{
get { return pluginName; }
set { pluginName = value; }
}
public KeyValueBunch PluginSettings
{
get { return pluginSettings; }
set { pluginSettings = value; }
}
public virtual string[] SecureSettings
{
get { return null; }
}
#endregion
protected string GetDomainName(string fqdn)
{
//
int indexOf = fqdn.IndexOf('.');
return fqdn.Substring(0, indexOf);
}
protected string GetDomainTLD(string fqdn)
{
//
int indexOf = fqdn.IndexOf('.');
return fqdn.Substring(indexOf + 1);
}
}
}

View file

@ -0,0 +1,59 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class TLDExtension
{
private string tld;
private int pluginId;
private DateTime created;
public string TLD
{
get { return tld; }
set { tld = value; }
}
public int PluginId
{
get { return pluginId; }
set { pluginId = value; }
}
public DateTime Created
{
get { return created; }
set { created = value; }
}
}
}

View file

@ -0,0 +1,74 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
[Serializable]
public class TaxZone
{
private int _zoneId;
private string _zoneName;
private decimal _zoneTax;
private string _notes;
private Guid _spaceId;
public int ZoneId
{
get { return this._zoneId; }
set { this._zoneId = value; }
}
public string ZoneName
{
get { return this._zoneName; }
set { this._zoneName = value; }
}
public decimal ZoneTax
{
get { return this._zoneTax; }
set { this._zoneTax = value; }
}
public string Notes
{
get { return this._notes; }
set { this._notes = value; }
}
public System.Guid SpaceId
{
get { return this._spaceId; }
set { this._spaceId = value; }
}
}
}

View file

@ -0,0 +1,108 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public enum TaxationType
{
Fixed = 1,
Percentage = 2,
TaxIncluded = 3
};
[Serializable]
public class Taxation
{
private int taxationId;
private int resellerId;
private string country;
private string state;
private string description;
private int typeId;
private decimal amount;
private bool active;
public int TaxationId
{
get { return this.taxationId; }
set { this.taxationId = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
public string Country
{
get { return this.country; }
set { this.country = value; }
}
public string State
{
get { return this.state; }
set { this.state = value; }
}
public string Description
{
get { return this.description; }
set { this.description = value; }
}
public int TypeId
{
get { return this.typeId; }
set { this.typeId = value; }
}
public TaxationType Type
{
get { return (TaxationType)typeId; }
set { typeId = (int)value; }
}
public decimal Amount
{
get { return this.amount; }
set { this.amount = value; }
}
public bool Active
{
get { return this.active; }
set { this.active = value; }
}
}
}

View file

@ -0,0 +1,115 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class TopLevelDomain
{
private int productId;
private int resellerId;
private string productName;
private string productSku;
private bool enabled;
private bool whoisEnabled;
private DateTime created;
private int typeId;
private int pluginId;
private string displayName;
private bool taxInclusive;
public bool TaxInclusive
{
get { return this.taxInclusive; }
set { this.taxInclusive = value; }
}
public int ProductId
{
get { return this.productId; }
set { this.productId = value; }
}
public int ResellerId
{
get { return this.resellerId; }
set { this.resellerId = value; }
}
public string ProductName
{
get { return this.productName; }
set { this.productName = value; }
}
public string ProductSku
{
get { return this.productSku; }
set { this.productSku = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public bool WhoisEnabled
{
get { return this.whoisEnabled; }
set { this.whoisEnabled = value; }
}
public System.DateTime Created
{
get { return this.created; }
set { this.created = value; }
}
public int TypeId
{
get { return this.typeId; }
set { this.typeId = value; }
}
public int PluginId
{
get { return this.pluginId; }
set { this.pluginId = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
}
}

View file

@ -0,0 +1,81 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public enum TransactionStatus
{
Pending = 0,
Approved = 1,
Declined = 2,
};
[Serializable]
public class TransactionResult
{
private bool succeed;
private string statusCode;
private string transactionId;
private TransactionStatus transactionStatus;
private string rawResponse;
public bool Succeed
{
get { return this.succeed; }
set { this.succeed = value; }
}
public string StatusCode
{
get { return this.statusCode; }
set { this.statusCode = value; }
}
public TransactionStatus TransactionStatus
{
get { return this.transactionStatus; }
set { this.transactionStatus = value; }
}
public string TransactionId
{
get { return this.transactionId; }
set { this.transactionId = value; }
}
public string RawResponse
{
get { return this.rawResponse; }
set { this.rawResponse = value; }
}
}
}

View file

@ -0,0 +1,92 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Ecommerce.EnterpriseServer
{
public class TriggerEventArgs : KeyValueBunchBase {}
public abstract class TriggerHandlerBase : ITriggerHandler
{
private string triggerId;
private int ownerId;
private string referenceId;
private string triggerStatus;
#region ITriggerHandler Members
public string TriggerId
{
get { return triggerId; }
set { triggerId = value; }
}
public int OwnerId
{
get { return ownerId; }
set { ownerId = value; }
}
public string FullQualifiedTypeName
{
get { return GetType().AssemblyQualifiedName; }
}
public abstract string TriggerNamespace { get; }
public string ReferenceId
{
get { return referenceId; }
set { referenceId = value; }
}
public string TriggerStatus
{
get { return triggerStatus; }
set { triggerStatus = value; }
}
public abstract void ExecuteTrigger(TriggerEventArgs eventArgs);
#endregion
}
public interface ITriggerHandler
{
string TriggerId { get; set; }
int OwnerId { get; set; }
string FullQualifiedTypeName { get; }
string TriggerNamespace { get; }
string ReferenceId { get; set; }
string TriggerStatus { get; set; }
void ExecuteTrigger(TriggerEventArgs eventArgs);
}
}