forked from korki/mandrill_integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change response to include message, add public json
- Loading branch information
Showing
5 changed files
with
125 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
GIT | ||
remote: [email protected]:spree/endpoint_base.git | ||
revision: c40b9b729247298fc7e91bc4f1f8659388db1d7c | ||
revision: 885403ef1a336cf152e056f9a1803bde9d4c2167 | ||
specs: | ||
endpoint_base (2.0) | ||
active_support | ||
|
@@ -15,7 +15,7 @@ GEM | |
activesupport (= 3.0.0) | ||
activesupport (3.0.0) | ||
addressable (2.3.4) | ||
backports (3.3.0) | ||
backports (3.3.1) | ||
capistrano (2.15.4) | ||
highline | ||
net-scp (>= 1.0.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"email": { | ||
"type": "string", | ||
"required": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"email": { | ||
"type": "string", | ||
"required": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"name": "mandrill", | ||
"description": "Sends transactional emails using Mandrill", | ||
"consumers": [ | ||
{ | ||
"name": "order_confirmation", | ||
"path": "/order_confirmation", | ||
"requires": { | ||
"parameters": [ | ||
{"name": "api_key", "description": "Mandril API key" }, | ||
{"name": "order_confirmation.from", "description": "Reply-to address for email" }, | ||
{"name": "order_confirmation.subject", "description": "Subject of email" }, | ||
{"name": "order_confirmation.template", "description": "Mandrill template name" } | ||
] | ||
}, | ||
"recommends": { | ||
"keys": ["order:new", "order:update"], | ||
"events": [ | ||
{ | ||
"keys": [ {"name": "order_number", "path": "payload.order.actual.number" } ], | ||
"details": [ {"name": "email", "path": "payload.order.actual.email" } ] | ||
} | ||
], | ||
"filters": [{"path": "payload.actual.order.complete", "operator": "eq", "value": "complete"}], | ||
"options": { | ||
"allow_retries": true | ||
} | ||
}, | ||
"produces": { | ||
"messages": [ | ||
{"message": "email:sent", "schema": "http://mandrill.spree.mx/email.sent.json"}, | ||
{"message": "email:failure", "schema": "http://mandrill.spree.mx/email.failure.json" } | ||
] | ||
} | ||
},{ | ||
"name": "order_cancellation", | ||
"path": "/order_cancellation", | ||
"requires": { | ||
"parameters": [ | ||
{"name": "api_key", "description": "Mandril API key" }, | ||
{"name": "order_cancellation.from", "description": "Reply-to address for email" }, | ||
{"name": "order_cancellation.subject", "description": "Subject of email" }, | ||
{"name": "order_cancellation.template", "description": "Mandrill template name" } | ||
] | ||
}, | ||
"recommends": { | ||
"keys": ["order:canceled"], | ||
"events": [ | ||
{ | ||
"keys": [ {"name": "order_number", "path": "payload.order.actual.number" } ], | ||
"details": [ {"name": "email", "path": "payload.order.actual.email" } ] | ||
} | ||
], | ||
"options": { | ||
"allow_retries": true | ||
} | ||
}, | ||
"produces": { | ||
"messages": [ | ||
{"message": "email:sent", "schema": "http://mandrill.spree.mx/email.sent.json"}, | ||
{"message": "email:failure", "schema": "http://mandrill.spree.mx/email.failure.json" } | ||
] | ||
} | ||
},{ | ||
"name": "shipment_confirmation", | ||
"path": "/shipment_confirmation", | ||
"requires": { | ||
"parameters": [ | ||
{"name": "api_key", "description": "Mandril API key" }, | ||
{"name": "shipment_confirmation.from", "description": "Reply-to address for email" }, | ||
{"name": "shipment_confirmation.subject", "description": "Subject of email" }, | ||
{"name": "shipment_confirmation.template", "description": "Mandrill template name" } | ||
] | ||
}, | ||
"recommends": { | ||
"keys": ["shipment:confirmation"], | ||
"events": [ | ||
{ | ||
"keys": [ {"name": "order_number", "path": "payload.order.actual.number" } ], | ||
"details": [ {"name": "email", "path": "payload.order.actual.email" } ] | ||
} | ||
], | ||
"options": { | ||
"allow_retries": true | ||
} | ||
}, | ||
"produces": { | ||
"messages": [ | ||
{"message": "email:sent", "schema": "http://mandrill.spree.mx/email.sent.json"}, | ||
{"message": "email:failure", "schema": "http://mandrill.spree.mx/email.failure.json" } | ||
] | ||
} | ||
} | ||
] | ||
} |