balanced 1.1.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +10 -6
  4. data/CHANGELOG.md +4 -0
  5. data/README.md +1 -1
  6. data/lib/balanced/resources.rb +2 -0
  7. data/lib/balanced/resources/account.rb +33 -0
  8. data/lib/balanced/resources/card.rb +1 -1
  9. data/lib/balanced/resources/customer.rb +8 -0
  10. data/lib/balanced/resources/resource.rb +4 -6
  11. data/lib/balanced/resources/settlement.rb +12 -0
  12. data/lib/balanced/response/balanced_exception_middleware.rb +1 -1
  13. data/lib/balanced/utils.rb +1 -1
  14. data/lib/balanced/version.rb +1 -1
  15. data/scenarios/account_credit/definition.rb +1 -0
  16. data/scenarios/account_credit/request.rb +5 -0
  17. data/scenarios/account_credit/ruby.mako +49 -0
  18. data/scenarios/account_list/definition.rb +1 -0
  19. data/scenarios/account_list/request.rb +2 -0
  20. data/scenarios/account_list/ruby.mako +64 -0
  21. data/scenarios/account_list_customer/definition.rb +1 -0
  22. data/scenarios/account_list_customer/request.rb +3 -0
  23. data/scenarios/account_list_customer/ruby.mako +38 -0
  24. data/scenarios/account_show/definition.rb +1 -0
  25. data/scenarios/account_show/request.rb +2 -0
  26. data/scenarios/account_show/ruby.mako +37 -0
  27. data/scenarios/api_key_create/ruby.mako +6 -6
  28. data/scenarios/api_key_delete/ruby.mako +2 -2
  29. data/scenarios/api_key_list/ruby.mako +10 -10
  30. data/scenarios/api_key_show/ruby.mako +6 -6
  31. data/scenarios/bank_account_associate_to_customer/ruby.mako +16 -14
  32. data/scenarios/bank_account_create/ruby.mako +13 -11
  33. data/scenarios/bank_account_credit/ruby.mako +16 -16
  34. data/scenarios/bank_account_debit/ruby.mako +21 -18
  35. data/scenarios/bank_account_debit_order/definition.rb +1 -0
  36. data/scenarios/bank_account_debit_order/request.rb +7 -0
  37. data/scenarios/bank_account_debit_order/ruby.mako +52 -0
  38. data/scenarios/bank_account_delete/ruby.mako +2 -2
  39. data/scenarios/bank_account_list/ruby.mako +26 -22
  40. data/scenarios/bank_account_show/ruby.mako +14 -12
  41. data/scenarios/bank_account_update/ruby.mako +14 -12
  42. data/scenarios/bank_account_verification_create/ruby.mako +10 -10
  43. data/scenarios/bank_account_verification_show/ruby.mako +10 -10
  44. data/scenarios/bank_account_verification_update/ruby.mako +9 -9
  45. data/scenarios/callback_create/ruby.mako +4 -4
  46. data/scenarios/callback_delete/ruby.mako +2 -2
  47. data/scenarios/callback_list/ruby.mako +4 -4
  48. data/scenarios/callback_show/ruby.mako +5 -5
  49. data/scenarios/card_associate_to_customer/ruby.mako +26 -26
  50. data/scenarios/card_create/ruby.mako +13 -15
  51. data/scenarios/card_create_creditable/ruby.mako +11 -11
  52. data/scenarios/card_create_dispute/ruby.mako +13 -13
  53. data/scenarios/card_credit/ruby.mako +16 -14
  54. data/scenarios/card_credit_order/definition.rb +1 -0
  55. data/scenarios/card_credit_order/request.rb +7 -0
  56. data/scenarios/card_credit_order/ruby.mako +45 -0
  57. data/scenarios/card_debit/ruby.mako +20 -17
  58. data/scenarios/card_debit_dispute/ruby.mako +20 -17
  59. data/scenarios/card_delete/ruby.mako +2 -2
  60. data/scenarios/card_hold_capture/ruby.mako +20 -17
  61. data/scenarios/card_hold_create/ruby.mako +16 -14
  62. data/scenarios/card_hold_list/ruby.mako +33 -27
  63. data/scenarios/card_hold_order/definition.rb +1 -0
  64. data/scenarios/card_hold_order/request.rb +6 -0
  65. data/scenarios/card_hold_order/ruby.mako +45 -0
  66. data/scenarios/card_hold_show/ruby.mako +16 -14
  67. data/scenarios/card_hold_update/ruby.mako +16 -14
  68. data/scenarios/card_hold_void/ruby.mako +17 -15
  69. data/scenarios/card_list/ruby.mako +25 -29
  70. data/scenarios/card_show/ruby.mako +14 -16
  71. data/scenarios/card_update/ruby.mako +14 -16
  72. data/scenarios/credit_list/ruby.mako +44 -14
  73. data/scenarios/credit_list_bank_account/ruby.mako +3 -3
  74. data/scenarios/credit_order/request.rb +2 -2
  75. data/scenarios/credit_order/ruby.mako +35 -14
  76. data/scenarios/credit_show/ruby.mako +16 -16
  77. data/scenarios/credit_update/ruby.mako +16 -16
  78. data/scenarios/customer_create/ruby.mako +22 -20
  79. data/scenarios/customer_delete/ruby.mako +1 -1
  80. data/scenarios/customer_list/ruby.mako +43 -39
  81. data/scenarios/customer_show/ruby.mako +23 -21
  82. data/scenarios/customer_update/ruby.mako +23 -21
  83. data/scenarios/debit_dispute_show/ruby.mako +12 -12
  84. data/scenarios/debit_list/ruby.mako +43 -37
  85. data/scenarios/debit_order/ruby.mako +22 -19
  86. data/scenarios/debit_show/ruby.mako +20 -17
  87. data/scenarios/debit_update/ruby.mako +20 -17
  88. data/scenarios/dispute_list/ruby.mako +11 -11
  89. data/scenarios/dispute_show/ruby.mako +12 -12
  90. data/scenarios/event_list/ruby.mako +55 -81
  91. data/scenarios/event_show/ruby.mako +35 -45
  92. data/scenarios/order_create/ruby.mako +16 -14
  93. data/scenarios/order_list/ruby.mako +33 -29
  94. data/scenarios/order_show/ruby.mako +16 -14
  95. data/scenarios/order_update/ruby.mako +16 -14
  96. data/scenarios/refund_create/ruby.mako +13 -13
  97. data/scenarios/refund_list/ruby.mako +12 -12
  98. data/scenarios/refund_show/ruby.mako +13 -13
  99. data/scenarios/refund_update/ruby.mako +13 -13
  100. data/scenarios/reversal_create/ruby.mako +13 -13
  101. data/scenarios/reversal_list/ruby.mako +12 -12
  102. data/scenarios/reversal_show/ruby.mako +13 -13
  103. data/scenarios/reversal_update/ruby.mako +13 -13
  104. data/scenarios/settlement_create/definition.rb +1 -0
  105. data/scenarios/settlement_create/request.rb +5 -0
  106. data/scenarios/settlement_create/ruby.mako +48 -0
  107. data/scenarios/settlement_list/definition.rb +1 -0
  108. data/scenarios/settlement_list/request.rb +2 -0
  109. data/scenarios/settlement_list/ruby.mako +40 -0
  110. data/scenarios/settlement_list_account/definition.rb +1 -0
  111. data/scenarios/settlement_list_account/request.rb +3 -0
  112. data/scenarios/settlement_list_account/ruby.mako +41 -0
  113. data/scenarios/settlement_show/definition.rb +1 -0
  114. data/scenarios/settlement_show/request.rb +2 -0
  115. data/scenarios/settlement_show/ruby.mako +40 -0
  116. data/snippets/account-balance.rb +1 -0
  117. data/snippets/bank-account-create.rb +6 -0
  118. data/snippets/bank-account-debit.rb +9 -0
  119. data/snippets/bank-account-verification-confirm.rb +5 -0
  120. data/snippets/bank-account-verification-create.rb +1 -0
  121. data/snippets/callback-create.rb +4 -0
  122. data/snippets/card-associate-to-customer.rb +2 -0
  123. data/snippets/card-create-dispute.rb +6 -0
  124. data/snippets/card-create.rb +7 -0
  125. data/snippets/card-credit.rb +9 -0
  126. data/snippets/card-debit.rb +9 -0
  127. data/snippets/card-hold-capture.rb +6 -0
  128. data/snippets/card-hold-create.rb +6 -0
  129. data/snippets/card-hold-void.rb +3 -0
  130. data/snippets/create-buyer-and-card.rb +13 -0
  131. data/snippets/credit-create.rb +8 -0
  132. data/snippets/credit-fetch.rb +1 -0
  133. data/snippets/credit-marketplace-escrow.rb +4 -0
  134. data/snippets/credit-reverse.rb +1 -0
  135. data/snippets/credit-soft-descriptor.rb +9 -0
  136. data/snippets/credit-split.rb +13 -0
  137. data/snippets/customer-create.rb +8 -0
  138. data/snippets/debit-dispute-show.rb +3 -0
  139. data/snippets/debit-fetch.rb +1 -0
  140. data/snippets/debit-marketplace-escrow.rb +4 -0
  141. data/snippets/debit-refund.rb +1 -0
  142. data/snippets/dispute-list.rb +1 -0
  143. data/snippets/dispute-show.rb +2 -0
  144. data/snippets/examine-order-after-refund.rb +3 -0
  145. data/snippets/examine-order-after-reversal.rb +3 -0
  146. data/snippets/example.rb +1 -0
  147. data/snippets/marketplace-in-escrow.rb +1 -0
  148. data/snippets/merchant-payable-account-fetch.rb +2 -0
  149. data/snippets/order-amount-escrowed.rb +3 -0
  150. data/snippets/order-bank-account-create.rb +8 -0
  151. data/snippets/order-create.rb +1 -0
  152. data/snippets/order-credit-marketplace.rb +5 -0
  153. data/snippets/order-credit-merchant-payable-account.rb +4 -0
  154. data/snippets/order-credit.rb +4 -0
  155. data/snippets/order-credits-fetch.rb +1 -0
  156. data/snippets/order-debit.rb +4 -0
  157. data/snippets/order-debits-fetch.rb +1 -0
  158. data/snippets/order-fetch.rb +1 -0
  159. data/snippets/order-update.rb +5 -0
  160. data/snippets/refund-create.rb +13 -0
  161. data/snippets/reversal-create.rb +13 -0
  162. data/snippets/settlement-create.rb +5 -0
  163. data/spec/balanced/resources/account_spec.rb +265 -0
  164. data/spec/balanced/resources/card_spec.rb +6 -6
  165. metadata +86 -2
@@ -3,7 +3,7 @@ Balanced::Card.new
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2jJSjIixy2qkOMmIONPtXnawOUftBDRSK')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
8
  card = Balanced::Card.new(
9
9
  :expiration_month => '05',
@@ -13,7 +13,7 @@ card = Balanced::Card.new(
13
13
  ).save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Card:0x007f86fe899ba8
16
+ #<Balanced::Card:0x007fcde0963560
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -30,7 +30,7 @@ card = Balanced::Card.new(
30
30
  "can_credit"=>true,
31
31
  "can_debit"=>true,
32
32
  "category"=>"other",
33
- "created_at"=>"2014-05-19T20:27:07.461892Z",
33
+ "created_at"=>"2014-12-17T21:25:02.071736Z",
34
34
  "cvv"=>nil,
35
35
  "cvv_match"=>nil,
36
36
  "cvv_result"=>nil,
@@ -38,25 +38,25 @@ card = Balanced::Card.new(
38
38
  "expiration_year"=>2020,
39
39
  "fingerprint"=>
40
40
  "7dc93d35b59078a1da8e0ebd2cbec65a6ca205760a1be1b90a143d7f2b00e355",
41
- "href"=>"/cards/CC7nMc4BAti7DgvWmpGV5e6N",
42
- "id"=>"CC7nMc4BAti7DgvWmpGV5e6N",
41
+ "href"=>"/cards/CC7bBGoeKPe5DBKWgduZd5Cl",
42
+ "id"=>"CC7bBGoeKPe5DBKWgduZd5Cl",
43
43
  "is_verified"=>true,
44
44
  "links"=>{"customer"=>nil},
45
45
  "meta"=>{},
46
46
  "name"=>"Johannes Bach",
47
47
  "number"=>"xxxxxxxxxxxx1118",
48
48
  "type"=>"debit",
49
- "updated_at"=>"2014-05-19T20:27:07.461894Z"},
49
+ "updated_at"=>"2014-12-17T21:25:02.071738Z"},
50
50
  @hyperlinks=
51
51
  {"card_holds"=>
52
- #<Proc:0x007f86fe8d3ad8/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fcde0960ab8/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "credits"=>
54
- #<Proc:0x007f86fe8d1c60/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fcde093e800/lib/balanced/utils.rb:6 (lambda)>,
55
55
  "customer"=>
56
- #<Proc:0x007f86fe8d12b0/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fcde093ddd8/lib/balanced/utils.rb:6 (lambda)>,
57
57
  "debits"=>
58
- #<Proc:0x007f86fe913408/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fcde0937bb8/lib/balanced/utils.rb:6 (lambda)>,
59
59
  "disputes"=>
60
- #<Proc:0x007f86fe911590/lib/balanced/utils.rb:6 (lambda)>}>
60
+ #<Proc:0x007fcde09357f0/lib/balanced/utils.rb:6 (lambda)>}>
61
61
 
62
62
  % endif
@@ -3,7 +3,7 @@ Balanced::Card.new
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
8
  card = Balanced::Card.new(
9
9
  :cvv => '123',
@@ -13,7 +13,7 @@ card = Balanced::Card.new(
13
13
  ).save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Card:0x007fa7d310c160
16
+ #<Balanced::Card:0x007fcde3a41f88
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -25,12 +25,12 @@ card = Balanced::Card.new(
25
25
  "avs_postal_match"=>nil,
26
26
  "avs_result"=>nil,
27
27
  "avs_street_match"=>nil,
28
- "bank"=>"BANK OF AMERICA",
28
+ "bank_name"=>"BANK OF AMERICA",
29
29
  "brand"=>"Discover",
30
30
  "can_credit"=>true,
31
31
  "can_debit"=>true,
32
- "category"=>"consumer card",
33
- "created_at"=>"2014-05-15T00:42:36.010022Z",
32
+ "category"=>"other",
33
+ "created_at"=>"2014-12-17T21:25:34.002704Z",
34
34
  "cvv"=>"xxx",
35
35
  "cvv_match"=>"yes",
36
36
  "cvv_result"=>"Match",
@@ -38,25 +38,25 @@ card = Balanced::Card.new(
38
38
  "expiration_year"=>3000,
39
39
  "fingerprint"=>
40
40
  "3c667a62653e187f29b5781eeb0703f26e99558080de0c0f9490b5f9c4ac2871",
41
- "href"=>"/cards/CC6iIaFL1QliTaYG47BArZAh",
42
- "id"=>"CC6iIaFL1QliTaYG47BArZAh",
41
+ "href"=>"/cards/CC7Lwi6mzKkqwXrIg5UY1BE9",
42
+ "id"=>"CC7Lwi6mzKkqwXrIg5UY1BE9",
43
43
  "is_verified"=>true,
44
44
  "links"=>{"customer"=>nil},
45
45
  "meta"=>{},
46
46
  "name"=>nil,
47
47
  "number"=>"xxxxxxxxxxxx0002",
48
48
  "type"=>"debit",
49
- "updated_at"=>"2014-05-15T00:42:36.010024Z"},
49
+ "updated_at"=>"2014-12-17T21:25:34.002706Z"},
50
50
  @hyperlinks=
51
51
  {"card_holds"=>
52
- #<Proc:0x007fa7d3451e88/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fcde3a28f10/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "credits"=>
54
- #<Proc:0x007fa7d310bdf0/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fcde3a168b0/lib/balanced/utils.rb:6 (lambda)>,
55
55
  "customer"=>
56
- #<Proc:0x007fa7d310b3a0/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fcde39fc640/lib/balanced/utils.rb:6 (lambda)>,
57
57
  "debits"=>
58
- #<Proc:0x007fa7d3109410/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fcde39dc480/lib/balanced/utils.rb:6 (lambda)>,
59
59
  "disputes"=>
60
- #<Proc:0x007fa7d3103510/lib/balanced/utils.rb:6 (lambda)>}>
60
+ #<Proc:0x007fcde39cfe88/lib/balanced/utils.rb:6 (lambda)>}>
61
61
 
62
62
  % endif
@@ -2,42 +2,44 @@
2
2
  Balanced::Card.credit
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-2jJSjIixy2qkOMmIONPtXnawOUftBDRSK')
5
+ Balanced.configure('ak-test-25ZY8HQwZPuQtDecrxb671LilUya5t5G0')
6
6
 
7
- card = Balanced::Card.fetch('/cards/CC7nMc4BAti7DgvWmpGV5e6N')
7
+ card = Balanced::Card.fetch('/cards/CC3iCCIHprJu5HPyP7vmE92B')
8
8
  card.credit(
9
9
  :amount => 5000,
10
10
  :description => 'Some descriptive text for the debit in the dashboard'
11
11
  )
12
12
 
13
13
  % elif mode == 'response':
14
- #<Balanced::Credit:0x007f86fda2eed8
14
+ #<Balanced::Credit:0x007fb1e899b640
15
15
  @attributes=
16
16
  {"amount"=>5000,
17
17
  "appears_on_statement_as"=>"example.com",
18
- "created_at"=>"2014-05-19T20:27:07.904059Z",
18
+ "created_at"=>"2014-11-14T19:29:19.110285Z",
19
19
  "currency"=>"USD",
20
20
  "description"=>"Some descriptive text for the debit in the dashboard",
21
21
  "failure_reason"=>nil,
22
22
  "failure_reason_code"=>nil,
23
- "href"=>"/credits/CR7oh5wk2EfSuMu34r2YzT0l",
24
- "id"=>"CR7oh5wk2EfSuMu34r2YzT0l",
23
+ "href"=>"/credits/CR3vFNFFCyqipPjs5t4eaIVO",
24
+ "id"=>"CR3vFNFFCyqipPjs5t4eaIVO",
25
25
  "links"=>
26
- {"customer"=>nil, "destination"=>"CC7nMc4BAti7DgvWmpGV5e6N", "order"=>nil},
26
+ {"customer"=>"CU2718cI8PkMdFyPjboZLZfn",
27
+ "destination"=>"CC3iCCIHprJu5HPyP7vmE92B",
28
+ "order"=>nil},
27
29
  "meta"=>{},
28
30
  "status"=>"succeeded",
29
- "transaction_number"=>"CR018-897-7930",
30
- "updated_at"=>"2014-05-19T20:27:08.244392Z"},
31
+ "transaction_number"=>"CR6R4-4OF-RNZ7",
32
+ "updated_at"=>"2014-11-14T19:29:19.965523Z"},
31
33
  @hyperlinks=
32
34
  {"customer"=>
33
- #<Proc:0x007f86fda2e2f8/lib/balanced/utils.rb:6 (lambda)>,
35
+ #<Proc:0x007fb1e8999980@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/resources/resource.rb:60 (lambda)>,
34
36
  "destination"=>
35
- #<Proc:0x007f86fda2c778/lib/balanced/resources/resource.rb:60 (lambda)>,
37
+ #<Proc:0x007fb1e98e3d78@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/resources/resource.rb:60 (lambda)>,
36
38
  "events"=>
37
- #<Proc:0x007f86fda26788/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fb1e98e1bb8@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/utils.rb:6 (lambda)>,
38
40
  "order"=>
39
- #<Proc:0x007f86fda25d38/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fb1e98e1168@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/utils.rb:6 (lambda)>,
40
42
  "reversals"=>
41
- #<Proc:0x007f86fda1fd98/lib/balanced/utils.rb:6 (lambda)>}>
43
+ #<Proc:0x007fb1e8993288@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/utils.rb:6 (lambda)>}>
42
44
 
43
45
  % endif
@@ -0,0 +1 @@
1
+ Balanced::Order.credit_to
@@ -0,0 +1,7 @@
1
+ <%= boiler_plate %>
2
+ order = Balanced::Order.fetch('<%= request['order_href'] %>')
3
+ card = Balanced::Card.fetch('<%= request['card_href'] %>')
4
+ order.credit_to(
5
+ :source => card,
6
+ :amount => <%= request['payload']['amount'] %>
7
+ )
@@ -0,0 +1,45 @@
1
+ % if mode == 'definition':
2
+ Balanced::Order.credit_to
3
+ % elif mode == 'request':
4
+ require 'balanced'
5
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
6
+
7
+ order = Balanced::Order.fetch('/orders/OR6c6n11zKSFfjE6kGNKtsE8')
8
+ card = Balanced::Card.fetch('/cards/CC7bBGoeKPe5DBKWgduZd5Cl')
9
+ order.credit_to(
10
+ :source => card,
11
+ :amount => 5000
12
+ )
13
+ % elif mode == 'response':
14
+ #<Balanced::Credit:0x007fcde395cfc8
15
+ @attributes=
16
+ {"amount"=>5000,
17
+ "appears_on_statement_as"=>"example.com",
18
+ "created_at"=>"2014-12-17T21:25:06.303877Z",
19
+ "currency"=>"USD",
20
+ "description"=>"Order #12341234",
21
+ "failure_reason"=>nil,
22
+ "failure_reason_code"=>nil,
23
+ "href"=>"/credits/CR7gmj42wn3NG2br01RjK1k9",
24
+ "id"=>"CR7gmj42wn3NG2br01RjK1k9",
25
+ "links"=>
26
+ {"customer"=>"CU68iUpvvUwpRpuuBL3u9Slq",
27
+ "destination"=>"CC7bBGoeKPe5DBKWgduZd5Cl",
28
+ "order"=>"OR6c6n11zKSFfjE6kGNKtsE8"},
29
+ "meta"=>{},
30
+ "status"=>"succeeded",
31
+ "transaction_number"=>"CRPDQ-Y1M-24PV",
32
+ "updated_at"=>"2014-12-17T21:25:06.683745Z"},
33
+ @hyperlinks=
34
+ {"customer"=>
35
+ #<Proc:0x007fcde3954c60/lib/balanced/resources/resource.rb:56 (lambda)>,
36
+ "destination"=>
37
+ #<Proc:0x007fcde394c4e8/lib/balanced/resources/resource.rb:56 (lambda)>,
38
+ "events"=>
39
+ #<Proc:0x007fcde3944338/lib/balanced/utils.rb:6 (lambda)>,
40
+ "order"=>
41
+ #<Proc:0x007fcde393d9c0/lib/balanced/resources/resource.rb:56 (lambda)>,
42
+ "reversals"=>
43
+ #<Proc:0x007fcde39361e8/lib/balanced/utils.rb:6 (lambda)>}>
44
+
45
+ % endif
@@ -2,9 +2,9 @@
2
2
  Balanced::Card.debit
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
5
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
6
6
 
7
- card = Balanced::Card.fetch('/cards/CC4xXVOyMBDdk7FtzG9HwtBv')
7
+ card = Balanced::Card.fetch('/cards/CC73IyzxPUu2z89NH8GrJhLn')
8
8
  card.debit(
9
9
  :amount => 5000,
10
10
  :appears_on_statement_as => 'Statement text',
@@ -12,38 +12,41 @@ card.debit(
12
12
  )
13
13
 
14
14
  % elif mode == 'response':
15
- #<Balanced::Debit:0x007fa7d30da520
15
+ #<Balanced::Debit:0x007fcde38ff620
16
16
  @attributes=
17
17
  {"amount"=>5000,
18
18
  "appears_on_statement_as"=>"BAL*Statement text",
19
- "created_at"=>"2014-05-15T00:41:55.448643Z",
19
+ "created_at"=>"2014-12-17T21:25:30.261603Z",
20
20
  "currency"=>"USD",
21
21
  "description"=>"Some descriptive text for the debit in the dashboard",
22
22
  "failure_reason"=>nil,
23
23
  "failure_reason_code"=>nil,
24
- "href"=>"/debits/WD5z5CvSR6PFx0GgUFn0icKx",
25
- "id"=>"WD5z5CvSR6PFx0GgUFn0icKx",
24
+ "href"=>"/debits/WD7HiEv2UJV5WlRSAcmGOFKJ",
25
+ "id"=>"WD7HiEv2UJV5WlRSAcmGOFKJ",
26
26
  "links"=>
27
- {"customer"=>"CU2L981m9AtPY8pjpGpjnjnf",
27
+ {"card_hold"=>"HL7Hh1D6bok0wd3Xw3Haq08B",
28
+ "customer"=>nil,
28
29
  "dispute"=>nil,
29
30
  "order"=>nil,
30
- "source"=>"CC4xXVOyMBDdk7FtzG9HwtBv"},
31
+ "source"=>"CC73IyzxPUu2z89NH8GrJhLn"},
31
32
  "meta"=>{},
32
33
  "status"=>"succeeded",
33
- "transaction_number"=>"W588-680-6120",
34
- "updated_at"=>"2014-05-15T00:42:17.739744Z"},
34
+ "transaction_number"=>"WTW1-5HD-0TVB",
35
+ "updated_at"=>"2014-12-17T21:25:30.976497Z"},
35
36
  @hyperlinks=
36
- {"customer"=>
37
- #<Proc:0x007fa7d30d8810/lib/balanced/resources/resource.rb:60 (lambda)>,
37
+ {"card_hold"=>
38
+ #<Proc:0x007fcde38f6958/lib/balanced/resources/resource.rb:56 (lambda)>,
39
+ "customer"=>
40
+ #<Proc:0x007fcde38f56c0/lib/balanced/utils.rb:6 (lambda)>,
38
41
  "dispute"=>
39
- #<Proc:0x007fa7d30d3d38/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fcde38eff90/lib/balanced/utils.rb:6 (lambda)>,
40
43
  "events"=>
41
- #<Proc:0x007fa7d30d1bc8/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fcde38d6298/lib/balanced/utils.rb:6 (lambda)>,
42
45
  "order"=>
43
- #<Proc:0x007fa7d30d1128/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fcde38cf3d0/lib/balanced/utils.rb:6 (lambda)>,
44
47
  "refunds"=>
45
- #<Proc:0x007fa7d30cb070/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fcde38c5498/lib/balanced/utils.rb:6 (lambda)>,
46
49
  "source"=>
47
- #<Proc:0x007fa7d30c9338/lib/balanced/resources/resource.rb:60 (lambda)>}>
50
+ #<Proc:0x007fcde38bd900/lib/balanced/resources/resource.rb:56 (lambda)>}>
48
51
 
49
52
  % endif
@@ -2,9 +2,9 @@
2
2
  Balanced::Card.debit
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
5
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
6
6
 
7
- card = Balanced::Card.fetch('/cards/CC6iIaFL1QliTaYG47BArZAh')
7
+ card = Balanced::Card.fetch('/cards/CC7Lwi6mzKkqwXrIg5UY1BE9')
8
8
  card.debit(
9
9
  :amount => 5000,
10
10
  :appears_on_statement_as => 'Statement text',
@@ -12,38 +12,41 @@ card.debit(
12
12
  )
13
13
 
14
14
  % elif mode == 'response':
15
- #<Balanced::Debit:0x007fa7d31cb830
15
+ #<Balanced::Debit:0x007fcde111ef70
16
16
  @attributes=
17
17
  {"amount"=>5000,
18
18
  "appears_on_statement_as"=>"BAL*Statement text",
19
- "created_at"=>"2014-05-15T00:42:39.077752Z",
19
+ "created_at"=>"2014-12-17T21:25:34.550152Z",
20
20
  "currency"=>"USD",
21
21
  "description"=>"Some descriptive text for the debit in the dashboard",
22
22
  "failure_reason"=>nil,
23
23
  "failure_reason_code"=>nil,
24
- "href"=>"/debits/WD6mairBakAx5t8ETjMYFu7T",
25
- "id"=>"WD6mairBakAx5t8ETjMYFu7T",
24
+ "href"=>"/debits/WD7M75BRYlRsQTImIHFf8O9W",
25
+ "id"=>"WD7M75BRYlRsQTImIHFf8O9W",
26
26
  "links"=>
27
- {"customer"=>nil,
27
+ {"card_hold"=>"HL7M4ZNQjlJRZhhMJGPBVCUM",
28
+ "customer"=>nil,
28
29
  "dispute"=>nil,
29
30
  "order"=>nil,
30
- "source"=>"CC6iIaFL1QliTaYG47BArZAh"},
31
+ "source"=>"CC7Lwi6mzKkqwXrIg5UY1BE9"},
31
32
  "meta"=>{},
32
33
  "status"=>"succeeded",
33
- "transaction_number"=>"W755-582-8394",
34
- "updated_at"=>"2014-05-15T00:42:42.685055Z"},
34
+ "transaction_number"=>"WMWY-ZDJ-0RIZ",
35
+ "updated_at"=>"2014-12-17T21:25:35.221519Z"},
35
36
  @hyperlinks=
36
- {"customer"=>
37
- #<Proc:0x007fa7d31cacf0/lib/balanced/utils.rb:6 (lambda)>,
37
+ {"card_hold"=>
38
+ #<Proc:0x007fcde1115fb0/lib/balanced/resources/resource.rb:56 (lambda)>,
39
+ "customer"=>
40
+ #<Proc:0x007fcde1114610/lib/balanced/utils.rb:6 (lambda)>,
38
41
  "dispute"=>
39
- #<Proc:0x007fa7d31ca278/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fcde10fe158/lib/balanced/utils.rb:6 (lambda)>,
40
43
  "events"=>
41
- #<Proc:0x007fa7d31c8400/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fcde10f90b8/lib/balanced/utils.rb:6 (lambda)>,
42
45
  "order"=>
43
- #<Proc:0x007fa7d31c39c8/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fcde1107320/lib/balanced/utils.rb:6 (lambda)>,
44
47
  "refunds"=>
45
- #<Proc:0x007fa7d31c1a60/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fcde10e6d78/lib/balanced/utils.rb:6 (lambda)>,
46
49
  "source"=>
47
- #<Proc:0x007fa7d31c0070/lib/balanced/resources/resource.rb:60 (lambda)>}>
50
+ #<Proc:0x007fcde10ce458/lib/balanced/resources/resource.rb:56 (lambda)>}>
48
51
 
49
52
  % endif
@@ -3,9 +3,9 @@ Balanced::Card.unstore
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
- card = Balanced::Card.fetch('/cards/CC4gG6BE70pMOYKPBive9qoF')
8
+ card = Balanced::Card.fetch('/cards/CC73IyzxPUu2z89NH8GrJhLn')
9
9
  card.unstore
10
10
 
11
11
  % elif mode == 'response':
@@ -3,47 +3,50 @@ Balanced::CardHold.capture
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
- card_hold = Balanced::CardHold.fetch('/card_holds/HL363Kap0nkbuV050V9DHpjf')
8
+ card_hold = Balanced::CardHold.fetch('/card_holds/HL6RKKEl9zNhtZGgnZaElcwU')
9
9
  debit = card_hold.capture(
10
10
  :appears_on_statement_as => 'ShowsUpOnStmt',
11
11
  :description => 'Some descriptive text for the debit in the dashboard'
12
12
  )
13
13
 
14
14
  % elif mode == 'response':
15
- #<Balanced::Debit:0x007fa7d319ac30
15
+ #<Balanced::Debit:0x007fcde10339d0
16
16
  @attributes=
17
17
  {"amount"=>5000,
18
18
  "appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
19
- "created_at"=>"2014-05-15T00:39:50.951932Z",
19
+ "created_at"=>"2014-12-17T21:24:49.619850Z",
20
20
  "currency"=>"USD",
21
21
  "description"=>"Some descriptive text for the debit in the dashboard",
22
22
  "failure_reason"=>nil,
23
23
  "failure_reason_code"=>nil,
24
- "href"=>"/debits/WD3j4fH7OIZgWaAF3SMTTu0l",
25
- "id"=>"WD3j4fH7OIZgWaAF3SMTTu0l",
24
+ "href"=>"/debits/WD6XBI80Nwyl3IFdM5CktMwE",
25
+ "id"=>"WD6XBI80Nwyl3IFdM5CktMwE",
26
26
  "links"=>
27
- {"customer"=>nil,
27
+ {"card_hold"=>"HL6RKKEl9zNhtZGgnZaElcwU",
28
+ "customer"=>nil,
28
29
  "dispute"=>nil,
29
30
  "order"=>nil,
30
- "source"=>"CC35aRYQB8XnL0CxtKGFG7d3"},
31
+ "source"=>"CC6buB6OEtiIf7DMIKzpJ7k9"},
31
32
  "meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
32
33
  "status"=>"succeeded",
33
- "transaction_number"=>"W683-224-2501",
34
- "updated_at"=>"2014-05-15T00:40:04.899900Z"},
34
+ "transaction_number"=>"WCG4-HDE-UGM6",
35
+ "updated_at"=>"2014-12-17T21:24:50.054618Z"},
35
36
  @hyperlinks=
36
- {"customer"=>
37
- #<Proc:0x007fa7d319a0c8/lib/balanced/utils.rb:6 (lambda)>,
37
+ {"card_hold"=>
38
+ #<Proc:0x007fcde101a980/lib/balanced/resources/resource.rb:56 (lambda)>,
39
+ "customer"=>
40
+ #<Proc:0x007fcde1013360/lib/balanced/utils.rb:6 (lambda)>,
38
41
  "dispute"=>
39
- #<Proc:0x007fa7d31996f0/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fcde10109d0/lib/balanced/utils.rb:6 (lambda)>,
40
43
  "events"=>
41
- #<Proc:0x007fa7d3193868/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fcde08d07b0/lib/balanced/utils.rb:6 (lambda)>,
42
45
  "order"=>
43
- #<Proc:0x007fa7d3192dc8/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fcde08c0810/lib/balanced/utils.rb:6 (lambda)>,
44
47
  "refunds"=>
45
- #<Proc:0x007fa7d3190dc0/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fcde08a91b0/lib/balanced/utils.rb:6 (lambda)>,
46
49
  "source"=>
47
- #<Proc:0x007fa7d318f3d0/lib/balanced/resources/resource.rb:60 (lambda)>}>
50
+ #<Proc:0x007fcde089b1c8/lib/balanced/resources/resource.rb:56 (lambda)>}>
48
51
 
49
52
  % endif