# Getting Started

### Important Notice

In the upcoming months, we are planning to change the IDs of, line items, metrics, fields, components, datatables, assemblies, component groups, and field groups. The IDs will switch to an alpha-numerical format. Project and Bid IDs are expected to remain as an integer and unchanged. All legacy bid data in our system will be updated. Breaking changes will be minimal, but are expected.

### Concepts

A Project contains multiple Bids and summations of the bid results. Projects also have statuses (ie. open/closed/win/loss), and can have assigned users.

Bids are self-contained, self-assessing instances that have many types of bid entities. Line Items, Metrics, Fields, Assemblies, and Components are the most common. A bid sums up the line items' values.

A Line Item is a bid entity that represents a specific cost. The line item contain basic information like cost, markup, tax, and price. Line items compute their values based on the fields, metrics, and other bid entities it depends on.

Metrics are another type of bid entity the represent only numerical values. Metrics can be configured to depend on any other bid entity and apply a mathmatical formula.

Fields have multiple type of inputs: number, boolean, list, and text. They are the primary way to manipulate a bid, though other bid entities can have their values overridden.

Components help organize line items in a nested format. Components sum the nested line items' values. Changing a component value, for example `component.cost = 5000.00`, will proportionally apply the value to the nested line items.

An Assembly is a special type of bid entity, that represents a package of Fields, Line Items, and Metrics. Assemblies can be inserted into a bid, adding new bid entities.

Datatables are simple object stores, typically used for pricing tables and other structured data. Fields can reference datatables to generate a selectable list with associated values.

### Code Examples

The following demonstrates how to set up an authorized context, loading a project, making changes, and saving.

Create a context with an authorization token

    const config = { token: "Bearer auth_token" };
    const pvbid = PVBid.createContext(config);

Important Note: the token string passed to the `config.token` property should include `Bearer` prefix.

Load a self assessing Project instance

    let project = await pvbid.getProject(projectId);

Setup autosave

    project.onDelay("changed", 1500, "requesterId", () => project.save());

Create a new project (w/bid)

    const newProject = await pvbid.repositories.projects.create({ title: "New Project" }); // initializes the new project
    const project = await pvbid.getProject(newProject.id); // gets the self assessing project instance

Create a new bid in a project

    await project.createBid("Bid Title");

Choose a bid to modify

Project instances contain a list of their child bids.

    let bid = project.bids[bidId];

Making changes to the bid's properties

Many properties will trigger the bid to self assess. For example setting the `bid.cost` property will fire its `assessing` event. `bid.title` will not assess, but will flag the bid as dirty.

    bid.title = "New Title";
    bid.cost = 155555.99;

Find a Field by its title and modify its value

The type of bid entities include: `line_item`, `metric`, `field`, `component`, `assembly`, `datatable`, `component_group`, and `field_group`.

    let fields = bid.entities.searchByTitle("field", "Customer Name");
    if(fields.length > 0){
        fields[0].value = "John Doe";
    }

Find a Metric by its id and modify its value

    let metric = bid.entities.metrics(metricId);
    if (metric) metric.value = 123.45;

Manually assessing the bid

It is a good idea to assess (calculate) the bid after making changes to Metrics, Fields and Variables.

    bid.assess();
    // OR
    bid.reassessAll(true); // forces a full reassessment of ALL entities within the bid

Manually save the bid, underlying bid entities, and parent project

Saving a project also saves the bids and underlying data. You can immediately save a project any time. However, if an underlying bid is still calculating its results, any futher changes after saving the project will not persist. When a project and bids are finished calculating, the project instance will pass an `assessed` event.

    project.save();
    // OR
    project.once("assessed", () => project.save());

# Getting Started

### Important Notice

In the upcoming months, we are planning to change the IDs of, line items, metrics, fields, components, datatables, assemblies, component groups, and field groups. The IDs will switch to an alpha-numerical format. Project and Bid IDs are expected to remain as an integer and unchanged. All legacy bid data in our system will be updated. Breaking changes will be minimal, but are expected.

