balanced 0.8.2 → 1.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (359) hide show
  1. checksums.yaml +4 -4
  2. data/.rbenv-version +1 -1
  3. data/.ruby-version +1 -1
  4. data/Gemfile +7 -3
  5. data/README.md +2 -10
  6. data/Rakefile +4 -18
  7. data/balanced.gemspec +8 -10
  8. data/lib/balanced.rb +28 -28
  9. data/lib/balanced/client.rb +15 -6
  10. data/lib/balanced/error.rb +21 -12
  11. data/lib/balanced/pager.rb +66 -25
  12. data/lib/balanced/resources.rb +18 -17
  13. data/lib/balanced/resources/api_key.rb +4 -0
  14. data/lib/balanced/resources/bank_account.rb +26 -75
  15. data/lib/balanced/resources/callback.rb +2 -0
  16. data/lib/balanced/resources/card.rb +15 -65
  17. data/lib/balanced/resources/card_hold.rb +38 -0
  18. data/lib/balanced/resources/credit.rb +6 -50
  19. data/lib/balanced/resources/customer.rb +33 -71
  20. data/lib/balanced/resources/debit.rb +6 -14
  21. data/lib/balanced/resources/event.rb +6 -0
  22. data/lib/balanced/resources/funding_instrument.rb +11 -0
  23. data/lib/balanced/resources/hypermedia.rb +28 -0
  24. data/lib/balanced/resources/marketplace.rb +5 -203
  25. data/lib/balanced/resources/order.rb +71 -0
  26. data/lib/balanced/resources/refund.rb +2 -7
  27. data/lib/balanced/resources/resource.rb +169 -106
  28. data/lib/balanced/resources/reversal.rb +2 -8
  29. data/lib/balanced/resources/transfer.rb +11 -0
  30. data/lib/balanced/response/balanced_exception_middleware.rb +2 -2
  31. data/lib/balanced/utils.rb +47 -14
  32. data/lib/balanced/version.rb +1 -1
  33. data/scenario.cache +526 -380
  34. data/scenarios/api_key_create/definition.rb +1 -0
  35. data/scenarios/api_key_create/request.rb +2 -0
  36. data/scenarios/api_key_create/ruby.mako +21 -0
  37. data/scenarios/api_key_delete/definition.rb +1 -0
  38. data/scenarios/api_key_delete/request.rb +3 -0
  39. data/scenarios/api_key_delete/ruby.mako +12 -0
  40. data/scenarios/api_key_list/definition.rb +1 -0
  41. data/scenarios/api_key_list/request.rb +2 -0
  42. data/scenarios/api_key_list/ruby.mako +28 -0
  43. data/scenarios/api_key_show/definition.rb +1 -0
  44. data/scenarios/api_key_show/request.rb +2 -0
  45. data/scenarios/api_key_show/ruby.mako +18 -0
  46. data/scenarios/{customer_add_bank_account → bank_account_associate_to_customer}/definition.rb +0 -0
  47. data/scenarios/bank_account_associate_to_customer/request.rb +3 -0
  48. data/scenarios/bank_account_associate_to_customer/ruby.mako +49 -0
  49. data/scenarios/bank_account_create/definition.rb +1 -1
  50. data/scenarios/bank_account_create/request.rb +1 -1
  51. data/scenarios/bank_account_create/ruby.mako +44 -7
  52. data/scenarios/{credit_create_existing_bank_account → bank_account_credit}/definition.rb +0 -0
  53. data/scenarios/bank_account_credit/request.rb +3 -0
  54. data/scenarios/bank_account_credit/ruby.mako +42 -0
  55. data/scenarios/bank_account_debit/definition.rb +1 -0
  56. data/scenarios/bank_account_debit/request.rb +5 -0
  57. data/scenarios/bank_account_debit/ruby.mako +50 -0
  58. data/scenarios/bank_account_delete/request.rb +1 -1
  59. data/scenarios/bank_account_delete/ruby.mako +5 -3
  60. data/scenarios/bank_account_list/ruby.mako +76 -2
  61. data/scenarios/bank_account_show/definition.rb +1 -1
  62. data/scenarios/bank_account_show/request.rb +1 -1
  63. data/scenarios/bank_account_show/ruby.mako +41 -5
  64. data/scenarios/bank_account_update/definition.rb +1 -0
  65. data/scenarios/bank_account_update/request.rb +6 -0
  66. data/scenarios/bank_account_update/ruby.mako +56 -0
  67. data/scenarios/bank_account_verification_create/request.rb +1 -1
  68. data/scenarios/bank_account_verification_create/ruby.mako +20 -3
  69. data/scenarios/bank_account_verification_show/definition.rb +1 -1
  70. data/scenarios/bank_account_verification_show/request.rb +1 -1
  71. data/scenarios/bank_account_verification_show/ruby.mako +21 -4
  72. data/scenarios/bank_account_verification_update/definition.rb +1 -1
  73. data/scenarios/bank_account_verification_update/request.rb +5 -5
  74. data/scenarios/bank_account_verification_update/ruby.mako +24 -8
  75. data/scenarios/callback_create/definition.rb +1 -1
  76. data/scenarios/callback_create/request.rb +2 -2
  77. data/scenarios/callback_create/ruby.mako +22 -0
  78. data/scenarios/callback_delete/definition.rb +1 -1
  79. data/scenarios/callback_delete/request.rb +2 -2
  80. data/scenarios/callback_delete/ruby.mako +12 -0
  81. data/scenarios/callback_list/definition.rb +1 -1
  82. data/scenarios/callback_list/request.rb +1 -2
  83. data/scenarios/callback_list/ruby.mako +20 -0
  84. data/scenarios/callback_show/definition.rb +1 -1
  85. data/scenarios/callback_show/request.rb +1 -1
  86. data/scenarios/callback_show/ruby.mako +20 -0
  87. data/scenarios/{customer_add_card → card_associate_to_customer}/definition.rb +0 -0
  88. data/scenarios/card_associate_to_customer/request.rb +3 -0
  89. data/scenarios/card_associate_to_customer/ruby.mako +49 -0
  90. data/scenarios/card_create/request.rb +1 -2
  91. data/scenarios/card_create/ruby.mako +44 -7
  92. data/scenarios/card_debit/definition.rb +1 -0
  93. data/scenarios/card_debit/request.rb +5 -0
  94. data/scenarios/card_debit/ruby.mako +49 -0
  95. data/scenarios/card_delete/request.rb +1 -1
  96. data/scenarios/card_delete/ruby.mako +5 -3
  97. data/scenarios/card_hold_capture/definition.rb +1 -0
  98. data/scenarios/card_hold_capture/request.rb +5 -0
  99. data/scenarios/card_hold_capture/ruby.mako +49 -0
  100. data/scenarios/card_hold_create/definition.rb +1 -0
  101. data/scenarios/card_hold_create/request.rb +5 -0
  102. data/scenarios/card_hold_create/ruby.mako +38 -0
  103. data/scenarios/card_hold_list/definition.rb +1 -0
  104. data/scenarios/card_hold_list/request.rb +2 -0
  105. data/scenarios/card_hold_list/ruby.mako +60 -0
  106. data/scenarios/card_hold_show/definition.rb +1 -0
  107. data/scenarios/card_hold_show/request.rb +2 -0
  108. data/scenarios/card_hold_show/ruby.mako +36 -0
  109. data/scenarios/card_hold_update/definition.rb +1 -0
  110. data/scenarios/card_hold_update/request.rb +7 -0
  111. data/scenarios/card_hold_update/ruby.mako +42 -0
  112. data/scenarios/card_hold_void/definition.rb +1 -0
  113. data/scenarios/card_hold_void/request.rb +3 -0
  114. data/scenarios/card_hold_void/ruby.mako +36 -0
  115. data/scenarios/card_list/definition.rb +1 -1
  116. data/scenarios/card_list/request.rb +1 -1
  117. data/scenarios/card_list/ruby.mako +78 -5
  118. data/scenarios/card_show/definition.rb +1 -1
  119. data/scenarios/card_show/request.rb +1 -1
  120. data/scenarios/card_show/ruby.mako +42 -4
  121. data/scenarios/card_update/definition.rb +1 -1
  122. data/scenarios/card_update/request.rb +1 -1
  123. data/scenarios/card_update/ruby.mako +45 -4
  124. data/scenarios/credit_list/request.rb +1 -3
  125. data/scenarios/credit_list/ruby.mako +34 -4
  126. data/scenarios/{credit_bank_account_list → credit_list_bank_account}/definition.rb +0 -0
  127. data/scenarios/credit_list_bank_account/request.rb +3 -0
  128. data/scenarios/credit_list_bank_account/ruby.mako +13 -0
  129. data/scenarios/credit_show/definition.rb +1 -1
  130. data/scenarios/credit_show/request.rb +1 -3
  131. data/scenarios/credit_show/ruby.mako +35 -5
  132. data/scenarios/{credit_create_new_bank_account → credit_update}/definition.rb +0 -0
  133. data/scenarios/credit_update/request.rb +7 -0
  134. data/scenarios/credit_update/ruby.mako +48 -0
  135. data/scenarios/customer_create/request.rb +4 -1
  136. data/scenarios/customer_create/ruby.mako +60 -3
  137. data/scenarios/customer_delete/request.rb +1 -1
  138. data/scenarios/customer_delete/ruby.mako +4 -2
  139. data/scenarios/customer_list/definition.rb +1 -0
  140. data/scenarios/customer_list/request.rb +2 -0
  141. data/scenarios/customer_list/ruby.mako +105 -0
  142. data/scenarios/customer_show/definition.rb +1 -0
  143. data/scenarios/customer_show/request.rb +2 -0
  144. data/scenarios/customer_show/ruby.mako +58 -0
  145. data/scenarios/customer_update/definition.rb +1 -0
  146. data/scenarios/customer_update/request.rb +7 -0
  147. data/scenarios/customer_update/ruby.mako +64 -0
  148. data/scenarios/debit_list/request.rb +1 -3
  149. data/scenarios/debit_list/ruby.mako +70 -4
  150. data/scenarios/debit_show/definition.rb +1 -1
  151. data/scenarios/debit_show/request.rb +1 -1
  152. data/scenarios/debit_show/ruby.mako +39 -4
  153. data/scenarios/debit_update/definition.rb +1 -1
  154. data/scenarios/debit_update/request.rb +1 -1
  155. data/scenarios/debit_update/ruby.mako +39 -4
  156. data/scenarios/event_list/definition.rb +1 -1
  157. data/scenarios/event_list/request.rb +1 -2
  158. data/scenarios/event_list/ruby.mako +54 -5
  159. data/scenarios/event_show/definition.rb +1 -1
  160. data/scenarios/event_show/request.rb +1 -1
  161. data/scenarios/event_show/ruby.mako +54 -4
  162. data/scenarios/helpers.rb +29 -2
  163. data/scenarios/order_create/definition.rb +1 -0
  164. data/scenarios/order_create/request.rb +5 -0
  165. data/scenarios/order_create/ruby.mako +46 -0
  166. data/scenarios/order_list/definition.rb +1 -0
  167. data/scenarios/order_list/request.rb +2 -0
  168. data/scenarios/order_list/ruby.mako +42 -0
  169. data/scenarios/order_show/definition.rb +1 -0
  170. data/scenarios/order_show/request.rb +2 -0
  171. data/scenarios/order_show/ruby.mako +44 -0
  172. data/scenarios/order_update/definition.rb +1 -0
  173. data/scenarios/order_update/request.rb +7 -0
  174. data/scenarios/order_update/ruby.mako +50 -0
  175. data/scenarios/refund_create/definition.rb +1 -1
  176. data/scenarios/refund_create/request.rb +2 -1
  177. data/scenarios/refund_create/ruby.mako +33 -5
  178. data/scenarios/refund_list/request.rb +1 -3
  179. data/scenarios/refund_list/ruby.mako +30 -4
  180. data/scenarios/refund_show/definition.rb +1 -1
  181. data/scenarios/refund_show/request.rb +1 -1
  182. data/scenarios/refund_show/ruby.mako +32 -4
  183. data/scenarios/refund_update/definition.rb +1 -1
  184. data/scenarios/refund_update/request.rb +1 -1
  185. data/scenarios/refund_update/ruby.mako +32 -4
  186. data/scenarios/render_mako.rb +59 -4
  187. data/scenarios/reversal_create/definition.rb +1 -0
  188. data/scenarios/reversal_create/request.rb +9 -0
  189. data/scenarios/reversal_create/ruby.mako +45 -0
  190. data/scenarios/reversal_list/definition.rb +1 -0
  191. data/scenarios/reversal_list/request.rb +2 -0
  192. data/scenarios/reversal_list/ruby.mako +36 -0
  193. data/scenarios/reversal_show/definition.rb +1 -0
  194. data/scenarios/reversal_show/request.rb +2 -0
  195. data/scenarios/reversal_show/ruby.mako +37 -0
  196. data/scenarios/reversal_update/definition.rb +1 -0
  197. data/scenarios/reversal_update/request.rb +7 -0
  198. data/scenarios/reversal_update/ruby.mako +44 -0
  199. data/spec/balanced/error_spec.rb +7 -7
  200. data/spec/balanced/pager_spec.rb +10 -10
  201. data/spec/balanced/resources/api_key_spec.rb +6 -35
  202. data/spec/balanced/resources/bank_account_spec.rb +123 -218
  203. data/spec/balanced/resources/callback_spec.rb +12 -13
  204. data/spec/balanced/resources/card_hold_spec.rb +103 -0
  205. data/spec/balanced/resources/card_spec.rb +101 -27
  206. data/spec/balanced/resources/credit_spec.rb +69 -35
  207. data/spec/balanced/resources/customer_spec.rb +91 -271
  208. data/spec/balanced/resources/debit_spec.rb +95 -0
  209. data/spec/balanced/resources/marketplace_spec.rb +17 -170
  210. data/spec/balanced/resources/order_spec.rb +364 -0
  211. data/spec/balanced/resources/resource_spec.rb +25 -32
  212. data/spec/balanced_spec.rb +18 -36
  213. data/spec/client_spec.rb +7 -7
  214. data/spec/spec_helper.rb +19 -18
  215. data/spec/utils_spec.rb +5 -5
  216. metadata +123 -165
  217. data/examples/bank_account_debits.rb +0 -57
  218. data/examples/customers.rb +0 -114
  219. data/examples/events_and_callbacks.rb +0 -81
  220. data/examples/examples.rb +0 -162
  221. data/examples/exception_handling.rb +0 -44
  222. data/lib/balanced/resources/account.rb +0 -179
  223. data/lib/balanced/resources/hold.rb +0 -61
  224. data/lib/balanced/resources/invoice.rb +0 -11
  225. data/lib/balanced/resources/merchant.rb +0 -21
  226. data/lib/balanced/resources/transaction.rb +0 -17
  227. data/scenarios/account_add_card/definition.rb +0 -1
  228. data/scenarios/account_add_card/request.rb +0 -3
  229. data/scenarios/account_add_card/ruby.mako +0 -11
  230. data/scenarios/account_capture_hold/definition.rb +0 -1
  231. data/scenarios/account_capture_hold/request.rb +0 -3
  232. data/scenarios/account_capture_hold/ruby.mako +0 -11
  233. data/scenarios/account_create/definition.rb +0 -1
  234. data/scenarios/account_create/request.rb +0 -2
  235. data/scenarios/account_create/ruby.mako +0 -10
  236. data/scenarios/account_create_buyer/definition.rb +0 -1
  237. data/scenarios/account_create_buyer/request.rb +0 -5
  238. data/scenarios/account_create_buyer/ruby.mako +0 -13
  239. data/scenarios/account_create_debit/definition.rb +0 -1
  240. data/scenarios/account_create_debit/request.rb +0 -3
  241. data/scenarios/account_create_debit/ruby.mako +0 -11
  242. data/scenarios/account_create_hold/definition.rb +0 -1
  243. data/scenarios/account_create_hold/request.rb +0 -3
  244. data/scenarios/account_create_hold/ruby.mako +0 -11
  245. data/scenarios/account_create_merchant/definition.rb +0 -1
  246. data/scenarios/account_create_merchant/request.rb +0 -3
  247. data/scenarios/account_create_merchant/ruby.mako +0 -11
  248. data/scenarios/account_underwrite_business/definition.rb +0 -1
  249. data/scenarios/account_underwrite_business/request.rb +0 -17
  250. data/scenarios/account_underwrite_business/ruby.mako +0 -37
  251. data/scenarios/account_underwrite_person/definition.rb +0 -1
  252. data/scenarios/account_underwrite_person/request.rb +0 -18
  253. data/scenarios/account_underwrite_person/ruby.mako +0 -31
  254. data/scenarios/bank_account_find_and_credit/definition.rb +0 -1
  255. data/scenarios/bank_account_find_and_credit/request.rb +0 -5
  256. data/scenarios/bank_account_find_and_credit/ruby.mako +0 -13
  257. data/scenarios/bank_account_find_and_delete/definition.rb +0 -1
  258. data/scenarios/bank_account_find_and_delete/request.rb +0 -3
  259. data/scenarios/bank_account_find_and_delete/ruby.mako +0 -10
  260. data/scenarios/bank_account_invalid_routing_number/definition.rb +0 -1
  261. data/scenarios/bank_account_invalid_routing_number/request.rb +0 -11
  262. data/scenarios/bank_account_invalid_routing_number/ruby.mako +0 -16
  263. data/scenarios/card_invalidate/definition.rb +0 -1
  264. data/scenarios/card_invalidate/request.rb +0 -3
  265. data/scenarios/card_invalidate/ruby.mako +0 -10
  266. data/scenarios/credit_account_list/definition.rb +0 -1
  267. data/scenarios/credit_account_list/request.rb +0 -3
  268. data/scenarios/credit_account_list/ruby.mako +0 -10
  269. data/scenarios/credit_account_merchant_create/definition.rb +0 -1
  270. data/scenarios/credit_account_merchant_create/request.rb +0 -5
  271. data/scenarios/credit_account_merchant_create/ruby.mako +0 -12
  272. data/scenarios/credit_bank_account_list/request.rb +0 -5
  273. data/scenarios/credit_bank_account_list/ruby.mako +0 -12
  274. data/scenarios/credit_create_existing_bank_account/request.rb +0 -5
  275. data/scenarios/credit_create_existing_bank_account/ruby.mako +0 -12
  276. data/scenarios/credit_create_new_bank_account/request.rb +0 -10
  277. data/scenarios/credit_create_new_bank_account/ruby.mako +0 -21
  278. data/scenarios/credit_customer_list/definition.rb +0 -1
  279. data/scenarios/credit_customer_list/request.rb +0 -4
  280. data/scenarios/credit_customer_list/ruby.mako +0 -12
  281. data/scenarios/credit_failed_state/definition.rb +0 -1
  282. data/scenarios/credit_failed_state/request.rb +0 -10
  283. data/scenarios/credit_failed_state/ruby.mako +0 -18
  284. data/scenarios/credit_paid_state/definition.rb +0 -1
  285. data/scenarios/credit_paid_state/request.rb +0 -11
  286. data/scenarios/credit_paid_state/ruby.mako +0 -19
  287. data/scenarios/credit_pending_state/definition.rb +0 -1
  288. data/scenarios/credit_pending_state/request.rb +0 -9
  289. data/scenarios/credit_pending_state/ruby.mako +0 -17
  290. data/scenarios/customer_add_bank_account/request.rb +0 -3
  291. data/scenarios/customer_add_bank_account/ruby.mako +0 -11
  292. data/scenarios/customer_add_card/request.rb +0 -3
  293. data/scenarios/customer_add_card/ruby.mako +0 -11
  294. data/scenarios/customer_capture_hold/definition.rb +0 -1
  295. data/scenarios/customer_capture_hold/request.rb +0 -3
  296. data/scenarios/customer_capture_hold/ruby.mako +0 -0
  297. data/scenarios/customer_create_debit/definition.rb +0 -1
  298. data/scenarios/customer_create_debit/request.rb +0 -3
  299. data/scenarios/customer_create_debit/ruby.mako +0 -11
  300. data/scenarios/customer_create_hold/definition.rb +0 -1
  301. data/scenarios/customer_create_hold/request.rb +0 -3
  302. data/scenarios/customer_create_hold/ruby.mako +0 -11
  303. data/scenarios/customer_credit/definition.rb +0 -1
  304. data/scenarios/customer_credit/request.rb +0 -2
  305. data/scenarios/customer_credit/ruby.mako +0 -8
  306. data/scenarios/debit_account_list/definition.rb +0 -1
  307. data/scenarios/debit_account_list/request.rb +0 -3
  308. data/scenarios/debit_account_list/ruby.mako +0 -10
  309. data/scenarios/debit_create/definition.rb +0 -1
  310. data/scenarios/debit_create/request.rb +0 -5
  311. data/scenarios/debit_create/ruby.mako +0 -15
  312. data/scenarios/debit_customer_list/definition.rb +0 -1
  313. data/scenarios/debit_customer_list/request.rb +0 -4
  314. data/scenarios/debit_customer_list/ruby.mako +0 -12
  315. data/scenarios/debit_refund/definition.rb +0 -1
  316. data/scenarios/debit_refund/request.rb +0 -3
  317. data/scenarios/debit_refund/ruby.mako +0 -10
  318. data/scenarios/delete.rb +0 -7
  319. data/scenarios/event_replay/definition.rb +0 -0
  320. data/scenarios/event_replay/request.rb +0 -1
  321. data/scenarios/event_replay/ruby.mako +0 -0
  322. data/scenarios/execute.rb +0 -27
  323. data/scenarios/hold_account_list/definition.rb +0 -1
  324. data/scenarios/hold_account_list/request.rb +0 -3
  325. data/scenarios/hold_account_list/ruby.mako +0 -10
  326. data/scenarios/hold_capture/definition.rb +0 -1
  327. data/scenarios/hold_capture/request.rb +0 -5
  328. data/scenarios/hold_capture/ruby.mako +0 -15
  329. data/scenarios/hold_create/definition.rb +0 -1
  330. data/scenarios/hold_create/request.rb +0 -5
  331. data/scenarios/hold_create/ruby.mako +0 -14
  332. data/scenarios/hold_customer_list/definition.rb +0 -1
  333. data/scenarios/hold_customer_list/request.rb +0 -3
  334. data/scenarios/hold_customer_list/ruby.mako +0 -11
  335. data/scenarios/hold_list/definition.rb +0 -1
  336. data/scenarios/hold_list/request.rb +0 -4
  337. data/scenarios/hold_list/ruby.mako +0 -11
  338. data/scenarios/hold_show/definition.rb +0 -1
  339. data/scenarios/hold_show/request.rb +0 -2
  340. data/scenarios/hold_show/ruby.mako +0 -10
  341. data/scenarios/hold_update/definition.rb +0 -1
  342. data/scenarios/hold_update/request.rb +0 -7
  343. data/scenarios/hold_update/ruby.mako +0 -16
  344. data/scenarios/hold_void/definition.rb +0 -1
  345. data/scenarios/hold_void/request.rb +0 -3
  346. data/scenarios/hold_void/ruby.mako +0 -10
  347. data/scenarios/refund_account_list/definition.rb +0 -1
  348. data/scenarios/refund_account_list/request.rb +0 -3
  349. data/scenarios/refund_account_list/ruby.mako +0 -10
  350. data/scenarios/refund_customer_list/definition.rb +0 -1
  351. data/scenarios/refund_customer_list/request.rb +0 -3
  352. data/scenarios/refund_customer_list/ruby.mako +0 -11
  353. data/scenarios/render.rb +0 -32
  354. data/scenarios/render_one.rb +0 -32
  355. data/spec/balanced/resources/account_spec.rb +0 -636
  356. data/spec/balanced/resources/hold_spec.rb +0 -48
  357. data/spec/balanced/resources/merchant_spec.rb +0 -6
  358. data/spec/scenarios_spec.rb +0 -39
  359. data/upload_docs.rb +0 -40
