Skip to content

Commit 55f2a9a

Browse files
authored
Merge pull request #33 from bringg/remove-submit-tip
Remove "submitTip"
2 parents 2f2a27e + 30de998 commit 55f2a9a

File tree

5 files changed

+2
-47
lines changed

5 files changed

+2
-47
lines changed

BringgSDK.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -515,47 +515,6 @@ var BringgSDK = (function () {
515515
}
516516
};
517517

518-
/**
519-
*
520-
*/
521-
module.submitTip = function (tip) {
522-
var canvas = document.getElementById('newSignature');// save canvas image as data url (png format by default)
523-
var blob = dataURItoBlob(canvas.toDataURL('image/jpg'));
524-
var fileName = guid() + '.jpg';
525-
526-
if (configuration && configuration.tipConfiguration && configuration.tipConfiguration.tipSignatureUploadPath
527-
&& configuration.tipConfiguration.tipCurrency && configuration.tip_token && tipConfiguration.tipUrl)
528-
$.post(configuration.tipConfiguration.tipSignatureUploadPath, {
529-
amount: tip,
530-
signatureImage: fileName,
531-
currency: configuration.tipConfiguration.tipCurrency,
532-
type: blob.type,
533-
tipToken: configuration.tip_token
534-
}, function (urlResponse) {
535-
$.ajax({
536-
url: urlResponse.url,
537-
type: 'PUT',
538-
data: blob,
539-
processData: false,
540-
contentType: blob.type
541-
}).success(function (res) {
542-
$.post(configuration.tipConfiguration.tipUrl, {
543-
amount: tip,
544-
tipToken: configuration.tip_token,
545-
signatureImage: fileName,
546-
currency: configuration.tipConfiguration.tipCurrency,
547-
taskNoteId: urlResponse.note_id
548-
}).success(function (res) {
549-
550-
}).fail(function (res) {
551-
552-
});
553-
});
554-
}).fail(function (res) {
555-
556-
});
557-
};
558-
559518
/**
560519
*
561520
* @returns {*}

BringgSDK.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe("BringgSDK", function () {
2525
expect(BringgSDK.submitRatingReason).toBeDefined();
2626
expect(BringgSDK.submitNote).toBeDefined();
2727
expect(BringgSDK.submitLocation).toBeDefined();
28-
expect(BringgSDK.submitTip).toBeDefined();
2928

3029
expect(BringgSDK.getLastKnownETA).toBeDefined();
3130
expect(BringgSDK.getETAMethod).toBeDefined();

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ send a note by the customer.
102102
##### submitLocation(position, successCb, failureCb)
103103
send the customer current location.
104104

105-
##### submitTip(tip)
106-
send the tip amount that the customer decides to add.
107-
108105
### setting callbacks
109106

110107
##### setConnectionCallbacks(onConnectCb, onDisconnectCb)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bringg-sdk",
3-
"version": "1.0.13",
3+
"version": "1.1.0",
44
"main": [
55
"BringgSDK.js"
66
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "customer-sdk",
3-
"version": "1.0.13",
3+
"version": "1.1.0",
44
"scripts": {
55
"test": "karma start",
66
"codecov": "codecov"

0 commit comments

Comments
 (0)