balanced 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/CHANGELOG.md +5 -0
  4. data/lib/balanced/resources/credit.rb +2 -7
  5. data/lib/balanced/resources/debit.rb +2 -7
  6. data/lib/balanced/resources/order.rb +10 -9
  7. data/lib/balanced/version.rb +1 -1
  8. data/scenarios/api_key_create/ruby.mako +6 -6
  9. data/scenarios/api_key_delete/ruby.mako +2 -2
  10. data/scenarios/api_key_list/ruby.mako +10 -10
  11. data/scenarios/api_key_show/ruby.mako +6 -6
  12. data/scenarios/bank_account_associate_to_customer/definition.rb +1 -1
  13. data/scenarios/bank_account_associate_to_customer/request.rb +2 -2
  14. data/scenarios/bank_account_associate_to_customer/ruby.mako +15 -15
  15. data/scenarios/bank_account_create/ruby.mako +11 -11
  16. data/scenarios/bank_account_credit/ruby.mako +15 -15
  17. data/scenarios/bank_account_debit/ruby.mako +15 -15
  18. data/scenarios/bank_account_delete/ruby.mako +2 -2
  19. data/scenarios/bank_account_list/ruby.mako +22 -22
  20. data/scenarios/bank_account_show/ruby.mako +12 -12
  21. data/scenarios/bank_account_update/ruby.mako +12 -12
  22. data/scenarios/bank_account_verification_create/ruby.mako +9 -9
  23. data/scenarios/bank_account_verification_show/ruby.mako +9 -9
  24. data/scenarios/bank_account_verification_update/ruby.mako +9 -9
  25. data/scenarios/callback_create/ruby.mako +4 -4
  26. data/scenarios/callback_delete/ruby.mako +2 -2
  27. data/scenarios/callback_list/ruby.mako +4 -4
  28. data/scenarios/callback_show/ruby.mako +5 -5
  29. data/scenarios/card_associate_to_customer/definition.rb +1 -1
  30. data/scenarios/card_associate_to_customer/request.rb +1 -1
  31. data/scenarios/card_associate_to_customer/ruby.mako +13 -14
  32. data/scenarios/card_create/ruby.mako +9 -9
  33. data/scenarios/card_create_dispute/definition.rb +1 -0
  34. data/scenarios/card_create_dispute/request.rb +4 -0
  35. data/scenarios/card_create_dispute/ruby.mako +53 -0
  36. data/scenarios/card_debit/ruby.mako +16 -16
  37. data/scenarios/card_debit_dispute/definition.rb +1 -0
  38. data/scenarios/card_debit_dispute/request.rb +5 -0
  39. data/scenarios/card_debit_dispute/ruby.mako +49 -0
  40. data/scenarios/card_delete/ruby.mako +2 -2
  41. data/scenarios/card_hold_capture/ruby.mako +16 -16
  42. data/scenarios/card_hold_create/ruby.mako +14 -14
  43. data/scenarios/card_hold_list/ruby.mako +25 -25
  44. data/scenarios/card_hold_show/ruby.mako +14 -14
  45. data/scenarios/card_hold_update/ruby.mako +14 -14
  46. data/scenarios/card_hold_void/definition.rb +1 -1
  47. data/scenarios/card_hold_void/request.rb +1 -1
  48. data/scenarios/card_hold_void/ruby.mako +17 -17
  49. data/scenarios/card_list/ruby.mako +18 -18
  50. data/scenarios/card_show/ruby.mako +10 -10
  51. data/scenarios/card_update/ruby.mako +10 -10
  52. data/scenarios/credit_list/ruby.mako +14 -14
  53. data/scenarios/credit_list_bank_account/ruby.mako +2 -2
  54. data/scenarios/credit_show/ruby.mako +15 -15
  55. data/scenarios/credit_update/ruby.mako +15 -15
  56. data/scenarios/customer_create/ruby.mako +18 -18
  57. data/scenarios/customer_delete/ruby.mako +1 -1
  58. data/scenarios/customer_list/ruby.mako +35 -35
  59. data/scenarios/customer_show/ruby.mako +19 -19
  60. data/scenarios/customer_update/ruby.mako +19 -19
  61. data/scenarios/debit_dispute_show/definition.rb +1 -0
  62. data/scenarios/debit_dispute_show/request.rb +3 -0
  63. data/scenarios/debit_dispute_show/ruby.mako +31 -0
  64. data/scenarios/debit_list/ruby.mako +29 -29
  65. data/scenarios/debit_show/ruby.mako +16 -16
  66. data/scenarios/debit_update/ruby.mako +16 -16
  67. data/scenarios/dispute_list/definition.rb +1 -0
  68. data/scenarios/dispute_list/request.rb +2 -0
  69. data/scenarios/dispute_list/ruby.mako +29 -0
  70. data/scenarios/dispute_show/definition.rb +1 -0
  71. data/scenarios/dispute_show/request.rb +2 -0
  72. data/scenarios/dispute_show/ruby.mako +31 -0
  73. data/scenarios/event_list/ruby.mako +55 -55
  74. data/scenarios/event_show/ruby.mako +35 -40
  75. data/scenarios/order_create/ruby.mako +14 -14
  76. data/scenarios/order_list/ruby.mako +13 -13
  77. data/scenarios/order_show/ruby.mako +14 -14
  78. data/scenarios/order_update/ruby.mako +14 -14
  79. data/scenarios/refund_create/ruby.mako +13 -13
  80. data/scenarios/refund_list/ruby.mako +12 -12
  81. data/scenarios/refund_show/ruby.mako +13 -13
  82. data/scenarios/refund_update/ruby.mako +13 -13
  83. data/scenarios/render_mako.rb +15 -3
  84. data/scenarios/reversal_create/ruby.mako +12 -12
  85. data/scenarios/reversal_list/ruby.mako +11 -11
  86. data/scenarios/reversal_show/ruby.mako +12 -12
  87. data/scenarios/reversal_update/ruby.mako +12 -12
  88. data/spec/balanced/resources/credit_spec.rb +26 -5
  89. data/spec/balanced/resources/debit_spec.rb +7 -2
  90. data/spec/balanced/resources/order_spec.rb +25 -3
  91. metadata +17 -3
  92. data/scenario.cache +0 -619
@@ -3,7 +3,7 @@ Balanced::Card.new
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
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:0x007fa4e49bacb8
16
+ #<Balanced::Card:0x007fa93ea04be8
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -26,7 +26,7 @@ card = Balanced::Card.new(
26
26
  "avs_result"=>nil,
27
27
  "avs_street_match"=>nil,
28
28
  "brand"=>"MasterCard",
29
- "created_at"=>"2014-03-06T19:23:25.159503Z",
29
+ "created_at"=>"2014-04-25T20:09:57.984444Z",
30
30
  "cvv"=>"xxx",
31
31
  "cvv_match"=>"yes",
32
32
  "cvv_result"=>"Match",
@@ -34,20 +34,20 @@ card = Balanced::Card.new(
34
34
  "expiration_year"=>2020,
35
35
  "fingerprint"=>
36
36
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
37
- "href"=>"/cards/CC68IoCVpoFlkugB7xt52p8C",
38
- "id"=>"CC68IoCVpoFlkugB7xt52p8C",
37
+ "href"=>"/cards/CC4tvKLTKXcBJAgkGvPEW58N",
38
+ "id"=>"CC4tvKLTKXcBJAgkGvPEW58N",
39
39
  "is_verified"=>true,
40
40
  "links"=>{"customer"=>nil},
41
41
  "meta"=>{},
42
42
  "name"=>nil,
43
43
  "number"=>"xxxxxxxxxxxx5100",
44
- "updated_at"=>"2014-03-06T19:23:25.159506Z"},
44
+ "updated_at"=>"2014-04-25T20:09:57.984446Z"},
45
45
  @hyperlinks=
46
46
  {"card_holds"=>
47
- #<Proc:0x007fa4e49b8198/lib/balanced/utils.rb:6 (lambda)>,
47
+ #<Proc:0x007fa93e9fe568/lib/balanced/utils.rb:6 (lambda)>,
48
48
  "customer"=>
49
- #<Proc:0x007fa4e49b3af8/lib/balanced/utils.rb:6 (lambda)>,
49
+ #<Proc:0x007fa93e9fd500/lib/balanced/utils.rb:6 (lambda)>,
50
50
  "debits"=>
51
- #<Proc:0x007fa4e49b0998/lib/balanced/utils.rb:6 (lambda)>}>
51
+ #<Proc:0x007fa93e9cf678/lib/balanced/utils.rb:6 (lambda)>}>
52
52
 
53
53
  % endif
@@ -0,0 +1 @@
1
+ Balanced::Card.new
@@ -0,0 +1,4 @@
1
+ <%= boiler_plate %>
2
+ card = Balanced::Card.new(
3
+ <%= params_to_hash.call(payload).indent(2) %>
4
+ ).save
@@ -0,0 +1,53 @@
1
+ % if mode == 'definition':
2
+ Balanced::Card.new
3
+
4
+ % elif mode == 'request':
5
+ require 'balanced'
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
+
8
+ card = Balanced::Card.new(
9
+ :cvv => '123',
10
+ :expiration_month => '12',
11
+ :expiration_year => '3000',
12
+ :number => '6500000000000002'
13
+ ).save
14
+
15
+ % elif mode == 'response':
16
+ #<Balanced::Card:0x007fa93e98c9e0
17
+ @attributes=
18
+ {"address"=>
19
+ {"city"=>nil,
20
+ "country_code"=>nil,
21
+ "line1"=>nil,
22
+ "line2"=>nil,
23
+ "postal_code"=>nil,
24
+ "state"=>nil},
25
+ "avs_postal_match"=>nil,
26
+ "avs_result"=>nil,
27
+ "avs_street_match"=>nil,
28
+ "brand"=>"Discover",
29
+ "created_at"=>"2014-04-25T20:10:24.900273Z",
30
+ "cvv"=>"xxx",
31
+ "cvv_match"=>"yes",
32
+ "cvv_result"=>"Match",
33
+ "expiration_month"=>12,
34
+ "expiration_year"=>3000,
35
+ "fingerprint"=>
36
+ "3c667a62653e187f29b5781eeb0703f26e99558080de0c0f9490b5f9c4ac2871",
37
+ "href"=>"/cards/CC4XMSQg2OY6rrcrkeEGtLcZ",
38
+ "id"=>"CC4XMSQg2OY6rrcrkeEGtLcZ",
39
+ "is_verified"=>true,
40
+ "links"=>{"customer"=>nil},
41
+ "meta"=>{},
42
+ "name"=>nil,
43
+ "number"=>"xxxxxxxxxxxx0002",
44
+ "updated_at"=>"2014-04-25T20:10:24.900275Z"},
45
+ @hyperlinks=
46
+ {"card_holds"=>
47
+ #<Proc:0x007fa93e985fa0/lib/balanced/utils.rb:6 (lambda)>,
48
+ "customer"=>
49
+ #<Proc:0x007fa93e9852a8/lib/balanced/utils.rb:6 (lambda)>,
50
+ "debits"=>
51
+ #<Proc:0x007fa93e97eae8/lib/balanced/utils.rb:6 (lambda)>}>
52
+
53
+ % endif
@@ -2,9 +2,9 @@
2
2
  Balanced::Card.debit
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
6
 
7
- card = Balanced::Card.fetch('/cards/CC68IoCVpoFlkugB7xt52p8C')
7
+ card = Balanced::Card.fetch('/cards/CC4tvKLTKXcBJAgkGvPEW58N')
8
8
  card.debit(
9
9
  :amount => 5000,
10
10
  :appears_on_statement_as => 'Statement text',
@@ -12,38 +12,38 @@ card.debit(
12
12
  )
13
13
 
14
14
  % elif mode == 'response':
15
- #<Balanced::Debit:0x007fa4e2928cc0
15
+ #<Balanced::Debit:0x007fa93e9568e0
16
16
  @attributes=
17
17
  {"amount"=>5000,
18
18
  "appears_on_statement_as"=>"BAL*Statement text",
19
- "created_at"=>"2014-03-06T19:23:44.148512Z",
19
+ "created_at"=>"2014-04-25T20:10:20.485474Z",
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/WD6BKYhbRzlRhfKSE1DcpqS5",
25
- "id"=>"WD6BKYhbRzlRhfKSE1DcpqS5",
24
+ "href"=>"/debits/WD4SOTNKiZbBFrmMk6mfszIl",
25
+ "id"=>"WD4SOTNKiZbBFrmMk6mfszIl",
26
26
  "links"=>
27
- {"customer"=>"CU64R7DS6DwuXYVg9RTskFK8",
27
+ {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
28
28
  "dispute"=>nil,
29
29
  "order"=>nil,
30
- "source"=>"CC68IoCVpoFlkugB7xt52p8C"},
30
+ "source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
31
31
  "meta"=>{},
32
32
  "status"=>"succeeded",
33
- "transaction_number"=>"W274-713-3734",
34
- "updated_at"=>"2014-03-06T19:23:45.554127Z"},
33
+ "transaction_number"=>"W060-183-8881",
34
+ "updated_at"=>"2014-04-25T20:10:21.476140Z"},
35
35
  @hyperlinks=
36
36
  {"customer"=>
37
- #<Proc:0x007fa4e2929e68/lib/balanced/resources/resource.rb:60 (lambda)>,
37
+ #<Proc:0x007fa93e954c48/lib/balanced/resources/resource.rb:60 (lambda)>,
38
38
  "dispute"=>
39
- #<Proc:0x007fa4e29292d8/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fa93e954270/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "events"=>
41
- #<Proc:0x007fa4e40a5e70/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fa93e94e348/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "order"=>
43
- #<Proc:0x007fa4e48467b0/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fa93e94d970/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "refunds"=>
45
- #<Proc:0x007fa4e3039758/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007fa93e9477c8/lib/balanced/utils.rb:6 (lambda)>,
46
46
  "source"=>
47
- #<Proc:0x007fa4e3049b80/lib/balanced/resources/resource.rb:60 (lambda)>}>
47
+ #<Proc:0x007fa93e9456a8/lib/balanced/resources/resource.rb:60 (lambda)>}>
48
48
 
49
49
  % endif
@@ -0,0 +1 @@
1
+ Balanced::Card.debit
@@ -0,0 +1,5 @@
1
+ <%= boiler_plate %>
2
+ card = Balanced::Card.fetch('<%= request['card_href'] %>')
3
+ card.debit(
4
+ <%= params_to_hash.call(payload).indent(2) %>
5
+ )
@@ -0,0 +1,49 @@
1
+ % if mode == 'definition':
2
+ Balanced::Card.debit
3
+ % elif mode == 'request':
4
+ require 'balanced'
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+
7
+ card = Balanced::Card.fetch('/cards/CC4XMSQg2OY6rrcrkeEGtLcZ')
8
+ card.debit(
9
+ :amount => 5000,
10
+ :appears_on_statement_as => 'Statement text',
11
+ :description => 'Some descriptive text for the debit in the dashboard'
12
+ )
13
+
14
+ % elif mode == 'response':
15
+ #<Balanced::Debit:0x007fa93e856df0
16
+ @attributes=
17
+ {"amount"=>5000,
18
+ "appears_on_statement_as"=>"BAL*Statement text",
19
+ "created_at"=>"2014-04-25T20:10:25.648099Z",
20
+ "currency"=>"USD",
21
+ "description"=>"Some descriptive text for the debit in the dashboard",
22
+ "failure_reason"=>nil,
23
+ "failure_reason_code"=>nil,
24
+ "href"=>"/debits/WD4YCKAyFrQBFYuFCUCRynOx",
25
+ "id"=>"WD4YCKAyFrQBFYuFCUCRynOx",
26
+ "links"=>
27
+ {"customer"=>nil,
28
+ "dispute"=>nil,
29
+ "order"=>nil,
30
+ "source"=>"CC4XMSQg2OY6rrcrkeEGtLcZ"},
31
+ "meta"=>{},
32
+ "status"=>"succeeded",
33
+ "transaction_number"=>"W630-477-8252",
34
+ "updated_at"=>"2014-04-25T20:10:26.775361Z"},
35
+ @hyperlinks=
36
+ {"customer"=>
37
+ #<Proc:0x007fa93e856198/lib/balanced/utils.rb:6 (lambda)>,
38
+ "dispute"=>
39
+ #<Proc:0x007fa93e8557e8/lib/balanced/utils.rb:6 (lambda)>,
40
+ "events"=>
41
+ #<Proc:0x007fa93e84f8e8/lib/balanced/utils.rb:6 (lambda)>,
42
+ "order"=>
43
+ #<Proc:0x007fa93e84ef10/lib/balanced/utils.rb:6 (lambda)>,
44
+ "refunds"=>
45
+ #<Proc:0x007fa93e84d048/lib/balanced/utils.rb:6 (lambda)>,
46
+ "source"=>
47
+ #<Proc:0x007fa93e847670/lib/balanced/resources/resource.rb:60 (lambda)>}>
48
+
49
+ % endif
@@ -3,9 +3,9 @@ Balanced::Card.unstore
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
- card = Balanced::Card.fetch('/cards/CC5Buki6e4Kg4bDVZ3OSfQ8O')
8
+ card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
9
9
  card.unstore
10
10
 
11
11
  % elif mode == 'response':
@@ -3,47 +3,47 @@ Balanced::CardHold.capture
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
- card_hold = Balanced::CardHold.fetch('/card_holds/HL5wAfv8JaMsEn9idXrLZZZT')
8
+ card_hold = Balanced::CardHold.fetch('/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl')
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:0x007fa4e30d8150
15
+ #<Balanced::Debit:0x007fa93e819d38
16
16
  @attributes=
17
17
  {"amount"=>5000,
18
18
  "appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
19
- "created_at"=>"2014-03-06T19:22:49.584629Z",
19
+ "created_at"=>"2014-04-25T20:09:46.854710Z",
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/WD5Co9XwRZJg1QtvC5QeekhX",
25
- "id"=>"WD5Co9XwRZJg1QtvC5QeekhX",
24
+ "href"=>"/debits/WD4gZDOJ1DB443FYcbwNN5EV",
25
+ "id"=>"WD4gZDOJ1DB443FYcbwNN5EV",
26
26
  "links"=>
27
- {"customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
27
+ {"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj",
28
28
  "dispute"=>nil,
29
29
  "order"=>nil,
30
- "source"=>"CC5nCSU0yFp3qxR4p6UZST7y"},
30
+ "source"=>"CC4auQXiAWMBxJcEUIMYeZFj"},
31
31
  "meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
32
32
  "status"=>"succeeded",
33
- "transaction_number"=>"W493-697-4873",
34
- "updated_at"=>"2014-03-06T19:22:50.608819Z"},
33
+ "transaction_number"=>"W815-967-5010",
34
+ "updated_at"=>"2014-04-25T20:09:47.351487Z"},
35
35
  @hyperlinks=
36
36
  {"customer"=>
37
- #<Proc:0x007fa4e30f20c8/lib/balanced/resources/resource.rb:60 (lambda)>,
37
+ #<Proc:0x007fa93e8180c8/lib/balanced/resources/resource.rb:60 (lambda)>,
38
38
  "dispute"=>
39
- #<Proc:0x007fa4e31024c8/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fa93e8270c8/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "events"=>
41
- #<Proc:0x007fa4e310a830/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fa93e825070/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "order"=>
43
- #<Proc:0x007fa4e3112f80/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fa93e8245d0/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "refunds"=>
45
- #<Proc:0x007fa4e31201d0/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007fa93e810e90/lib/balanced/utils.rb:6 (lambda)>,
46
46
  "source"=>
47
- #<Proc:0x007fa4e3131ea8/lib/balanced/resources/resource.rb:60 (lambda)>}>
47
+ #<Proc:0x007fa93e80aa90/lib/balanced/resources/resource.rb:60 (lambda)>}>
48
48
 
49
49
  % endif
@@ -2,39 +2,39 @@
2
2
  Balanced::Card.hold
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
6
 
7
- card = Balanced::Card.fetch('/cards/CC5nCSU0yFp3qxR4p6UZST7y')
7
+ card = Balanced::Card.fetch('/cards/CC4auQXiAWMBxJcEUIMYeZFj')
8
8
  card.hold(
9
9
  :amount => 5000,
10
10
  :description => 'Some descriptive text for the debit in the dashboard'
11
11
  )
12
12
  % elif mode == 'response':
13
- #<Balanced::CardHold:0x007fa4e489f1a8
13
+ #<Balanced::CardHold:0x007fa93b7e5ea0
14
14
  @attributes=
15
15
  {"amount"=>5000,
16
- "created_at"=>"2014-03-06T19:22:51.758438Z",
16
+ "created_at"=>"2014-04-25T20:09:48.990540Z",
17
17
  "currency"=>"USD",
18
18
  "description"=>"Some descriptive text for the debit in the dashboard",
19
- "expires_at"=>"2014-03-13T19:22:52.154430Z",
19
+ "expires_at"=>"2014-05-02T20:09:49.096484Z",
20
20
  "failure_reason"=>nil,
21
21
  "failure_reason_code"=>nil,
22
- "href"=>"/card_holds/HL5Ig892KbmJyDqED5fYsJ8m",
23
- "id"=>"HL5Ig892KbmJyDqED5fYsJ8m",
24
- "links"=>{"card"=>"CC5nCSU0yFp3qxR4p6UZST7y", "debit"=>nil},
22
+ "href"=>"/card_holds/HL4joUazeM3BJE6emmv2Q8EF",
23
+ "id"=>"HL4joUazeM3BJE6emmv2Q8EF",
24
+ "links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
25
25
  "meta"=>{},
26
26
  "status"=>"succeeded",
27
- "transaction_number"=>"HL671-938-5651",
28
- "updated_at"=>"2014-03-06T19:22:52.362482Z",
27
+ "transaction_number"=>"HL161-849-8610",
28
+ "updated_at"=>"2014-04-25T20:09:49.228091Z",
29
29
  "voided_at"=>nil},
30
30
  @hyperlinks=
31
31
  {"card"=>
32
- #<Proc:0x007fa4e48af148/lib/balanced/resources/resource.rb:60 (lambda)>,
32
+ #<Proc:0x007fa93b7e41e0/lib/balanced/resources/resource.rb:60 (lambda)>,
33
33
  "debit"=>
34
- #<Proc:0x007fa4e48bf048/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa93b7df898/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "debits"=>
36
- #<Proc:0x007fa4e31b2f58/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa93b7dd8e0/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "events"=>
38
- #<Proc:0x007fa4e31c80b0/lib/balanced/utils.rb:6 (lambda)>}>
38
+ #<Proc:0x007fa93b7d78a0/lib/balanced/utils.rb:6 (lambda)>}>
39
39
 
40
40
  % endif
@@ -3,62 +3,62 @@ Balanced::CardHold.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
8
  holds = Balanced::CardHold.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::CardHold:0x007fa4e48dedf8
10
+ [#<Balanced::CardHold:0x007fa93b7bd4f0
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
- "created_at"=>"2014-03-06T19:22:44.421804Z",
13
+ "created_at"=>"2014-04-25T20:09:41.712497Z",
14
14
  "currency"=>"USD",
15
15
  "description"=>"Some descriptive text for the debit in the dashboard",
16
- "expires_at"=>"2014-03-13T19:22:44.661981Z",
16
+ "expires_at"=>"2014-05-02T20:09:41.878825Z",
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/card_holds/HL5wAfv8JaMsEn9idXrLZZZT",
20
- "id"=>"HL5wAfv8JaMsEn9idXrLZZZT",
21
- "links"=>{"card"=>"CC5nCSU0yFp3qxR4p6UZST7y", "debit"=>nil},
19
+ "href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
20
+ "id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
21
+ "links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
22
22
  "meta"=>{},
23
23
  "status"=>"succeeded",
24
- "transaction_number"=>"HL116-606-6128",
25
- "updated_at"=>"2014-03-06T19:22:44.816617Z",
24
+ "transaction_number"=>"HL244-046-8353",
25
+ "updated_at"=>"2014-04-25T20:09:42.023214Z",
26
26
  "voided_at"=>nil},
27
27
  @hyperlinks=
28
28
  {"card"=>
29
- #<Proc:0x007fa4e48d04d8/lib/balanced/resources/resource.rb:60 (lambda)>,
29
+ #<Proc:0x007fa93b7b79b0/lib/balanced/resources/resource.rb:60 (lambda)>,
30
30
  "debit"=>
31
- #<Proc:0x007fa4e48d2e68/lib/balanced/utils.rb:6 (lambda)>,
31
+ #<Proc:0x007fa93b7b6f60/lib/balanced/utils.rb:6 (lambda)>,
32
32
  "debits"=>
33
- #<Proc:0x007fa4e48d12c0/lib/balanced/utils.rb:6 (lambda)>,
33
+ #<Proc:0x007fa93b7b4df0/lib/balanced/utils.rb:6 (lambda)>,
34
34
  "events"=>
35
- #<Proc:0x007fa4e48e6d00/lib/balanced/utils.rb:6 (lambda)>}>,
36
- #<Balanced::CardHold:0x007fa4e48e6cb0
35
+ #<Proc:0x007fa93b7aefb8/lib/balanced/utils.rb:6 (lambda)>}>,
36
+ #<Balanced::CardHold:0x007fa93b7aef68
37
37
  @attributes=
38
38
  {"amount"=>10000000,
39
- "created_at"=>"2014-03-06T19:22:16.137074Z",
39
+ "created_at"=>"2014-04-25T20:09:10.201844Z",
40
40
  "currency"=>"USD",
41
41
  "description"=>nil,
42
- "expires_at"=>"2014-03-13T19:22:16.821934Z",
42
+ "expires_at"=>"2014-05-02T20:09:10.501460Z",
43
43
  "failure_reason"=>nil,
44
44
  "failure_reason_code"=>nil,
45
- "href"=>"/card_holds/HL50LRASJbs8Kbcwqpu2TFdD",
46
- "id"=>"HL50LRASJbs8Kbcwqpu2TFdD",
45
+ "href"=>"/card_holds/HL3BLQCYcUDdnWRrsy01Yqhf",
46
+ "id"=>"HL3BLQCYcUDdnWRrsy01Yqhf",
47
47
  "links"=>
48
- {"card"=>"CC4SdMF0rukpL3XdVvpqoC4m", "debit"=>"WD50VxLKoVBNdkbovF4D56xX"},
48
+ {"card"=>"CC3B0K4gs5gKB5e1wawj8Rgx", "debit"=>"WD3BMUJeA9K2L4m7jqc7w9db"},
49
49
  "meta"=>{},
50
50
  "status"=>"succeeded",
51
- "transaction_number"=>"HL974-747-7939",
52
- "updated_at"=>"2014-03-06T19:22:17.708358Z",
51
+ "transaction_number"=>"HL048-561-7017",
52
+ "updated_at"=>"2014-04-25T20:09:10.970666Z",
53
53
  "voided_at"=>nil},
54
54
  @hyperlinks=
55
55
  {"card"=>
56
- #<Proc:0x007fa4e48d4c90/lib/balanced/resources/resource.rb:60 (lambda)>,
56
+ #<Proc:0x007fa93b7ad2f8/lib/balanced/resources/resource.rb:60 (lambda)>,
57
57
  "debit"=>
58
- #<Proc:0x007fa4e48d53c0/lib/balanced/resources/resource.rb:60 (lambda)>,
58
+ #<Proc:0x007fa93b7a7948/lib/balanced/resources/resource.rb:60 (lambda)>,
59
59
  "debits"=>
60
- #<Proc:0x007fa4e48edf60/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fa93b7a5788/lib/balanced/utils.rb:6 (lambda)>,
61
61
  "events"=>
62
- #<Proc:0x007fa4e48f7510/lib/balanced/utils.rb:6 (lambda)>}>]
62
+ #<Proc:0x007fa93b79f7e8/lib/balanced/utils.rb:6 (lambda)>}>]
63
63
 
64
64
  % endif