@@ -1,39 +1,32 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Balanced::Resource, '.uri', :vcr do
4
- describe "before the marketplace is configured" do
5
- it 'raises an exception' do
6
- Balanced::Marketplace.stub(:marketplace_uri) { nil }
7
- expect {
8
- Balanced::Account.uri
9
- }.to raise_error(Balanced::StandardError, "Balanced::Account is nested under a marketplace, which is not created or configured.")
10
- end
11
- end
12
-
13
- describe 'when the marketplace is configured' do
14
- it 'returns the resource uri corresponding to the resource name passed in' do
15
- Balanced::Marketplace.stub(:marketplace_uri) { '/v1/marketplaces/TEST-MPynogsPWE3xLMnLbEbuM0g' }
16
- Balanced::Account.uri.should == '/v1/marketplaces/TEST-MPynogsPWE3xLMnLbEbuM0g/accounts'
17
- end
3
+ describe Balanced::Resource do
4
+ class ApiKey
5
+ include Balanced::Resource::ClassMethods
18
6
  end
19
- end
20
7
 
21
- describe Balanced::Resource, 'loading a resource and generating methods from the response body', :vcr do
22
- before do
23
- make_marketplace
24
- @account = Balanced::Account.new(:email => 'user@example.com', :name => 'John Doe').save
8
+ before(:all) do
9
+ @ak = ApiKey.new
25
10
  end