### Concepts

A Project contains multiple Bids and summations of the bid results. Projects also have statuses (ie. open/closed/win/loss), and can have assigned users.

Bids are self-contained, self-assessing instances that have many types of bid entities. Line Items, Metrics, Fields, Assemblies, and Components are the most common. A bid sums up the line items' values.

A Line Item is a bid entity that represents a specific cost. The line item contain basic information like cost, markup, tax, and price. Line items compute their values based on the fields, metrics, and other bid entities it depends on.

Metrics are another type of bid entity the represent only numerical values. Metrics can be configured to depend on any other bid entity and apply a mathmatical formula.

Fields have multiple type of inputs: number, boolean, list, and text. They are the primary way to manipulate a bid, though other bid entities can have their values overridden.

Components help organize line items in a nested format. Components sum the nested line items' values. Changing a component value, for example `component.cost = 5000.00`, will proportionally apply the value to the nested line items.

An Assembly is a special type of bid entity, that represents a package of Fields, Line Items, and Metrics. Assemblies can be inserted into a bid, adding new bid entities.

Datatables are simple object stores, typically used for pricing tables and other structured data. Fields can reference datatables to generate a selectable list with associated values.

### Code Examples

The following demonstrates how to set up an authorized context, loading a project, making changes, and saving.

Create a context with an authorization token

    const config = { token: "Bearer auth_token" };
    const pvbid = PVBid.createContext(config);

Important Note: the token string passed to the `config.token` property should include `Bearer` prefix.

Load a self assessing Project instance

    let project = await pvbid.getProject(projectId);

Setup autosave

    project.onDelay("changed", 1500, "requesterId", () => project.save());

Create a new project (w/bid)

    const newProject = await pvbid.repositories.projects.create({ title: "New Project" }); // initializes the new project
    const project = await pvbid.getProject(newProject.id); // gets the self assessing project instance

Create a new bid in a project

    await project.createBid("Bid Title");

Choose a bid to modify

Project instances contain a list of their child bids.

    let bid = project.bids[bidId];

Making changes to the bid's properties

Many properties will trigger the bid to self assess. For example setting the `bid.cost` property will fire its `assessing` event. `bid.title` will not assess, but will flag the bid as dirty.

    bid.title = "New Title";
    bid.cost = 155555.99;

Find a Field by its title and modify its value

The type of bid entities include: `line_item`, `metric`, `field`, `component`, `assembly`, `datatable`, `component_group`, and `field_group`.

    let fields = bid.entities.searchByTitle("field", "Customer Name");
    if(fields.length > 0){
        fields[0].value = "John Doe";
    }

Find a Metric by its id and modify its value

    let metric = bid.entities.metrics(metricId);
    if (metric) metric.value = 123.45;

Manually assessing the bid

It is a good idea to assess (calculate) the bid after making changes to Metrics, Fields and Variables.

    bid.assess();
    // OR
    bid.reassessAll(true); // forces a full reassessment of ALL entities within the bid

Manually save the bid, underlying bid entities, and parent project

Saving a project also saves the bids and underlying data. You can immediately save a project any time. However, if an underlying bid is still calculating its results, any futher changes after saving the project will not persist. When a project and bids are finished calculating, the project instance will pass an `assessed` event.

    project.save();
    // OR
    project.once("assessed", () => project.save());

# Repositories

Included in the SDK are multiple repositories to easily access data from the server. The repositories are initialized within the PVBidContext.

Available Repositories

- `pvbid.repositories.bids` See BidRepository
- `pvbid.repositories.projects` See ProjectRepository
- `pvbid.repositories.projectStatuses` See ProjectStatusRepository
- `pvbid.repositories.tags` See TagRepository
- `pvbid.repositories.snapshots` See SnapshotRepository
- `pvbid.repositories.assemblies` See AssemblyRepository
- `pvbid.repositories.users` See UserRepository
- `pvbid.repositories.predictionModels` See PredictionModelRepository

