balanced-node-new
Advanced tools
Comparing version 0.4.6 to 0.4.7
@@ -22,2 +22,6 @@ module.exports = { | ||
}, | ||
update: { | ||
path: 'bank_accounts/:bank_account_id', | ||
method: 'put' | ||
}, | ||
delete: { | ||
@@ -27,2 +31,6 @@ path: 'bank_accounts/:bank_account_id', | ||
}, | ||
add_credit: { | ||
path: 'bank_accounts/:bank_account_id/credits', | ||
method: 'post' | ||
}, | ||
list_credits: { | ||
@@ -32,2 +40,10 @@ path: 'bank_accounts/:bank_account_id/credits', | ||
}, | ||
add_debit: { | ||
path: 'bank_accounts/:bank_account_id/debits', | ||
method: 'post' | ||
}, | ||
list_debits: { | ||
path: 'bank_accounts/:bank_account_id/debits', | ||
method: 'get' | ||
}, | ||
init_bank_account_verification: { | ||
@@ -34,0 +50,0 @@ path: 'bank_accounts/:bank_account_id/verifications', |
@@ -11,2 +11,6 @@ module.exports = { | ||
}, | ||
create_with_bank: { | ||
path: 'credits', | ||
method: 'post' | ||
}, | ||
id: { | ||
@@ -13,0 +17,0 @@ path: 'credits/:credit_id', |
@@ -61,2 +61,13 @@ module.exports = { | ||
}, | ||
add_hold: { | ||
path: 'customers/:customer_id/holds', | ||
method: 'post' | ||
}, | ||
capture_hold: { | ||
path: 'customers/:customer_id/debits', | ||
method: 'post', | ||
requires: [ | ||
'hold_uri' | ||
] | ||
}, | ||
list_holds: { | ||
@@ -63,0 +74,0 @@ path: 'customers/:customer_id/holds', |
@@ -15,4 +15,8 @@ module.exports = { | ||
method: 'put' | ||
}, | ||
refund: { | ||
path: ':marketplace_uri/debits/:debit_id/refunds', | ||
method: 'post' | ||
} | ||
} | ||
} |
{ | ||
"name": "balanced-node-new", | ||
"description": "Offical Balanced Payments API Client for node.js, https://www.balancedpayments.com/docs/api", | ||
"version": "0.4.6", | ||
"version": "0.4.7", | ||
"author": "Balanced Payments / uh-sem-blee, Co. | typefoo", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -8,5 +8,3 @@ module.exports = { | ||
}, | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -20,5 +18,3 @@ account_capture_hold: { | ||
}, | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -34,6 +30,4 @@ account_create: { | ||
card_uri: "${request['card']['uri']}" | ||
} | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
}, | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -46,5 +40,3 @@ account_create_debit: { | ||
}, | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -57,5 +49,3 @@ account_create_hold: { | ||
}, | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -68,5 +58,3 @@ account_create_merchant: { | ||
} | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -79,5 +67,3 @@ account_underwrite_business: { | ||
}, | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -90,5 +76,3 @@ account_underwrite_person: { | ||
}, | ||
urlOptions: { | ||
account_id: "${request['account']['id']}" | ||
} | ||
uriOptions: "${request['uri']}" | ||
}, | ||
@@ -108,59 +92,151 @@ bank_account_create: { | ||
method: 'delete', | ||
urlOptions: { | ||
bank_account_id: "${request['bank']['id']}" | ||
uriOptions: "${request['uri']}" | ||
}, | ||
bank_account_find_and_credit: [ | ||
{ | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'bank', | ||
method: 'add_credit', | ||
uriOptions: "result.uri", | ||
data: { | ||
amount: "${payload['amount'] if payload else request['amount'] or '1100'}" | ||
} | ||
} | ||
}, | ||
bank_account_find_and_credit: { | ||
}, | ||
bank_account_find_and_delete: { | ||
}, | ||
], | ||
bank_account_find_and_delete: [ | ||
{ | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'bank', | ||
method: 'delete', | ||
uriOptions: "result.uri" | ||
} | ||
], | ||
bank_account_invalid_routing_number: { | ||
module: 'bank', | ||
method: 'create', | ||
data: { | ||
name: "${payload['name'] if payload else request['bank_account']['name']}", | ||
account_number: "${payload['account_number'] if payload else request['bank_account']['account_number']}", | ||
routing_number: "0000000000", | ||
type: "checking" | ||
} | ||
}, | ||
bank_account_list: { | ||
module: 'bank', | ||
method: 'list', | ||
data: { | ||
limit: 10, | ||
offset: 0 | ||
} | ||
}, | ||
bank_account_show: { | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
bank_account_verification_create: { | ||
}, | ||
bank_account_verification_show: { | ||
}, | ||
bank_account_verification_update: { | ||
}, | ||
bank_account_verification_create: [ | ||
{ | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'bank', | ||
method: 'init_bank_account_verification', | ||
uriOptions: "result.verifications_uri" | ||
} | ||
], | ||
bank_account_verification_show: [ | ||
{ | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'bank', | ||
method: 'list_bank_account_verifications', | ||
uriOptions: "result.verifications_uri" | ||
} | ||
], | ||
bank_account_verification_update: | ||
{ | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'bank', | ||
method: 'confirm_bank_account_verifications', | ||
data: { | ||
amount_1: 1, | ||
amount_2: 1 | ||
} | ||
uriOptions: "result.verifications_uri" | ||
} | ||
], | ||
callback_create: { | ||
module: 'callbacks', | ||
method: 'create', | ||
data: { | ||
uri: 'http://mywebsite.com/callack_uri' | ||
} | ||
}, | ||
callback_delete: { | ||
module: 'callbacks', | ||
method: 'delete', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
callback_list: { | ||
module: 'callbacks', | ||
method: 'list' | ||
}, | ||
callback_show: { | ||
module: 'callbacks', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
card_create: { | ||
module: 'card', | ||
method: 'create', | ||
data: { | ||
card_number: "${payload['card_number']}", | ||
expiration_year: "${payload['expiration_year']}", | ||
expiration_month: "${payload['expiration_month']}", | ||
security_code: "" | ||
} | ||
}, | ||
card_delete: { | ||
module: 'card', | ||
method: 'delete', | ||
uriOptions: "${request.get('uri', request.get('debits_uri',''))}" | ||
}, | ||
card_invalidate: { | ||
module: 'card', | ||
method: 'delete', | ||
uriOptions: "${request.get('uri', request.get('debits_uri',''))}" | ||
}, | ||
card_list: { | ||
module: 'card', | ||
method: 'list' | ||
}, | ||
card_show: { | ||
module: 'card', | ||
method: 'id', | ||
uriOptions: "${request.get('uri', request.get('debits_uri',''))}" | ||
}, | ||
card_update: { | ||
module: 'card', | ||
method: 'update', | ||
data: { | ||
twitter: "123456789" | ||
}, | ||
uriOptions: "${request.get('uri', request.get('debits_uri',''))}" | ||
}, | ||
@@ -170,61 +246,213 @@ credit_account_list: { | ||
}, | ||
credit_bank_account_list: { | ||
}, | ||
credit_bank_account_list: [ | ||
{ | ||
module: 'bank', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'bank', | ||
method: 'list_credits', | ||
uriOptions: 'result.credits_uri' | ||
} | ||
], | ||
credit_create_existing_bank_account: { | ||
module: 'credits', | ||
method: 'create', | ||
data: { | ||
amount: "${payload['amount'] if payload else request['amount'] or '1100'}" | ||
}, | ||
uriOptions: "${request['uri']}" | ||
}, | ||
credit_create_new_bank_account: { | ||
module: 'credits', | ||
method: 'create_with_bank', | ||
data: "${to_json( request ) | n }" | ||
}, | ||
credit_customer_list: { | ||
module: 'customer', | ||
method: 'list_credits' | ||
}, | ||
credit_failed_state: { | ||
module: 'credits', | ||
method: 'create_with_bank', | ||
data: { | ||
amount: "${payload['amount'] if payload else request['payload']['amount'] or '1100'}", | ||
bank_account: { | ||
name: "${payload['bank_account']['name'] if payload else request['payload']['bank_account']['name']}", | ||
account_number: "${payload['bank_account']['account_number'] if payload else request['payload']['bank_account']['account_number']}", | ||
routing_number: "${payload['bank_account']['routing_number'] if payload else request['payload']['bank_account']['routing_number']}", | ||
type: "checking" | ||
} | ||
} | ||
}, | ||
credit_list: { | ||
module: 'credits', | ||
method: 'list', | ||
data: { | ||
limit: 10, | ||
offset: 0 | ||
} | ||
}, | ||
credit_paid_state: { | ||
module: 'credits', | ||
method: 'create_with_bank', | ||
data: { | ||
bank_account: { | ||
name: "${payload['bank_account']['name'] if payload else request['payload']['bank_account']['name']}", | ||
account_number: "${payload['bank_account']['account_number'] if payload else request['payload']['bank_account']['account_number']}", | ||
routing_number: "${payload['bank_account']['routing_number'] if payload else request['payload']['bank_account']['routing_number']}" | ||
type: "Checking" | ||
}, | ||
amount: "${payload['amount'] if payload else request['payload']['amount'] or '1100'}" | ||
} | ||
}, | ||
credit_pending_state: { | ||
module: 'credits', | ||
method: 'create_with_bank', | ||
data: { | ||
amount: "${payload['amount'] if payload else request['payload']['amount'] or '1100'}", | ||
bank_account: { | ||
name: "${payload['bank_account']['name'] if payload else request['payload']['bank_account']['name']}", | ||
account_number: "${payload['bank_account']['account_number'] if payload else request['payload']['bank_account']['account_number']}", | ||
routing_number: "${payload['bank_account']['routing_number'] if payload else request['payload']['bank_account']['routing_number']}", | ||
type: "checking" | ||
} | ||
} | ||
}, | ||
credit_show: { | ||
module: 'credits', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
customer_add_bank_account: { | ||
module: 'customer', | ||
method: 'add_bank', | ||
data: { | ||
bank_account_uri: "${request.get('payload').get('bank_account_uri')}" | ||
}, | ||
uriOptions: "${request['uri']}" | ||
}, | ||
customer_add_card: { | ||
module: 'customer', | ||
method: 'add_card', | ||
data: { | ||
card_uri: "${request.get('payload').get('card_uri')}" | ||
}, | ||
uriOptions: "${request['uri']}" | ||
}, | ||
customer_capture_hold: { | ||
module: 'hold', | ||
method: 'capture', | ||
data: { | ||
amount: "${payload['amount'] if payload else request['amount'] or '1100'}" | ||
} | ||
uriOptions: "${request.get('uri', request.get('hold_uri', ''))}" | ||
}, | ||
customer_create_debit: { | ||
customer_create: { | ||
module: 'customer', | ||
method: 'create', | ||
data: { | ||
name: "William Henry Cavendish III", | ||
email: "whc@example.org", | ||
meta: { | ||
"customKey.first": "first", | ||
"customKey.second": "second" | ||
}, | ||
ssn_last4: "1234", | ||
business_name: "Cavendish LLC", | ||
address: { | ||
line1: "123 Main St", | ||
line2: "Apt. 1", | ||
city: "San Francisco", | ||
state: "CA", | ||
postal_code: "94133", | ||
country_code: "USA" | ||
}, | ||
phone: "+19994445555", | ||
dob: "1984-01", | ||
ein: "451111111" | ||
} | ||
}, | ||
customer_create_hold: { | ||
customer_create_debit: [ | ||
{ | ||
module: 'customer', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'customer', | ||
method: 'add_debit', | ||
data: { | ||
amount: "${request.get('payload').get('amount')}", | ||
appears_on_statement_as: "${request.get('payload').get('appears_on_statement_as')}" | ||
description: "${request.get('payload').get('description')}" | ||
}, | ||
uriOptions: 'result.debits_uri' | ||
} | ||
], | ||
customer_create_hold: [ | ||
{ | ||
module: 'customer', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'customer', | ||
method: 'add_hold', | ||
data: { | ||
amount: "${payload['amount'] if payload else request['amount'] or '1100'}" | ||
}, | ||
uriOptions: 'result.debits_uri' | ||
} | ||
], | ||
customer_credit: [ | ||
{ | ||
module: 'customer', | ||
method: 'id', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
{ | ||
module: 'customer', | ||
method: 'add_credit', | ||
data: { | ||
amount: "${payload['amount'] if payload else request['amount'] or '1100'}" | ||
}, | ||
uriOptions: 'result.credits_uri' | ||
} | ||
], | ||
customer_delete: { | ||
module: 'customer', | ||
method: 'delete', | ||
uriOptions: "${request['uri']}" | ||
}, | ||
customer_credit: { | ||
customer_underwrite: { | ||
module: 'customer', | ||
method: 'update', | ||
data: { | ||
name: "${payload['name'] if payload else request['bank_account']['name']}" | ||
}, | ||
uriOptions: "${request['uri']}" | ||
}, | ||
debit_account_list: { | ||
}, | ||
customer_delete: { | ||
debit_create: { | ||
}, | ||
customer_underwrite: { | ||
debit_customer_list: { | ||
}, | ||
debit_account_list: { | ||
debit_list: { | ||
}, | ||
debit_refund: { | ||
module: 'debits', | ||
method: 'refund', | ||
uriOptions: "${request['debit_uri']}" | ||
}, | ||
debit_show: { | ||
module: 'debits', | ||
method: 'id', | ||
uriOptions: | ||
}, | ||
@@ -231,0 +459,0 @@ debit_update: { |
47595
1758