Skip to content

Commit

Permalink
Merge pull request #9 from mttrbrts/mr-prose-fragilegoods-volumediscount
Browse files Browse the repository at this point in the history
Prose for fragile-goods and volumediscount
  • Loading branch information
dselman committed Jan 11, 2018
2 parents c4b8a7a + 152824a commit a59adac
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 27 deletions.
18 changes: 13 additions & 5 deletions fragile-goods/grammar/template.tem
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Price of delivery is $[{deliveryPrice}]
Acceleration must be between [{accelerationMin}] and [{accelerationMax}]
For every reading outside this range pay a $[{accelerationBreachPenalty}] penalty
Delivery must take less than [{deliveryLimitDuration}].
Late deliveries pay a $[{lateDeliveryPenalty}] penalty.
6.1.7 Liquidated Damages for Delayed Delivery.
In the event the EXW delivery date of the Equipment is delayed beyond the delivery schedule as indicated in Annex A, solely through the fault of the Seller, and unless the parties mutually agreed to an extension thereto, the Buyer is entitled to claim liquidated damages in an amount equivalent to $[{lateDeliveryPenalty}].
Prior to implementing the provisions of Article 16.4 pursuant to this section, Buyer agrees that it shall discuss with Seller alternate remedies in good faith.. . . .

7.1 The Equipment to be shipped to the Buyer shall be packed and shipped in accordance with the Specifications and if not specified therein....
Additionally the Equipment should have proper devices on it to record any shock during transportation as any instance of acceleration outside the bounds of [{accelerationMin}]g and [{accelerationMax}]g.
Each shock shall reduce the Contract Price by $[{accelerationBreachPenalty}]. Packing containing fragile materials should be so marked in bold stout letters. . . . .

ANNEX A
Equipment Description, Contract Price and Delivery Schedule

Contract Price is $[{deliveryPrice}] per unit of Equipment.
Delivery Schedule: no later than [{deliveryLimitDuration}] after initiation.
2 changes: 1 addition & 1 deletion fragile-goods/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions fragile-goods/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "fragile-goods",
"version": "0.0.1",
"description": "Price of delivery is $1000.00\r\nAcceleration must be between -0.5 and 0.5\r\nFor every reading outside this range pay a $5.00 penalty\r\nDelivery must take less than 10 seconds.\r\nLate deliveries pay a $200 penalty.",
"version": "0.0.2",
"description": "6.1.7 Liquidated Damages for Delayed Delivery.\r\nIn the event the EXW delivery date of the Equipment is delayed beyond the delivery schedule as indicated in Annex A, solely through the fault of the Seller, and unless the parties mutually agreed to an extension thereto, the Buyer is entitled to claim liquidated damages in an amount equivalent to $200.00.\r\nPrior to implementing the provisions of Article 16.4 pursuant to this section, Buyer agrees that it shall discuss with Seller alternate remedies in good faith.. . . . \r\n \r\n7.1 The Equipment to be shipped to the Buyer shall be packed and shipped in accordance with the Specifications and if not specified therein.... \r\nAdditionally the Equipment should have proper devices on it to record any shock during transportation as any instance of acceleration outside the bounds of -1g and 1g. \r\nEach shock shall reduce the Contract Price by $5.00. Packing containing fragile materials should be so marked in bold stout letters. . . . .\r\n \r\nANNEX A \r\nEquipment Description, Contract Price and Delivery Schedule \r\n \r\nContract Price is $1000.00 per unit of Equipment. \r\nDelivery Schedule: no later than 10 seconds after initiation.",
"author": "Matt Roberts, clause.io",
"license": "Apache-2.0",
"scripts": {
"test": "mocha"
"test": "mocha",
"parse":"cicero parse --template ./ --dsl sample.txt",
"execute":"cicero execute --template ./ --dsl sample.txt --data data.json"
},
"devDependencies": {
"chai": "^4.1.2",
Expand Down
18 changes: 13 additions & 5 deletions fragile-goods/sample.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Price of delivery is $1000.00
Acceleration must be between -0.5 and 0.5
For every reading outside this range pay a $5.00 penalty
Delivery must take less than 10 seconds.
Late deliveries pay a $200 penalty.
6.1.7 Liquidated Damages for Delayed Delivery.
In the event the EXW delivery date of the Equipment is delayed beyond the delivery schedule as indicated in Annex A, solely through the fault of the Seller, and unless the parties mutually agreed to an extension thereto, the Buyer is entitled to claim liquidated damages in an amount equivalent to $200.00.
Prior to implementing the provisions of Article 16.4 pursuant to this section, Buyer agrees that it shall discuss with Seller alternate remedies in good faith.. . . .

7.1 The Equipment to be shipped to the Buyer shall be packed and shipped in accordance with the Specifications and if not specified therein....
Additionally the Equipment should have proper devices on it to record any shock during transportation as any instance of acceleration outside the bounds of -0.5g and 0.5g.
Each shock shall reduce the Contract Price by $5.00. Packing containing fragile materials should be so marked in bold stout letters. . . . .

ANNEX A
Equipment Description, Contract Price and Delivery Schedule

Contract Price is $1000.00 per unit of Equipment.
Delivery Schedule: no later than 10 seconds after initiation.
34 changes: 29 additions & 5 deletions volumediscount/grammar/template.tem
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
Volume Discount Rate. The discount rate is defined according to the following table:
| annual charge | discount rate |
| <[{firstVolume}]M | [{firstRate}]% |
| <[{secondVolume}]M | [{secondRate}]% |
| >[{secondVolume}]M | [{thirdRate}]% |
Volume-Based Card Acceptance Agreement [Abbreviated]

This Agreement is by and between Card, Inc., a New York corporation, and you, the Merchant. By accepting the Card, you agree to be bound by the Agreement.
Discount means an amount that we charge you for accepting the Card, which amount is:
(i) a percentage (Discount Rate) of the face amount of the Charge that you submit, or a flat per-
Transaction fee, or a combination of both; and/or
(ii) a Monthly Flat Fee (if you meet our requirements).

Transaction Processing and Payments. Our Card acceptance, processing, and payment requirements are set forth in the Merchant Regulations. Some requirements are summarized here for ease of reference, but do not supersede the provisions in the Merchant Regulations.
Payment for Charges. We will pay you, through our agent, according to your payment plan in US dollars for the face amount of Charges submitted from your Establishments less all applicable deductions, rejections, and withholdings, which include:
(i) the Discount,
(ii) any amounts you owe us or our Affiliates,
(iii) any amounts for which we have Chargebacks and
(iv) any Credits you submit. Your initial Discount is indicated in the Agreement or otherwise provided to you in writing by us. In addition to your Discount we may charge you additional fees and assessments, as listed in the Merchant Regulations or as otherwise provided to you in writing by us. We may adjust any of these amounts and may change any other amount we charge you for accepting the Card.

SETTLEMENT
a) Settlement Amount. Our agent will pay you according to your payment plan, as described below, in US dollars for the face amount of Charges submitted from your Establishments less all applicable deductions, rejections, and withholdings, which include:
(i) the Discount,
(ii) any amounts you owe us or our Affiliates,
(iii) any amounts for which we have Chargebacks, and (iv) any Credits you submit. Our agent will subtract the full amount of all applicable deductions, rejections, and withholdings, from this payment to you (or debit your Bank Account), but if it cannot, then you must pay it promptly upon demand.
b) Discount. The Discount is determined according to the following table:

| Annual Dollar Volume | Discount |
| Less than $[{firstVolume}] million | [{firstRate}]% |
| $[{firstVolume}] million to $[{secondVolume}] million | [{secondRate}]% |
| Greater than $[{secondVolume}] million | [{thirdRate}]% |

_______________________ _____________________
Card, Inc. Merchant
2 changes: 1 addition & 1 deletion volumediscount/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions volumediscount/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "volumediscount",
"version": "0.0.4",
"version": "0.0.5",
"description": "Volume Discount Rate. The discount rate is defined according to the following table:\r\n| annual charge | discount rate |\r\n| <1M | 3% |\r\n| <10M | 2.9% |\r\n| >10M | 2.8% |\r\n",
"scripts": {
"test": "mocha"
"test": "mocha",
"parse":"cicero parse --template ./ --dsl sample.txt",
"execute":"cicero execute --template ./ --dsl sample.txt --data data.json"
},
"devDependencies": {
"chai": "^4.1.2",
Expand Down
34 changes: 29 additions & 5 deletions volumediscount/sample.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
Volume Discount Rate. The discount rate is defined according to the following table:
| annual charge | discount rate |
| <1M | 3% |
| <10M | 2.9% |
| >10M | 2.8% |
Volume-Based Card Acceptance Agreement [Abbreviated]

This Agreement is by and between Card, Inc., a New York corporation, and you, the Merchant. By accepting the Card, you agree to be bound by the Agreement.
Discount means an amount that we charge you for accepting the Card, which amount is:
(i) a percentage (Discount Rate) of the face amount of the Charge that you submit, or a flat per-
Transaction fee, or a combination of both; and/or
(ii) a Monthly Flat Fee (if you meet our requirements).

Transaction Processing and Payments. Our Card acceptance, processing, and payment requirements are set forth in the Merchant Regulations. Some requirements are summarized here for ease of reference, but do not supersede the provisions in the Merchant Regulations.
Payment for Charges. We will pay you, through our agent, according to your payment plan in US dollars for the face amount of Charges submitted from your Establishments less all applicable deductions, rejections, and withholdings, which include:
(i) the Discount,
(ii) any amounts you owe us or our Affiliates,
(iii) any amounts for which we have Chargebacks and
(iv) any Credits you submit. Your initial Discount is indicated in the Agreement or otherwise provided to you in writing by us. In addition to your Discount we may charge you additional fees and assessments, as listed in the Merchant Regulations or as otherwise provided to you in writing by us. We may adjust any of these amounts and may change any other amount we charge you for accepting the Card.

SETTLEMENT
a) Settlement Amount. Our agent will pay you according to your payment plan, as described below, in US dollars for the face amount of Charges submitted from your Establishments less all applicable deductions, rejections, and withholdings, which include:
(i) the Discount,
(ii) any amounts you owe us or our Affiliates,
(iii) any amounts for which we have Chargebacks, and (iv) any Credits you submit. Our agent will subtract the full amount of all applicable deductions, rejections, and withholdings, from this payment to you (or debit your Bank Account), but if it cannot, then you must pay it promptly upon demand.
b) Discount. The Discount is determined according to the following table:

| Annual Dollar Volume | Discount |
| Less than $1 million | 3.00% |
| $1 million to $10 million | 2.90% |
| Greater than $10 million | 2.80% |

_______________________ _____________________
Card, Inc. Merchant

0 comments on commit a59adac

Please sign in to comment.