### Code Examples

Retrieving an array of projects

    let params = {
        order_by: "created_at",
        sort_order: "asc",
        per_page: 50
    }

    try {
        let projects = await pvbid.repositories.projects.get(params);
        console.log(projects) //prints an array of project data.
    } catch(error) {
        //handle error;
    }

# Data Models

### Project

    {
        "id": 461,
        "account_id": 3,
        "title": "New Project",
        "cost": 1200,
        "taxable_cost": 0,
        "price": 1587,
        "tax_percent": 0,
        "markup_percent": 0,
        "margin_percent": 13.0435,
        "labor_cost": 0,
        "labor_hours": 0,
        "tax": 180,
        "markup": 207,
        "watts": 1350,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-27T01:10:54+00:00",
        "project_status_id": 28,
        "closed_at": null,
        "reconciled_at": null,
        "actual_hours": null,
        "actual_cost": null,
        "project_status": {
            "id": 28,
            "account_id": 3,
            "title": "Open",
            "core_status": "open",
            "is_reserved": true,
            "is_won": false,
            "order_index": 0,
            "created_at": "2017-09-26T22:46:28+00:00",
            "updated_at": "2017-09-26T22:46:28+00:00"
        },
        "bids": [
            {
                "id": 190,
                "project_id": 461
            }
        ]
    }

### Bid

    {
        "id": 190,
        "account_id": 3,
        "user_id": 7,
        "title": "New Bid",
        "cost": 1200,
        "taxable_cost": 1200,
        "price": 1587,
        "tax_percent": 0,
        "markup_percent": 0,
        "margin_percent": 13.04,
        "tax": 180,
        "markup": 207,
        "variables": {
            "tax": {
                "type": "number",
                "title": "Tax Percent",
                "value": 15,
                "is_reserved": true
            },
            "wage": {
                "type": "number",
                "title": "Wage",
                "value": 35,
                "is_reserved": true
            },
            "burden": {
                "type": "number",
                "title": "Burden",
                "value": 5,
                "is_reserved": true
            },
            "labels": {
                "type": "list",
                "title": "Labels",
                "value": [
                    {
                        "text": "Labor"
                    },
                    {
                        "text": "Materials"
                    },
                    {
                        "text": "Equipment"
                    }
                ],
                "is_reserved": true
            },
            "markup": {
                "type": "number",
                "title": "Markup Percent",
                "value": 15,
                "is_reserved": true
            },
            "escalator": {
                "type": "number",
                "title": "Escalator",
                "value": 1,
                "is_reserved": true
            },
            "sub_margins": {
                "type": "input_list",
                "title": "Sub Margins",
                "value": [],
                "is_reserved": true
            },
            "markup_strategy": {
                "type": "boolean",
                "title": "Include Tax in Markup",
                "value": true,
                "is_reserved": true
            },
            "predictive_pricing": {
                "type": "boolean",
                "title": "Predictive Pricing Enabled",
                "value": false,
                "is_reserved": true
            },
            "use_computed": {
                "type": "boolean",
                "title": "Use computed values when available (Predictive Pricing)",
                "value": true,
                "is_reserved": true
            },

        },
        "system_version": 1,
        "definition_id": 0,
        "definition_version": 1,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-27T01:10:54+00:00",
        "integrations": [],
        "config": {
            "predicted_values": [],
            "undefined_prop_flags": [],
        },
        "is_locked": false,
        "is_shell": false,
        "reconciled_at": null,
        "actual_hours": null,
        "actual_cost": null,
        "bid_status_id": null,
        "closed_at": null,
        "project_id": 461,
        "watts": 1350,
        "labor_hours": 0,
        "labor_cost": 0,
        "margin_of_error": 0,
        "is_active": true,
        "user": {
            "id": 7,
            "name": "Test User",
            "license": "estimator",
            "roles": [
                {
                    "id": 2,
                    "name": "admin",
                    "display_name": "Admin",
                    "description": "User is allowed to manage account wide settings, bids, and definitions.",
                    "created_at": "2017-09-12 18:13:37",
                    "updated_at": "2017-09-12 18:13:37",
                    "pivot": {
                        "user_id": 7,
                        "role_id": 2
                    }
                },
                {
                    "id": 4,
                    "name": "estimator",
                    "display_name": "Estimator",
                    "description": "User is allowed to create and edit bids with advance estimating tools.",
                    "created_at": "2017-09-12 18:13:37",
                    "updated_at": "2017-09-12 18:13:37",
                    "pivot": {
                        "user_id": 7,
                        "role_id": 4
                    }
                }
            ]
        }
    }