26
11
 
27
- it 'generates a predicate method' do
28
- @account.name?.should be_true
29
- end
30
-
31
- it 'generates a getter method' do
32
- @account.name.should == 'John Doe'
33
- end
34
-
35
- it 'generates a setter' do
36
- @account.name = 'Bob Bobberson'
37
- @account.name.should == 'Bob Bobberson'
12
+ describe 'construct_from_response' do
13
+ it 'should return an instance of an ApiKey' do
14
+ @payload = JSON.parse('{
15
+ "links": {},
16
+ "api_keys": [
17
+ {
18
+ "links": {},
19
+ "created_at": "2013-08-28T00:00:23.337278Z",
20
+ "secret": "d611bb800f7411e39f5d026ba7d79bff",
21
+ "href": "/api_keys/AK6vWygDNdcoQLHKdaHPtJ1B",
22
+ "meta": {},
23
+ "id": "AK6vWygDNdcoQLHKdaHPtJ1B"
24
+ }
25
+ ]
26
+ }')
27
+ new_ak = @ak.construct_from_response @payload
28
+ new_ak.should_not be_nil
29
+ new_ak.should be_instance_of(Balanced::ApiKey)
30
+ end
38
31
  end
39
- end
32
+ end
@@ -1,4 +1,4 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
3
  describe Balanced do