### Line Item

    {
        "id": 49661,
        "bid_id": 190,
        "account_id": 3,
        "title": "General Line Item",
        "is_active": true,
        "is_included": true,
        "config": {
            "comments": [],
            "order_index": 0,
            "assembly_id": null,
            "type": "dollar",
            "quantity": {
                "type": "value",
                "value": 0
            },
            "per_quantity": {
                "type": "value",
                "value": 0
            },
            "base": 0,
            "formula": "1",
            "is_predicted_cost": false,
            "is_predicted_labor_hours": false,
            "dependencies": {
                "tax": {
                    "type": "bid_variable",
                    "field": "tax",
                    "bid_entity_id": "bid_variable"
                },
                "wage": {
                    "type": "bid_variable",
                    "field": "wage",
                    "bid_entity_id": "bid_variable"
                },
                "burden": {
                    "type": "bid_variable",
                    "field": "burden",
                    "bid_entity_id": "bid_variable"
                },
                "markup": {
                    "type": "bid_variable",
                    "field": "markup",
                    "bid_entity_id": "bid_variable"
                },
                "scalar": [],
                "quantity": [],
                "escalator": {
                    "type": "bid_variable",
                    "field": "escalator",
                    "bid_entity_id": "bid_variable"
                },
                "per_quantity": []
            },
            "rules": [
                {
                    "type": "always_include",
                    "title": "Always Include"
                }
            ],
            "undefined_prop_flags": [],
            "rule_inclusion": "any",
            "overrides": {},
            "short_code": "line:general_line_item",
            "description": ""
        },
        "cost": 0,
        "taxable_cost": 0,
        "price": 0,
        "tax": 0,
        "tax_percent": 15,
        "markup": 0,
        "markup_percent": 15,
        "quantity": 0,
        "per_quantity": 0,
        "multiplier": 1,
        "burden": 5,
        "wage": 35,
        "base": 0,
        "escalator": 1,
        "labor_hours": 0,
        "actual_cost": null,
        "acutal_hours": null,
        "definition_id": 1577,
        "definition_version": 2,
        "type": "line_item",
        "created_at": "2017-09-26 23:04:55",
        "updated_at": "2017-09-27 01:10:55"
    }

### Field

    {
        "id": 18262,
        "account_id": 3,
        "bid_id": 190,
        "title": "Module Type",
        "value": "mhzk",
        "is_active": true,
        "config": {
            "type": "list",
            "constraint": "Whole",
            "short_code": "field:module_type",
            "description": "",
            "dependencies": {
                "auto_a": {
                    "type": null,
                    "field": null
                },
                "datatable": {
                    "type": "datatable",
                    "field": null,
                    "bid_entity_id": 7580
                }
            },
            "has_null_dependency": false,
            "is_auto_selected": false
        },
        "definition_id": 903,
        "definition_version": 2,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-27T01:10:55+00:00",
        "actual_value": null,
        "type": "field"
    }

### Metric

    {
        "id": 36093,
        "account_id": 3,
        "bid_id": 190,
        "title": "Watts",
        "value": 1350,
        "config": {
            "formula": "a*b",
            "short_code": "metric:watts",
            "dependencies": {
                "a": {
                    "type": "field",
                    "field": "clpa",
                    "bid_entity_id": 18262
                },
                "b": {
                    "type": "field",
                    "field": "value",
                    "bid_entity_id": 18263
                }
            }
        },
        "definition_id": 840,
        "definition_version": 9,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-27T01:10:55+00:00",
        "has_null_dependency": false,
        "actual_value": null,
        "is_active": true,
        "type": "metric"
    }

### Datatable

     {
        "id": 7580,
        "account_id": 3,
        "bid_id": 190,
        "title": "Modules",
        "config": {
            "rows": [
                {
                    "id": "mhzk",
                    "values": ["Module 1", "400.00", "450"],
                    "$$hashKey": "object:527"
                },
                {
                    "id": "be6f",
                    "values": ["Module 2", "300.00", "250"],
                    "$$hashKey": "object:528"
                }
            ],
            "columns": [
                {
                    "id": "at57",
                    "type": "string",
                    "title": "Module",
                    "is_key": true,
                    "$$hashKey": "object:521"
                },
                {
                    "id": "tp7q",
                    "type": "string",
                    "title": "Unit Price",
                    "is_key": false,
                    "$$hashKey": "object:522"
                },
                {
                    "id": "clpa",
                    "type": "string",
                    "title": "Watts",
                    "is_key": false,
                    "$$hashKey": "object:523"
                }
            ]
        },
        "definition_id": 266,
        "definition_version": 3,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-27T01:10:55+00:00",
        "is_active": 1,
        "type": "datatable"
    }

### Component

    {
        "id": 62470,
        "bid_id": 190,
        "account_id": 3,
        "title": "Modules",
        "is_active": true,
        "config": {
            "is_nested": false,
            "components": [],
            "line_items": [49665],
            "component_group_id": 813,
            "parent_component_id": null,
            "comments": [],
            "description": null,
            "order_index": 0,
            "undefined_prop_flags": [],
            "predicted_values": [],
            "short_code": "component:modules"
        },
        "properties": {
            "base": {
                "value": 0,
                "config": {
                    "data_type": "number"
                }
            },
            "wage": {
                "value": 35,
                "config": {
                    "data_type": "number"
                }
            },
            "burden": {
                "value": 5,
                "config": {
                    "data_type": "number"
                }
            },
            "base_avg": {
                "value": 0,
                "config": {
                    "data_type": "number"
                }
            },
            "quantity": {
                "value": 3,
                "config": {
                    "data_type": "number"
                }
            },
            "wage_avg": {
                "value": 0,
                "config": {
                    "data_type": "number"
                }
            },
            "burden_avg": {
                "value": 0,
                "config": {
                    "data_type": "number"
                }
            },
            "per_quantity": {
                "value": 400,
                "config": {
                    "data_type": "number"
                }
            },
            "quantity_avg": {
                "value": 3,
                "config": {
                    "data_type": "number"
                }
            },
            "included_count": {
                "value": 1,
                "config": {
                    "data_type": "number"
                }
            },
            "per_quantity_avg": {
                "value": 400,
                "config": {
                    "data_type": "number"
                }
            },
            "included_labor_count": {
                "value": 0,
                "config": {
                    "data_type": "number"
                }
            }
        },
        "cost": 1200,
        "taxable_cost": 1200,
        "price": 1587,
        "tax_percent": 15,
        "markup_percent": 15,
        "tax": 180,
        "markup": 207,
        "labor_hours": 0,
        "labor_cost": 0,
        "non_labor_cost": 1200,
        "actual_hours": null,
        "actual_cost": null,
        "definition_id": 1726,
        "definition_version": 3,
        "type": "component",
        "created_at": "2017-09-26 23:04:55",
        "updated_at": "2017-09-27 01:10:55"
    }

### Component Group

     {
        "id": 813,
        "account_id": 3,
        "bid_id": 190,
        "title": "Cost Codes",
        "config": [],
        "definition_id": 43,
        "definition_version": 2,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-26T23:04:55+00:00",
        "is_active": 1,
        "type": "component_group"
    }

### Field Group

    {
        "id": 4108,
        "account_id": 3,
        "bid_id": 190,
        "title": "General",
        "config": {
            "fields": [18262, 18263],
            "order_index": 0
        },
        "definition_id": 109,
        "definition_version": 4,
        "created_at": "2017-09-26T23:04:55+00:00",
        "updated_at": "2017-09-26T23:04:55+00:00",
        "is_active": 1,
        "type": "field_group"
    }

# CHANGELOG

### 1.1.5 (2019-01-11)

Features:

- Field: Introduced the `anchor` property. `Anchors` are a means for identifying similar entities universally across any assembly and any account

Improvements:

- Bid: `bid.addAssemblies()` now returns the newly created entities.
- Assembly: Exposed `assembly.definitionId`

### 1.1.4 (2018-11-02)

Bug Fixes:

- Formula Constant Evaluation: Fixed problem with variables and math constants (e.g. `pi`) conflicting during evaluation

### 1.1.3 (2018-10-24)

Features:

- PredictionModels Repository: `repositories.predictionModels.getData(id)` retrieves specific prediction model and the model data

### 1.1.2 (2018-10-23)

Improvements:

- Documentation: Add additional examples to the Getting Started section of the Manual

Bug Fixes:

- Documentation: Fix broken links

### 1.1.1 (2018-10-18)

Features:

- Predictive Pricing: Introduced services to handle the evaluation of prediction models
- LineItem: Line items can now determine their value by evaluating a prediction model if configured to do so. A predicted value will be used if the `predictive_pricing` bid variable is `true` and the line item's value cannot be computed by evaluating it's dependencies. The computed value may be overriden by setting the `use_computed` bid variable to `false` or `lineItem.useComputedValueWhenAvailable` to `false`. The bid must have a non-zero value for Watts.
- LineItem: `LineItem.isWeighted` determine or set a line items weighted switch. Predicted line items can optionally be weighted by their total historic inclusion count
- LineItem: `LineItem.getPredicted('cost')` determines the predicted cost of the line item using its prediction models
- Bid|LineItem|Component: `Bid|LineItem|Component.isPredicted(property)` determines if a property is being predicted
- BidEntity: `BidEntity.hasNullDependency(property)` determines if the property depends on an undefined dependency

Improvements:

- BidVariable: Expose `isReserved` property
- PredictionModels Repository: `repositories.predictionModels.get()` retrieves prediction models for account or specified lineItemDefId
- Project: `predictionModels` property allows access to project's prediction models

Bug Fixes:

- BidVariable: execute a full reassessment when `markup_strategy` is changed
- Bid: `bid.entities.getDependencyValue` now returns `null` instead of `0` for undefined dependencies

### 1.0.39 (2018-08-30)

Bug Fixes:

- Project: Improve tracking of changes to the data while project is saving

### 1.0.38 (2018-08-29)

Bug Fixes:

- Bid: Fix bug in submargin back-calculation

### 1.0.37 (2018-08-20)

Changes:

- Field: For number type fields, getters return value typed as number (instead of string)

### 1.0.36 (2018-07-12)

Bug Fixes:

- Bid Validation Improved formula reference validation

### 1.0.35 (2018-06-21)

Improvements:

- LineItem & Component Added new editable and computable `costWatt` and `priceWatt` properties.
- LineItem & Component Added new readonly `costWithTax` property.

### 1.0.34 (2018-06-19)

Bug Fixes:

- ProjectRepository: Project `save()` hotfix to prevent saving when a project is pristine.

### 1.0.33 (2018-06-18)

Bug Fixes:

- ProjectRepository: Project `save()` persists changes even if no bids were modified

### 1.0.32 (2018-05-30)

Changes:

- Component: Expose the componentGroupId property

### 1.0.31 (2018-05-29)

Bug Fixes:

- Snapshot: Expose the save() method from the snapshot repository
- CacheRepository: The cache is invalidated when the `create()` method is used

### 1.0.30 (2018-05-24)

Bug Fixes:

- Documentation: Link to the changelog from the docs

### 1.0.29 (2018-05-24)

Bug Fixes:

- Bid: Return a promise rejection from the `bid.lock()` method if the bid cannot be locked

# LICENSE

1. Preamble: This Agreement, signed on Sep 16, 2017 (hereinafter: Effective Date) governs the relationship between any Entity, (hereinafter: Licensee) and PVBid, Inc, a duly registered company in whose principal place of business is Denver (hereinafter: Licensor). This Agreement sets the terms, rights, restrictions and obligations on using PVBid SDK (hereinafter: The Software) created and owned by Licensor, as detailed herein

2. License Grant: Licensor hereby grants Licensee a Personal, Non-assignable & non-transferable, Commercial, Royalty free, Without the rights to create derivative works, Non-exclusive license, all with accordance with the terms set forth and other legal restrictions set forth in 3rd party software used while running Software.

- 2.1. Limited: Licensee may use Software for the purpose of:
  - 2.1.1. Running Software on Licensee’s Website[s] and Server[s];
  - 2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s];
  - 2.1.3. Publishing Software’s output to Licensee and 3rd Parties;
  - 2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries);
  - 2.1.5. Modify Software to suit Licensee’s needs and specifications.
- 2.2. Binary Restricted: Licensee may sublicense Software as a part of a larger work containing more than Software, distributed solely in Object or Binary form under a personal, non-sublicensable, limited license. Such redistribution shall be limited to unlimited codebases.
- 2.3. Non Assignable & Non-Transferable: Licensee may not assign or transfer his rights and duties under this license.
- 2.4. Commercial, Royalty Free: Licensee may use Software for any purpose, including paid-services, without any royalties

3. Term & Termination: The Term of this license shall be until terminated. Licensor may terminate this Agreement, including Licensee’s license in the case where Licensee :

- 3.1. became insolvent or otherwise entered into any liquidation process; or
- 3.2. exported The Software to any jurisdiction where licensor may not enforce his rights under this agreements in; or
- 3.3. Licensee was in breach of any of this license's terms and conditions and such breach was not cured, immediately upon notification; or
- 3.4. Licensee in breach of any of the terms of clause 2 to this license; or
- 3.5. Licensee otherwise entered into any arrangement which caused Licensor to be unable to enforce his rights under this License.

4. Payment: In consideration of the License granted under clause 2, Licensee shall pay Licensor a fee, via Credit-Card, PayPal or any other mean which Licensor may deem adequate. Failure to perform payment shall construe as material breach of this Agreement.

5. Upgrades, Updates and Fixes: Licensor may provide Licensee, from time to time, with Upgrades, Updates or Fixes, as detailed herein and according to his sole discretion. Licensee hereby warrants to keep The Software up-to-date and install all relevant updates and fixes, and may, at his sole discretion, purchase upgrades, according to the rates set by Licensor. Licensor shall provide any update or Fix free of charge; however, nothing in this Agreement shall require Licensor to provide Updates or Fixes.

- 5.1. Upgrades: for the purpose of this license, an Upgrade shall be a material amendment in The Software, which contains new features and or major performance improvements and shall be marked as a new version number. For example, should Licensee purchase The Software under version 1.X.X, an upgrade shall commence under number 2.0.0.
- 5.2. Updates for the purpose of this license, an update shall be a minor amendment in The Software, which may contain new features or minor improvements and shall be marked as a new sub-version number. For example, should Licensee purchase The Software under version 1.1.X, an upgrade shall commence under number 1.2.0.
- 5.3. Fix: for the purpose of this license, a fix shall be a minor amendment in The Software, intended to remove bugs or alter minor features which impair the The Software's functionality. A fix shall be marked as a new sub-sub-version number. For example, should Licensee purchase Software under version 1.1.1, an upgrade shall commence under number 1.1.2.

6. Support: Software is provided under an AS-IS basis and without any support, updates or maintenance. Nothing in this Agreement shall require Licensor to provide Licensee with support or fixes to any bug, failure, mis-performance or other defect in The Software.

- 6.1. Bug Notification: Licensee may provide Licensor of details regarding any bug, defect or failure in The Software promptly and with no delay from such event; Licensee shall comply with Licensor's request for information regarding bugs, defects or failures and furnish him with information, screenshots and try to reproduce such bugs, defects or failures.
- 6.2. Feature Request: Licensee may request additional features in Software, provided, however, that (i) Licensee shall waive any claim or right in such feature should feature be developed by Licensor; (ii) Licensee shall be prohibited from developing the feature, or disclose such feature request, or feature, to any 3rd party directly competing with Licensor or any 3rd party which may be, following the development of such feature, in direct competition with Licensor; (iii) Licensee warrants that feature does not infringe any 3rd party patent, trademark, trade-secret or any other intellectual property right; and (iv) Licensee developed, envisioned or created the feature solely by himself.

7. Liability: To the extent permitted under Law, The Software is provided under an AS-IS basis. Licensor shall never, and without any limit, be liable for any damage, cost, expense or any other payment incurred by Licensee as a result of Software’s actions, failure, bugs and/or any other interaction between The Software and Licensee’s end-equipment, computers, other software or any 3rd party, end-equipment, computer or services. Moreover, Licensor shall never be liable for any defect in source code written by Licensee when relying on The Software or using The Software’s source code.

8. Warranty:

- 8.1. Intellectual Property: Licensor hereby warrants that The Software does not violate or infringe any 3rd party claims in regards to intellectual property, patents and/or trademarks and that to the best of its knowledge no legal action has been taken against it for any infringement or violation of any 3rd party intellectual property rights.
- 8.2. No-Warranty: The Software is provided without any warranty; Licensor hereby disclaims any warranty that The Software shall be error free, without defects or code which may cause damage to Licensee’s computers or to Licensee, and that Software shall be functional. Licensee shall be solely liable to any damage, defect or loss incurred as a result of operating software and undertake the risks contained in running The Software on License’s Server[s] and Website[s].
- 8.3. Prior Inspection: Licensee hereby states that he inspected The Software thoroughly and found it satisfactory and adequate to his needs, that it does not interfere with his regular operation and that it does meet the standards and scope of his computer systems and architecture. Licensee found that The Software interacts with his development, website and server environment and that it does not infringe any of End User License Agreement of any software Licensee may use in performing his services. Licensee hereby waives any claims regarding The Software's incompatibility, performance, results and features, and warrants that he inspected the The Software.

9. No Refunds: Licensee warrants that he inspected The Software according to clause 7(c) and that it is adequate to his needs. Accordingly, as The Software is intangible goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation or restitution for any reason whatsoever, even if The Software contains material flaws.

10. Indemnification: Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for any lawsuit brought against it in regards to Licensee’s use of The Software in means that violate, breach or otherwise circumvent this license, Licensor's intellectual property rights or Licensor's title in The Software. Licensor shall promptly notify Licensee in case of such legal action and request Licensee’s consent prior to any settlement in relation to such lawsuit or claim.

11. Governing Law, Jurisdiction: Licensee hereby agrees not to initiate class-action lawsuits against Licensor in relation to this license and to compensate Licensor for any legal fees, cost or attorney fees should any claim brought by Licensee against Licensor be denied, in part or in full.