4
4
  describe 'configuring the faraday http adapter' do
@@ -14,71 +14,53 @@ describe Balanced do
14
14
  end
15
15
  end
16
16
 
17
- describe "configure", :vcr do
17
+ describe 'configure', :vcr do
18
18
  before do
19
19
  @api_key = Balanced::ApiKey.new.save
20
20
 
21
21
  Balanced.configure @api_key.secret
22
22
  end
23
23
 
24
- describe "api key" do
25
- describe "merchant" do
26
- subject { @api_key.merchant }
27
- it { should_not be_nil }
28
- end
29
- end
30
-
31
- describe "#client" do
24
+ describe '#client' do
32
25
  subject { Balanced.client }
33
26
  it { should_not be_nil }
34
27
 
35
- describe "#connection" do
28
+ describe '#connection' do
36
29
  subject { Balanced.client.conn }
37
30
  it { should_not be_nil }
38
31
  end
39
32
 
40
- describe "#api_key" do
33
+ describe '#api_key' do
41
34
  subject { Balanced.client.api_key }
42
35
  it { should eql @api_key.secret }
43
36
  end
44
37
 
45
- describe "#url" do
38
+ describe '#url' do
46
39
  subject { Balanced.client.url.to_s }
47
- it { should satisfy {|s|
48
- ["https://api.balancedpayments.com", "http://localhost:5000"].include?(s) } }
40
+ it { should satisfy { |s|
41
+ %w(https://api.balancedpayments.com http://localhost:5000).include?(s)
42
+ } }
49
43
  end
50
44
  end
51
45
 
52
- describe "reconfigure with new api key", :vcr do
46
+ describe 'reconfigure with new api key', :vcr do
53
47
  before do
54
48
  @new_api_key = Balanced::ApiKey.new.save
55
49
  Balanced.configure @new_api_key.secret
56
50
  end
57
51
 
58
- describe "api key" do
59
- describe "merchant", :vcr do
60
- subject { @api_key.merchant }
61
- it { should_not be_nil }
62
- end
63
- end
64
-
65
- describe "#client" do
66
- describe "#api_key" do
52
+ describe '#client' do
53
+ describe '#api_key' do
67
54
  subject { Balanced.client.api_key }
68
55
  it { should_not eql @api_key.secret }
69
56
  it { should eql @new_api_key.secret }
70
57
  end
71
58
  end
72
59
 
73
- describe "new api key" do
74
- describe "secret" do
60
+ describe 'new api key' do
61
+ describe 'secret' do
75
62
  subject { @new_api_key.secret }
76
63
  it { should_not be_nil }
77
-
78
- end
79
- describe "merchant", :vcr do
80
- subject { @new_api_key.merchant }
81
- it { should_not be_nil }
82
64
  end
83
65
  end
84
66
  end
@@ -87,18 +69,18 @@ end
87
69
 
88
70
  describe Balanced, '.from_uri' do
89
71
  it 'returns BankAccount for a bank_accounts collection nested under a marketplace' do
90
- Balanced.from_uri("/v1/marketplaces/123/bank_accounts").should == Balanced::BankAccount
72
+ Balanced.from_href('/v1/marketplaces/123/bank_accounts').should == Balanced::BankAccount
91
73
  end
92
74
 
93
75
  it 'returns BankAccount for an individual bank account nested under a marketplace' do
94
- Balanced.from_uri('/v1/marketplaces/123/bank_accounts/456').should == Balanced::BankAccount
76
+ Balanced.from_href('/v1/marketplaces/123/bank_accounts/456').should == Balanced::BankAccount
95
77
  end
96
78
 
97
79
  it 'returns BankAccount for a root-level bank account collection resource' do
98
- Balanced.from_uri('/v1/bank_accounts').should == Balanced::BankAccount
80
+ Balanced.from_href('/v1/bank_accounts').should == Balanced::BankAccount
99
81
  end
100
82
 
101
83
  it 'returns BankAccount for a root-level bank account individual resource' do
102
- Balanced.from_uri('/v1/bank_accounts/123').should == Balanced::BankAccount
84
+ Balanced.from_href('/v1/bank_accounts/123').should == Balanced::BankAccount
103
85
  end
104
86
  end
data/spec/client_spec.rb CHANGED
@@ -1,10 +1,10 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
- describe "balanced client" do
4
- it "should allow setting and reading of the api_key" do
5
- client = Balanced::Client.new "miscreant"
6
- client.api_key.should eq("miscreant")
7
- client.api_key = "foo"
8
- client.api_key.should eq("foo")
3
+ describe 'balanced client' do
4
+ it 'should allow setting and reading of the api_key' do
5
+ client = Balanced::Client.new 'miscreant'
6
+ client.api_key.should eq('miscreant')
7
+ client.api_key = 'foo'
8
+ client.api_key.should eq('foo')
9
9
  end
10
10
  end
data/spec/spec_helper.rb CHANGED
@@ -3,6 +3,7 @@ require 'bundler/setup'
3
3
  require 'balanced'
4
4
  require 'vcr'
5
5
  require 'json'
6
+ require 'securerandom'
6
7
 
7
8
  begin
8
9
  require 'ruby-debug'
@@ -15,6 +16,8 @@ VCR.configure do |c|
15
16
  c.cassette_library_dir = 'spec/cassettes'
16
17
  c.hook_into :faraday
17
18
  c.configure_rspec_metadata!
19
+ c.default_cassette_options = {:record => :new_episodes}
20
+ c.allow_http_connections_when_no_cassette = true
18
21
  end
19
22
 
20
23
  # TODO: better way to do this?
@@ -29,13 +32,21 @@ if !host.nil? then
29
32
  end
30
33
 
31
34
  RSpec.configure do |c|
35
+ c.filter_run_excluding :skip => true
32
36
  c.treat_symbols_as_metadata_keys_with_true_values = true
33
37
 
34
- # @return [Balanced::Marketplace]
35
38
  def make_marketplace
36
- api_key = Balanced::ApiKey.new.save
37
- Balanced.configure api_key.secret
38
- Balanced::Marketplace.new.save
39
+ @api_key = Balanced::ApiKey.new.save
40
+ Balanced.configure @api_key.secret
41
+ @marketplace = Balanced::Marketplace.new.save
42
+ @rich_card = Balanced::Card.new(
43
+ :number => '5105105105105100',
44
+ :expiration_month => '12',
45
+ :expiration_year => '2020',
46
+ :cvv => '123'
47
+ ).save
48
+ @amount_in_escrow = 15000 * 100
49
+ @rich_card.debit(:amount => @amount_in_escrow)
39
50
  end
40
51
 
41
52
  # @example Use this metadata to create a marketplace in a before block
@@ -44,19 +55,9 @@ RSpec.configure do |c|
44
55
  # # ...
45
56
  # end
46
57
  # end
47
- c.before(:each, :marketplace => true) do
48
- make_marketplace
58
+ c.before(:all, :marketplace => true) do
59
+ VCR.use_cassette(:make_marketplace) do
60
+ make_marketplace
61
+ end
49
62
  end
50
63
  end
51
-
52
-
53
- ACCOUNTS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts/
54
- MERCHANT_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*/
55
- HOLDS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/holds/
56
- BANK_ACCOUNTS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/bank_accounts/
57
- REFUNDS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/refunds/
58
- DEBITS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/debits/
59
- TRANSACTIONS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/transactions/
60
- CREDITS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/credits/
61
- CARDS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/cards/
62
- CUSTOMERS_URI_REGEX = /\/v1\/customers/
data/spec/utils_spec.rb CHANGED
@@ -1,8 +1,8 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
- describe "the utils module" do
4
- it "should correctly translate underscored names" do
5
- result = Balanced::Utils.camelize "api_key"
6
- result.should eq("ApiKey")
3
+ describe 'the utils module' do
4
+ it 'should correctly translate underscored names' do
5
+ result = Balanced::Utils.camelize 'api_key'
6
+ result.should eq('ApiKey')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: balanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 1.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
- - Mahmoud Abdelkader
7
+ - Balanced
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
11
+ date: 2014-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.8.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.8.6
27
27
  - !ruby/object:Gem::Dependency
@@ -38,11 +38,23 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.9.0
41
- description: "Balanced is the payments platform for marketplaces.\n Integrate a
42
- payments experience just like Amazon for your marketplace.\n Forget about dealing
43
- with banking systems, compliance, fraud, and security.\n "
41
+ - !ruby/object:Gem::Dependency
42
+ name: addressable
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.5
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.3.5
55
+ description: 'Balanced is the payments platform for marketplaces. '
44
56
  email:
45
- - mahmoud@poundpay.com
57
+ - dev@balancedpayments.com
46
58
  executables: []
47
59
  extensions: []
48
60
  extra_rdoc_files: []
@@ -70,85 +82,68 @@ files:
70
82
  - doc/balanced_templates/default/onefile/html/layout.erb
71
83
  - doc/balanced_templates/default/onefile/html/setup.rb
72
84
  - doc/balanced_templates/default/tags/html/index.erb
73
- - examples/bank_account_debits.rb
74
- - examples/customers.rb
75
- - examples/events_and_callbacks.rb
76
- - examples/examples.rb
77
- - examples/exception_handling.rb
78
85
  - lib/balanced.rb
79
86
  - lib/balanced/client.rb
80
87
  - lib/balanced/error.rb
81
88
  - lib/balanced/pager.rb
82
89
  - lib/balanced/resources.rb
83
- - lib/balanced/resources/account.rb
84
90
  - lib/balanced/resources/api_key.rb
85
91
  - lib/balanced/resources/bank_account.rb
86
92
  - lib/balanced/resources/callback.rb
87
93
  - lib/balanced/resources/card.rb
94
+ - lib/balanced/resources/card_hold.rb
88
95
  - lib/balanced/resources/credit.rb
89
96
  - lib/balanced/resources/customer.rb
90
97
  - lib/balanced/resources/debit.rb
91
98
  - lib/balanced/resources/event.rb
92
- - lib/balanced/resources/hold.rb
93
- - lib/balanced/resources/invoice.rb
99
+ - lib/balanced/resources/funding_instrument.rb
100
+ - lib/balanced/resources/hypermedia.rb
94
101
  - lib/balanced/resources/marketplace.rb
95
- - lib/balanced/resources/merchant.rb
102
+ - lib/balanced/resources/order.rb
96
103
  - lib/balanced/resources/refund.rb
97
104
  - lib/balanced/resources/resource.rb
98
105
  - lib/balanced/resources/reversal.rb
99
- - lib/balanced/resources/transaction.rb
106
+ - lib/balanced/resources/transfer.rb
100
107
  - lib/balanced/response/balanced_exception_middleware.rb
101
108
  - lib/balanced/utils.rb
102
109
  - lib/balanced/version.rb
103
110
  - scenario.cache
104
- - scenarios/account_add_card/definition.rb
105
- - scenarios/account_add_card/request.rb
106
- - scenarios/account_add_card/ruby.mako
107
- - scenarios/account_capture_hold/definition.rb
108
- - scenarios/account_capture_hold/request.rb
109
- - scenarios/account_capture_hold/ruby.mako
110
- - scenarios/account_create/definition.rb
111
- - scenarios/account_create/request.rb
112
- - scenarios/account_create/ruby.mako
113
- - scenarios/account_create_buyer/definition.rb
114
- - scenarios/account_create_buyer/request.rb
115
- - scenarios/account_create_buyer/ruby.mako
116
- - scenarios/account_create_debit/definition.rb
117
- - scenarios/account_create_debit/request.rb
118
- - scenarios/account_create_debit/ruby.mako
119
- - scenarios/account_create_hold/definition.rb
120
- - scenarios/account_create_hold/request.rb
121
- - scenarios/account_create_hold/ruby.mako
122
- - scenarios/account_create_merchant/definition.rb
123
- - scenarios/account_create_merchant/request.rb
124
- - scenarios/account_create_merchant/ruby.mako
125
- - scenarios/account_underwrite_business/definition.rb
126
- - scenarios/account_underwrite_business/request.rb
127
- - scenarios/account_underwrite_business/ruby.mako
128
- - scenarios/account_underwrite_person/definition.rb
129
- - scenarios/account_underwrite_person/request.rb
130
- - scenarios/account_underwrite_person/ruby.mako
111
+ - scenarios/api_key_create/definition.rb
112
+ - scenarios/api_key_create/request.rb
113
+ - scenarios/api_key_create/ruby.mako
114
+ - scenarios/api_key_delete/definition.rb
115
+ - scenarios/api_key_delete/request.rb
116
+ - scenarios/api_key_delete/ruby.mako
117
+ - scenarios/api_key_list/definition.rb
118
+ - scenarios/api_key_list/request.rb
119
+ - scenarios/api_key_list/ruby.mako
120
+ - scenarios/api_key_show/definition.rb
121
+ - scenarios/api_key_show/request.rb
122
+ - scenarios/api_key_show/ruby.mako
123
+ - scenarios/bank_account_associate_to_customer/definition.rb
124
+ - scenarios/bank_account_associate_to_customer/request.rb
125
+ - scenarios/bank_account_associate_to_customer/ruby.mako
131
126
  - scenarios/bank_account_create/definition.rb
132
127
  - scenarios/bank_account_create/request.rb
133
128
  - scenarios/bank_account_create/ruby.mako
129
+ - scenarios/bank_account_credit/definition.rb
130
+ - scenarios/bank_account_credit/request.rb
131
+ - scenarios/bank_account_credit/ruby.mako
132
+ - scenarios/bank_account_debit/definition.rb
133
+ - scenarios/bank_account_debit/request.rb
134
+ - scenarios/bank_account_debit/ruby.mako
134
135
  - scenarios/bank_account_delete/definition.rb
135
136
  - scenarios/bank_account_delete/request.rb
136
137
  - scenarios/bank_account_delete/ruby.mako
137
- - scenarios/bank_account_find_and_credit/definition.rb
138
- - scenarios/bank_account_find_and_credit/request.rb
139
- - scenarios/bank_account_find_and_credit/ruby.mako
140
- - scenarios/bank_account_find_and_delete/definition.rb
141
- - scenarios/bank_account_find_and_delete/request.rb
142
- - scenarios/bank_account_find_and_delete/ruby.mako
143
- - scenarios/bank_account_invalid_routing_number/definition.rb
144
- - scenarios/bank_account_invalid_routing_number/request.rb
145
- - scenarios/bank_account_invalid_routing_number/ruby.mako
146
138
  - scenarios/bank_account_list/definition.rb
147
139
  - scenarios/bank_account_list/request.rb
148
140
  - scenarios/bank_account_list/ruby.mako
149
141
  - scenarios/bank_account_show/definition.rb
150
142
  - scenarios/bank_account_show/request.rb
151
143
  - scenarios/bank_account_show/ruby.mako
144
+ - scenarios/bank_account_update/definition.rb
145
+ - scenarios/bank_account_update/request.rb
146
+ - scenarios/bank_account_update/ruby.mako
152
147
  - scenarios/bank_account_verification_create/definition.rb
153
148
  - scenarios/bank_account_verification_create/request.rb
154
149
  - scenarios/bank_account_verification_create/ruby.mako
@@ -170,15 +165,36 @@ files:
170
165
  - scenarios/callback_show/definition.rb
171
166
  - scenarios/callback_show/request.rb
172
167
  - scenarios/callback_show/ruby.mako
168
+ - scenarios/card_associate_to_customer/definition.rb
169
+ - scenarios/card_associate_to_customer/request.rb
170
+ - scenarios/card_associate_to_customer/ruby.mako
173
171
  - scenarios/card_create/definition.rb
174
172
  - scenarios/card_create/request.rb
175
173
  - scenarios/card_create/ruby.mako
174
+ - scenarios/card_debit/definition.rb
175
+ - scenarios/card_debit/request.rb
176
+ - scenarios/card_debit/ruby.mako
176
177
  - scenarios/card_delete/definition.rb
177
178
  - scenarios/card_delete/request.rb
178
179
  - scenarios/card_delete/ruby.mako
179
- - scenarios/card_invalidate/definition.rb
180
- - scenarios/card_invalidate/request.rb
181
- - scenarios/card_invalidate/ruby.mako
180
+ - scenarios/card_hold_capture/definition.rb
181
+ - scenarios/card_hold_capture/request.rb
182
+ - scenarios/card_hold_capture/ruby.mako
183
+ - scenarios/card_hold_create/definition.rb
184
+ - scenarios/card_hold_create/request.rb
185
+ - scenarios/card_hold_create/ruby.mako
186
+ - scenarios/card_hold_list/definition.rb
187
+ - scenarios/card_hold_list/request.rb
188
+ - scenarios/card_hold_list/ruby.mako
189
+ - scenarios/card_hold_show/definition.rb
190
+ - scenarios/card_hold_show/request.rb
191
+ - scenarios/card_hold_show/ruby.mako
192
+ - scenarios/card_hold_update/definition.rb
193
+ - scenarios/card_hold_update/request.rb
194
+ - scenarios/card_hold_update/ruby.mako
195
+ - scenarios/card_hold_void/definition.rb
196
+ - scenarios/card_hold_void/request.rb
197
+ - scenarios/card_hold_void/ruby.mako
182
198
  - scenarios/card_list/definition.rb
183
199
  - scenarios/card_list/request.rb
184
200
  - scenarios/card_list/ruby.mako
@@ -188,129 +204,64 @@ files:
188
204
  - scenarios/card_update/definition.rb
189
205
  - scenarios/card_update/request.rb
190
206
  - scenarios/card_update/ruby.mako
191
- - scenarios/credit_account_list/definition.rb
192
- - scenarios/credit_account_list/request.rb
193
- - scenarios/credit_account_list/ruby.mako
194
- - scenarios/credit_account_merchant_create/definition.rb
195
- - scenarios/credit_account_merchant_create/request.rb
196
- - scenarios/credit_account_merchant_create/ruby.mako
197
- - scenarios/credit_bank_account_list/definition.rb
198
- - scenarios/credit_bank_account_list/request.rb
199
- - scenarios/credit_bank_account_list/ruby.mako
200
- - scenarios/credit_create_existing_bank_account/definition.rb
201
- - scenarios/credit_create_existing_bank_account/request.rb
202
- - scenarios/credit_create_existing_bank_account/ruby.mako
203
- - scenarios/credit_create_new_bank_account/definition.rb
204
- - scenarios/credit_create_new_bank_account/request.rb
205
- - scenarios/credit_create_new_bank_account/ruby.mako
206
- - scenarios/credit_customer_list/definition.rb
207
- - scenarios/credit_customer_list/request.rb
208
- - scenarios/credit_customer_list/ruby.mako
209
- - scenarios/credit_failed_state/definition.rb
210
- - scenarios/credit_failed_state/request.rb
211
- - scenarios/credit_failed_state/ruby.mako
212
207
  - scenarios/credit_list/definition.rb
213
208
  - scenarios/credit_list/request.rb
214
209
  - scenarios/credit_list/ruby.mako
215
- - scenarios/credit_paid_state/definition.rb
216
- - scenarios/credit_paid_state/request.rb
217
- - scenarios/credit_paid_state/ruby.mako
218
- - scenarios/credit_pending_state/definition.rb
219
- - scenarios/credit_pending_state/request.rb
220
- - scenarios/credit_pending_state/ruby.mako
210
+ - scenarios/credit_list_bank_account/definition.rb
211
+ - scenarios/credit_list_bank_account/request.rb
212
+ - scenarios/credit_list_bank_account/ruby.mako
221
213
  - scenarios/credit_show/definition.rb
222
214
  - scenarios/credit_show/request.rb
223
215
  - scenarios/credit_show/ruby.mako
224
- - scenarios/customer_add_bank_account/definition.rb
225
- - scenarios/customer_add_bank_account/request.rb
226
- - scenarios/customer_add_bank_account/ruby.mako
227
- - scenarios/customer_add_card/definition.rb
228
- - scenarios/customer_add_card/request.rb
229
- - scenarios/customer_add_card/ruby.mako
230
- - scenarios/customer_capture_hold/definition.rb
231
- - scenarios/customer_capture_hold/request.rb
232
- - scenarios/customer_capture_hold/ruby.mako
216
+ - scenarios/credit_update/definition.rb
217
+ - scenarios/credit_update/request.rb
218
+ - scenarios/credit_update/ruby.mako
233
219
  - scenarios/customer_create/definition.rb
234
220
  - scenarios/customer_create/request.rb
235
221
  - scenarios/customer_create/ruby.mako
236
- - scenarios/customer_create_debit/definition.rb
237
- - scenarios/customer_create_debit/request.rb
238
- - scenarios/customer_create_debit/ruby.mako
239
- - scenarios/customer_create_hold/definition.rb
240
- - scenarios/customer_create_hold/request.rb
241
- - scenarios/customer_create_hold/ruby.mako
242
- - scenarios/customer_credit/definition.rb
243
- - scenarios/customer_credit/request.rb
244
- - scenarios/customer_credit/ruby.mako
245
222
  - scenarios/customer_delete/definition.rb
246
223
  - scenarios/customer_delete/request.rb
247
224
  - scenarios/customer_delete/ruby.mako
248
- - scenarios/debit_account_list/definition.rb
249
- - scenarios/debit_account_list/request.rb
250
- - scenarios/debit_account_list/ruby.mako
251
- - scenarios/debit_create/definition.rb
252
- - scenarios/debit_create/request.rb
253
- - scenarios/debit_create/ruby.mako
254
- - scenarios/debit_customer_list/definition.rb
255
- - scenarios/debit_customer_list/request.rb
256
- - scenarios/debit_customer_list/ruby.mako
225
+ - scenarios/customer_list/definition.rb
226
+ - scenarios/customer_list/request.rb
227
+ - scenarios/customer_list/ruby.mako
228
+ - scenarios/customer_show/definition.rb
229
+ - scenarios/customer_show/request.rb
230
+ - scenarios/customer_show/ruby.mako
231
+ - scenarios/customer_update/definition.rb
232
+ - scenarios/customer_update/request.rb
233
+ - scenarios/customer_update/ruby.mako
257
234
  - scenarios/debit_list/definition.rb
258
235
  - scenarios/debit_list/request.rb
259
236
  - scenarios/debit_list/ruby.mako
260
- - scenarios/debit_refund/definition.rb
261
- - scenarios/debit_refund/request.rb
262
- - scenarios/debit_refund/ruby.mako
263
237
  - scenarios/debit_show/definition.rb
264
238
  - scenarios/debit_show/request.rb
265
239
  - scenarios/debit_show/ruby.mako
266
240
  - scenarios/debit_update/definition.rb
267
241
  - scenarios/debit_update/request.rb
268
242
  - scenarios/debit_update/ruby.mako
269
- - scenarios/delete.rb
270
243
  - scenarios/event_list/definition.rb
271
244
  - scenarios/event_list/request.rb
272
245
  - scenarios/event_list/ruby.mako
273
- - scenarios/event_replay/definition.rb
274
- - scenarios/event_replay/request.rb
275
- - scenarios/event_replay/ruby.mako
276
246
  - scenarios/event_show/definition.rb
277
247
  - scenarios/event_show/request.rb
278
248
  - scenarios/event_show/ruby.mako
279
- - scenarios/execute.rb
280
249
  - scenarios/helpers.rb
281
- - scenarios/hold_account_list/definition.rb
282
- - scenarios/hold_account_list/request.rb
283
- - scenarios/hold_account_list/ruby.mako
284
- - scenarios/hold_capture/definition.rb
285
- - scenarios/hold_capture/request.rb
286
- - scenarios/hold_capture/ruby.mako
287
- - scenarios/hold_create/definition.rb
288
- - scenarios/hold_create/request.rb
289
- - scenarios/hold_create/ruby.mako
290
- - scenarios/hold_customer_list/definition.rb
291
- - scenarios/hold_customer_list/request.rb
292
- - scenarios/hold_customer_list/ruby.mako
293
- - scenarios/hold_list/definition.rb
294
- - scenarios/hold_list/request.rb
295
- - scenarios/hold_list/ruby.mako
296
- - scenarios/hold_show/definition.rb
297
- - scenarios/hold_show/request.rb
298
- - scenarios/hold_show/ruby.mako
299
- - scenarios/hold_update/definition.rb
300
- - scenarios/hold_update/request.rb
301
- - scenarios/hold_update/ruby.mako
302
- - scenarios/hold_void/definition.rb
303
- - scenarios/hold_void/request.rb
304
- - scenarios/hold_void/ruby.mako
305
- - scenarios/refund_account_list/definition.rb
306
- - scenarios/refund_account_list/request.rb
307
- - scenarios/refund_account_list/ruby.mako
250
+ - scenarios/order_create/definition.rb
251
+ - scenarios/order_create/request.rb
252
+ - scenarios/order_create/ruby.mako
253
+ - scenarios/order_list/definition.rb
254
+ - scenarios/order_list/request.rb
255
+ - scenarios/order_list/ruby.mako
256
+ - scenarios/order_show/definition.rb
257
+ - scenarios/order_show/request.rb
258
+ - scenarios/order_show/ruby.mako
259
+ - scenarios/order_update/definition.rb
260
+ - scenarios/order_update/request.rb
261
+ - scenarios/order_update/ruby.mako
308
262
  - scenarios/refund_create/definition.rb
309
263
  - scenarios/refund_create/request.rb
310
264
  - scenarios/refund_create/ruby.mako
311
- - scenarios/refund_customer_list/definition.rb
312
- - scenarios/refund_customer_list/request.rb
313
- - scenarios/refund_customer_list/ruby.mako
314
265
  - scenarios/refund_list/definition.rb
315
266
  - scenarios/refund_list/request.rb
316
267
  - scenarios/refund_list/ruby.mako
@@ -320,30 +271,38 @@ files:
320
271
  - scenarios/refund_update/definition.rb
321
272
  - scenarios/refund_update/request.rb
322
273
  - scenarios/refund_update/ruby.mako
323
- - scenarios/render.rb
324
274
  - scenarios/render_mako.rb
325
- - scenarios/render_one.rb
275
+ - scenarios/reversal_create/definition.rb
276
+ - scenarios/reversal_create/request.rb
277
+ - scenarios/reversal_create/ruby.mako
278
+ - scenarios/reversal_list/definition.rb
279
+ - scenarios/reversal_list/request.rb
280
+ - scenarios/reversal_list/ruby.mako
281
+ - scenarios/reversal_show/definition.rb
282
+ - scenarios/reversal_show/request.rb
283
+ - scenarios/reversal_show/ruby.mako
284
+ - scenarios/reversal_update/definition.rb
285
+ - scenarios/reversal_update/request.rb
286
+ - scenarios/reversal_update/ruby.mako
326
287
  - spec/balanced/error_spec.rb
327
288
  - spec/balanced/pager_spec.rb
328
- - spec/balanced/resources/account_spec.rb
329
289
  - spec/balanced/resources/api_key_spec.rb
330
290
  - spec/balanced/resources/bank_account_spec.rb
331
291
  - spec/balanced/resources/callback_spec.rb
292
+ - spec/balanced/resources/card_hold_spec.rb
332
293
  - spec/balanced/resources/card_spec.rb
333
294
  - spec/balanced/resources/credit_spec.rb
334
295
  - spec/balanced/resources/customer_spec.rb
335
- - spec/balanced/resources/hold_spec.rb
296
+ - spec/balanced/resources/debit_spec.rb
336
297
  - spec/balanced/resources/marketplace_spec.rb
337
- - spec/balanced/resources/merchant_spec.rb
298
+ - spec/balanced/resources/order_spec.rb
338
299
  - spec/balanced/resources/resource_spec.rb
339
300
  - spec/balanced/response/balanced_exception_middleware_spec.rb
340
301
  - spec/balanced_spec.rb
341
302
  - spec/client_spec.rb
342
- - spec/scenarios_spec.rb
343
303
  - spec/spec_helper.rb
344
304
  - spec/utils_spec.rb
345
- - upload_docs.rb
346
- homepage: https://balancedpayments.com
305
+ homepage: https://www.balancedpayments.com
347
306
  licenses: []
348
307
  metadata: {}
349
308
  post_install_message:
@@ -357,33 +316,32 @@ required_ruby_version: !ruby/object:Gem::Requirement
357
316
  version: '0'
358
317
  required_rubygems_version: !ruby/object:Gem::Requirement
359
318
  requirements:
360
- - - '>='
319
+ - - '>'
361
320
  - !ruby/object:Gem::Version
362
- version: '0'
321
+ version: 1.3.1
363
322
  requirements: []
364
323
  rubyforge_project:
365
324
  rubygems_version: 2.0.3
366
325
  signing_key:
367
326
  specification_version: 4
368
- summary: Sign up on https://balancedpayments.com/
327
+ summary: https://docs.balancedpayments.com/
369
328
  test_files:
370
329
  - spec/balanced/error_spec.rb
371
330
  - spec/balanced/pager_spec.rb
372
- - spec/balanced/resources/account_spec.rb
373
331
  - spec/balanced/resources/api_key_spec.rb
374
332
  - spec/balanced/resources/bank_account_spec.rb
375
333
  - spec/balanced/resources/callback_spec.rb
334
+ - spec/balanced/resources/card_hold_spec.rb
376
335
  - spec/balanced/resources/card_spec.rb
377
336
  - spec/balanced/resources/credit_spec.rb
378
337
  - spec/balanced/resources/customer_spec.rb
379
- - spec/balanced/resources/hold_spec.rb
338
+ - spec/balanced/resources/debit_spec.rb
380
339
  - spec/balanced/resources/marketplace_spec.rb
381
- - spec/balanced/resources/merchant_spec.rb
340
+ - spec/balanced/resources/order_spec.rb
382
341
  - spec/balanced/resources/resource_spec.rb
383
342
  - spec/balanced/response/balanced_exception_middleware_spec.rb
384
343
  - spec/balanced_spec.rb
385
344
  - spec/client_spec.rb
386
- - spec/scenarios_spec.rb
387
345
  - spec/spec_helper.rb
388
346
  - spec/utils_spec.rb
389
347
  has_rdoc: