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
@@ -0,0 +1,31 @@
1
+ % if mode == 'definition':
2
+ Balanced::Debit.dispute
3
+ % elif mode == 'request':
4
+ require 'balanced'
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+
7
+ debit = Balanced::Debit.fetch('/debits/WD4YCKAyFrQBFYuFCUCRynOx')
8
+ dispute = debit.dispute
9
+
10
+ % elif mode == 'response':
11
+ #<Balanced::Dispute:0x007fa93ebf4d68
12
+ @attributes=
13
+ {"amount"=>5000,
14
+ "created_at"=>"2014-04-25T20:18:33.022136Z",
15
+ "currency"=>"USD",
16
+ "href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
17
+ "id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
18
+ "initiated_at"=>"2014-04-25T20:10:26.554057Z",
19
+ "links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
20
+ "meta"=>{},
21
+ "reason"=>"fraud",
22
+ "respond_by"=>"2014-05-25T20:10:26.554061Z",
23
+ "status"=>"pending",
24
+ "updated_at"=>"2014-04-25T20:18:33.022139Z"},
25
+ @hyperlinks=
26
+ {"events"=>
27
+ #<Proc:0x007fa93ebfecc8/lib/balanced/utils.rb:6 (lambda)>,
28
+ "transaction"=>
29
+ #<Proc:0x007fa93ebfd328/lib/balanced/resources/resource.rb:60 (lambda)>}>
30
+
31
+ % endif
@@ -3,75 +3,75 @@ Balanced::Debit.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
  debits = Balanced::Debit.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Debit:0x007fa4e315f920
10
+ [#<Balanced::Debit:0x007fa93e9f7420
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
13
  "appears_on_statement_as"=>"BAL*Statement text",
14
- "created_at"=>"2014-03-06T19:23:01.594300Z",
14
+ "created_at"=>"2014-04-25T20:09:59.895549Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>"Some descriptive text for the debit in the dashboard",
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
20
- "id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
19
+ "href"=>"/debits/WD4vEUJj36IpPHTnLKMYzHgh",
20
+ "id"=>"WD4vEUJj36IpPHTnLKMYzHgh",
21
21
  "links"=>
22
- {"customer"=>nil,
22
+ {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
23
23
  "dispute"=>nil,
24
24
  "order"=>nil,
25
- "source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
25
+ "source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
26
26
  "meta"=>{},
27
27
  "status"=>"succeeded",
28
- "transaction_number"=>"W986-715-3969",
29
- "updated_at"=>"2014-03-06T19:23:02.987552Z"},
28
+ "transaction_number"=>"W296-328-8320",
29
+ "updated_at"=>"2014-04-25T20:10:00.865462Z"},
30
30
  @hyperlinks=
31
31
  {"customer"=>
32
- #<Proc:0x007fa4e315a498/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa93e9f58a0/lib/balanced/resources/resource.rb:60 (lambda)>,
33
33
  "dispute"=>
34
- #<Proc:0x007fa4e3151b90/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa93e9f4f18/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "events"=>
36
- #<Proc:0x007fa4e3132c68/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa93ec1ed98/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "order"=>
38
- #<Proc:0x007fa4e3129ed8/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa93ec1e398/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "refunds"=>
40
- #<Proc:0x007fa4e311b928/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa93ec17bb0/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "source"=>
42
- #<Proc:0x007fa4e3109200/lib/balanced/resources/resource.rb:60 (lambda)>}>,
43
- #<Balanced::Debit:0x007fa4e3108f08
42
+ #<Proc:0x007fa93ec16080/lib/balanced/resources/resource.rb:60 (lambda)>}>,
43
+ #<Balanced::Debit:0x007fa93ec15fb8
44
44
  @attributes=
45
45
  {"amount"=>5000,
46
46
  "appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
47
- "created_at"=>"2014-03-06T19:22:49.584629Z",
47
+ "created_at"=>"2014-04-25T20:09:46.854710Z",
48
48
  "currency"=>"USD",
49
49
  "description"=>"Some descriptive text for the debit in the dashboard",
50
50
  "failure_reason"=>nil,
51
51
  "failure_reason_code"=>nil,
52
- "href"=>"/debits/WD5Co9XwRZJg1QtvC5QeekhX",
53
- "id"=>"WD5Co9XwRZJg1QtvC5QeekhX",
52
+ "href"=>"/debits/WD4gZDOJ1DB443FYcbwNN5EV",
53
+ "id"=>"WD4gZDOJ1DB443FYcbwNN5EV",
54
54
  "links"=>
55
- {"customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
55
+ {"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj",
56
56
  "dispute"=>nil,
57
57
  "order"=>nil,
58
- "source"=>"CC5nCSU0yFp3qxR4p6UZST7y"},
58
+ "source"=>"CC4auQXiAWMBxJcEUIMYeZFj"},
59
59
  "meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
60
60
  "status"=>"succeeded",
61
- "transaction_number"=>"W493-697-4873",
62
- "updated_at"=>"2014-03-06T19:22:50.608819Z"},
61
+ "transaction_number"=>"W815-967-5010",
62
+ "updated_at"=>"2014-04-25T20:09:47.351487Z"},
63
63
  @hyperlinks=
64
64
  {"customer"=>
65
- #<Proc:0x007fa4e30fb510/lib/balanced/resources/resource.rb:60 (lambda)>,
65
+ #<Proc:0x007fa93ec14348/lib/balanced/resources/resource.rb:60 (lambda)>,
66
66
  "dispute"=>
67
- #<Proc:0x007fa4e30e8708/lib/balanced/utils.rb:6 (lambda)>,
67
+ #<Proc:0x007fa93ec0f708/lib/balanced/utils.rb:6 (lambda)>,
68
68
  "events"=>
69
- #<Proc:0x007fa4e30dbaf8/lib/balanced/utils.rb:6 (lambda)>,
69
+ #<Proc:0x007fa93ec077b0/lib/balanced/utils.rb:6 (lambda)>,
70
70
  "order"=>
71
- #<Proc:0x007fa4e30d9988/lib/balanced/utils.rb:6 (lambda)>,
71
+ #<Proc:0x007fa93ec06dd8/lib/balanced/utils.rb:6 (lambda)>,
72
72
  "refunds"=>
73
- #<Proc:0x007fa4e30ca5a0/lib/balanced/utils.rb:6 (lambda)>,
73
+ #<Proc:0x007fa93ec04f10/lib/balanced/utils.rb:6 (lambda)>,
74
74
  "source"=>
75
- #<Proc:0x007fa4e30ba9e8/lib/balanced/resources/resource.rb:60 (lambda)>}>]
75
+ #<Proc:0x007fa93ebdf558/lib/balanced/resources/resource.rb:60 (lambda)>}>]
76
76
 
77
77
  % endif
@@ -3,43 +3,43 @@ Balanced::Debit.fetch
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
- debit = Balanced::Debit.fetch('/debits/WD5PTwr2bwJLIyJio1pEpYBr')
8
+ debit = Balanced::Debit.fetch('/debits/WD4vEUJj36IpPHTnLKMYzHgh')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Debit:0x007fa4e4a580d0
11
+ #<Balanced::Debit:0x007fa93eb35288
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
14
  "appears_on_statement_as"=>"BAL*Statement text",
15
- "created_at"=>"2014-03-06T19:23:01.594300Z",
15
+ "created_at"=>"2014-04-25T20:09:59.895549Z",
16
16
  "currency"=>"USD",
17
17
  "description"=>"Some descriptive text for the debit in the dashboard",
18
18
  "failure_reason"=>nil,
19
19
  "failure_reason_code"=>nil,
20
- "href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
21
- "id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
20
+ "href"=>"/debits/WD4vEUJj36IpPHTnLKMYzHgh",
21
+ "id"=>"WD4vEUJj36IpPHTnLKMYzHgh",
22
22
  "links"=>
23
- {"customer"=>nil,
23
+ {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
24
24
  "dispute"=>nil,
25
25
  "order"=>nil,
26
- "source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
26
+ "source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
27
27
  "meta"=>{},
28
28
  "status"=>"succeeded",
29
- "transaction_number"=>"W986-715-3969",
30
- "updated_at"=>"2014-03-06T19:23:02.987552Z"},
29
+ "transaction_number"=>"W296-328-8320",
30
+ "updated_at"=>"2014-04-25T20:10:00.865462Z"},
31
31
  @hyperlinks=
32
32
  {"customer"=>
33
- #<Proc:0x007fa4e4a5b780/lib/balanced/utils.rb:6 (lambda)>,
33
+ #<Proc:0x007fa93eb276b0/lib/balanced/resources/resource.rb:60 (lambda)>,
34
34
  "dispute"=>
35
- #<Proc:0x007fa4e4a5ab28/lib/balanced/utils.rb:6 (lambda)>,
35
+ #<Proc:0x007fa93eb26d28/lib/balanced/utils.rb:6 (lambda)>,
36
36
  "events"=>
37
- #<Proc:0x007fa4e4a58288/lib/balanced/utils.rb:6 (lambda)>,
37
+ #<Proc:0x007fa93eb24e88/lib/balanced/utils.rb:6 (lambda)>,
38
38
  "order"=>
39
- #<Proc:0x007fa4e4a53c38/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fa93eb244b0/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "refunds"=>
41
- #<Proc:0x007fa4e4a51460/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fa93eb1c0a8/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "source"=>
43
- #<Proc:0x007fa4e4a4a660/lib/balanced/resources/resource.rb:60 (lambda)>}>
43
+ #<Proc:0x007fa93eb07ab8/lib/balanced/resources/resource.rb:60 (lambda)>}>
44
44
 
45
45
  % endif
@@ -3,9 +3,9 @@ Balanced::Debit.save
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
- debit = Balanced::Debit.fetch('/debits/WD5PTwr2bwJLIyJio1pEpYBr')
8
+ debit = Balanced::Debit.fetch('/debits/WD4vEUJj36IpPHTnLKMYzHgh')
9
9
  debit.description = 'New description for debit'
10
10
  debit.meta = {
11
11
  'anykey' => 'valuegoeshere',
@@ -14,38 +14,38 @@ debit.meta = {
14
14
  debit.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::Debit:0x007fa4e41c0418
17
+ #<Balanced::Debit:0x007fa93eade398
18
18
  @attributes=
19
19
  {"amount"=>5000,
20
20
  "appears_on_statement_as"=>"BAL*Statement text",
21
- "created_at"=>"2014-03-06T19:23:01.594300Z",
21
+ "created_at"=>"2014-04-25T20:09:59.895549Z",
22
22
  "currency"=>"USD",
23
23
  "description"=>"New description for debit",
24
24
  "failure_reason"=>nil,
25
25
  "failure_reason_code"=>nil,
26
- "href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
27
- "id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
26
+ "href"=>"/debits/WD4vEUJj36IpPHTnLKMYzHgh",
27
+ "id"=>"WD4vEUJj36IpPHTnLKMYzHgh",
28
28
  "links"=>
29
- {"customer"=>nil,
29
+ {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
30
30
  "dispute"=>nil,
31
31
  "order"=>nil,
32
- "source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
32
+ "source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
33
33
  "meta"=>{"anykey"=>"valuegoeshere", "facebook.id"=>"1234567890"},
34
34
  "status"=>"succeeded",
35
- "transaction_number"=>"W986-715-3969",
36
- "updated_at"=>"2014-03-06T19:23:33.383170Z"},
35
+ "transaction_number"=>"W296-328-8320",
36
+ "updated_at"=>"2014-04-25T20:10:19.169392Z"},
37
37
  @hyperlinks=
38
38
  {"customer"=>
39
- #<Proc:0x007fa4e4a33b90/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fa93eadc7c8/lib/balanced/resources/resource.rb:60 (lambda)>,
40
40
  "dispute"=>
41
- #<Proc:0x007fa4e4a32ec0/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fa93ead7db8/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "events"=>
43
- #<Proc:0x007fa4e4a308a0/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fa93ead5ea0/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "order"=>
45
- #<Proc:0x007fa4e4a2ab80/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007fa93ead54a0/lib/balanced/utils.rb:6 (lambda)>,
46
46
  "refunds"=>
47
- #<Proc:0x007fa4e4a29c08/lib/balanced/utils.rb:6 (lambda)>,
47
+ #<Proc:0x007fa93eacf438/lib/balanced/utils.rb:6 (lambda)>,
48
48
  "source"=>
49
- #<Proc:0x007fa4e4a22980/lib/balanced/resources/resource.rb:60 (lambda)>}>
49
+ #<Proc:0x007fa93eacda48/lib/balanced/resources/resource.rb:60 (lambda)>}>
50
50
 
51
51
  % endif
@@ -0,0 +1 @@
1
+ Balanced::Dispute.all
@@ -0,0 +1,2 @@
1
+ <%= boiler_plate %>
2
+ disputes = Balanced::Dispute.all
@@ -0,0 +1,29 @@
1
+ % if mode == 'definition':
2
+ Balanced::Dispute.all
3
+ % elif mode == 'request':
4
+ require 'balanced'
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+
7
+ disputes = Balanced::Dispute.all
8
+ % elif mode == 'response':
9
+ [#<Balanced::Dispute:0x007fa93eaad108
10
+ @attributes=
11
+ {"amount"=>5000,
12
+ "created_at"=>"2014-04-25T20:18:33.022136Z",
13
+ "currency"=>"USD",
14
+ "href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
15
+ "id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
16
+ "initiated_at"=>"2014-04-25T20:10:26.554057Z",
17
+ "links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
18
+ "meta"=>{},
19
+ "reason"=>"fraud",
20
+ "respond_by"=>"2014-05-25T20:10:26.554061Z",
21
+ "status"=>"pending",
22
+ "updated_at"=>"2014-04-25T20:18:33.022139Z"},
23
+ @hyperlinks=
24
+ {"events"=>
25
+ #<Proc:0x007fa93eaa6f60/lib/balanced/utils.rb:6 (lambda)>,
26
+ "transaction"=>
27
+ #<Proc:0x007fa93eaa54d0/lib/balanced/resources/resource.rb:60 (lambda)>}>]
28
+
29
+ % endif
@@ -0,0 +1 @@
1
+ Balanced::Dispute.fetch
@@ -0,0 +1,2 @@
1
+ <%= boiler_plate %>
2
+ dispute = Balanced::Dispute.fetch('<%= request['uri'] %>')
@@ -0,0 +1,31 @@
1
+ % if mode == 'definition':
2
+ Balanced::Dispute.fetch
3
+
4
+ % elif mode == 'request':
5
+ require 'balanced'
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
+
8
+ dispute = Balanced::Dispute.fetch('/disputes/DT61IA2iRqyYBLqUCJNt5XNV')
9
+
10
+ % elif mode == 'response':
11
+ #<Balanced::Dispute:0x007fa93ea8d948
12
+ @attributes=
13
+ {"amount"=>5000,
14
+ "created_at"=>"2014-04-25T20:18:33.022136Z",
15
+ "currency"=>"USD",
16
+ "href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
17
+ "id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
18
+ "initiated_at"=>"2014-04-25T20:10:26.554057Z",
19
+ "links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
20
+ "meta"=>{},
21
+ "reason"=>"fraud",
22
+ "respond_by"=>"2014-05-25T20:10:26.554061Z",
23
+ "status"=>"pending",
24
+ "updated_at"=>"2014-04-25T20:18:33.022139Z"},
25
+ @hyperlinks=
26
+ {"events"=>
27
+ #<Proc:0x007fa93ea87458/lib/balanced/utils.rb:6 (lambda)>,
28
+ "transaction"=>
29
+ #<Proc:0x007fa93ea856f8/lib/balanced/resources/resource.rb:60 (lambda)>}>
30
+
31
+ % endif
@@ -3,11 +3,56 @@ Balanced::Event.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
  events = Balanced::Event.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Event:0x007fa4e49eb1d8
10
+ [#<Balanced::Event:0x007fa93ea4f170
11
+ @attributes=
12
+ {"callback_statuses"=>
13
+ {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
14
+ "entity"=>
15
+ {"bank_accounts"=>
16
+ [{"account_number"=>"xxxxxxxxxxx5555",
17
+ "account_type"=>"CHECKING",
18
+ "address"=>
19
+ {"city"=>nil,
20
+ "country_code"=>nil,
21
+ "line1"=>nil,
22
+ "line2"=>nil,
23
+ "postal_code"=>nil,
24
+ "state"=>nil},
25
+ "bank_name"=>"WELLS FARGO BANK NA",
26
+ "can_credit"=>true,
27
+ "can_debit"=>true,
28
+ "created_at"=>"2014-04-25T20:09:08.031387Z",
29
+ "fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
30
+ "href"=>"/bank_accounts/BA3z8ko53HDEFwxjmNlc998p",
31
+ "id"=>"BA3z8ko53HDEFwxjmNlc998p",
32
+ "links"=>
33
+ {"bank_account_verification"=>nil,
34
+ "customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
35
+ "meta"=>{},
36
+ "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
37
+ "routing_number"=>"121042882",
38
+ "updated_at"=>"2014-04-25T20:09:08.031391Z"}],
39
+ "links"=>
40
+ {"bank_accounts.bank_account_verification"=>
41
+ "/verifications/{bank_accounts.bank_account_verification}",
42
+ "bank_accounts.bank_account_verifications"=>
43
+ "/bank_accounts/{bank_accounts.id}/verifications",
44
+ "bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
45
+ "bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
46
+ "bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
47
+ "href"=>"/events/EV754ca810ccb511e3b6ef061e5f402045",
48
+ "id"=>"EV754ca810ccb511e3b6ef061e5f402045",
49
+ "links"=>{},
50
+ "occurred_at"=>"2014-04-25T20:09:08.031000Z",
51
+ "type"=>"bank_account.created"},
52
+ @hyperlinks=
53
+ {"callbacks"=>
54
+ #<Proc:0x007fa93ea4dd70/lib/balanced/utils.rb:6 (lambda)>}>,
55
+ #<Balanced::Event:0x007fa93ea4dd20
11
56
  @attributes=
12
57
  {"callback_statuses"=>
13
58
  {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
@@ -21,20 +66,20 @@ events = Balanced::Event.all
21
66
  "postal_code"=>"90210",
22
67
  "state"=>nil},
23
68
  "business_name"=>nil,
24
- "created_at"=>"2014-03-06T19:22:12.312268Z",
69
+ "created_at"=>"2014-04-25T20:09:07.786846Z",
25
70
  "dob_month"=>2,
26
71
  "dob_year"=>1947,
27
72
  "ein"=>nil,
28
73
  "email"=>"whc@example.org",
29
- "href"=>"/customers/CU4Wt8xSbREzV2NWtdVAFGeR",
30
- "id"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
74
+ "href"=>"/customers/CU3z3rwGWGazDwwyLy0rNqfj",
75
+ "id"=>"CU3z3rwGWGazDwwyLy0rNqfj",
31
76
  "links"=>{"destination"=>nil, "source"=>nil},
32
77
  "merchant_status"=>"underwritten",
33
78
  "meta"=>{},
34
79
  "name"=>"William Henry Cavendish III",
35
80
  "phone"=>"+16505551212",
36
81
  "ssn_last4"=>"xxxx",
37
- "updated_at"=>"2014-03-06T19:22:12.718847Z"}],
82
+ "updated_at"=>"2014-04-25T20:09:07.845324Z"}],
38
83
  "links"=>
39
84
  {"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
40
85
  "customers.card_holds"=>"/customers/{customers.id}/card_holds",
@@ -49,58 +94,13 @@ events = Balanced::Event.all
49
94
  "customers.reversals"=>"/customers/{customers.id}/reversals",
50
95
  "customers.source"=>"/resources/{customers.source}",
51
96
  "customers.transactions"=>"/customers/{customers.id}/transactions"}},
52
- "href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
53
- "id"=>"EVa26caeeea56411e3838802219cc35fd9",
97
+ "href"=>"/events/EV75268b80ccb511e3b6ef061e5f402045",
98
+ "id"=>"EV75268b80ccb511e3b6ef061e5f402045",
54
99
  "links"=>{},
55
- "occurred_at"=>"2014-03-06T19:22:12.718000Z",
100
+ "occurred_at"=>"2014-04-25T20:09:07.845000Z",
56
101
  "type"=>"account.created"},
57
102
  @hyperlinks=
58
103
  {"callbacks"=>
59
- #<Proc:0x007fa4e49e9108/lib/balanced/utils.rb:6 (lambda)>}>,
60
- #<Balanced::Event:0x007fa4e49e9068
61
- @attributes=
62
- {"callback_statuses"=>
63
- {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
64
- "entity"=>
65
- {"bank_accounts"=>
66
- [{"account_number"=>"xxxxxxxxxxx5555",
67
- "account_type"=>"CHECKING",
68
- "address"=>
69
- {"city"=>nil,
70
- "country_code"=>nil,
71
- "line1"=>nil,
72
- "line2"=>nil,
73
- "postal_code"=>nil,
74
- "state"=>nil},
75
- "bank_name"=>"WELLS FARGO BANK NA",
76
- "can_credit"=>true,
77
- "can_debit"=>true,
78
- "created_at"=>"2014-03-06T19:22:12.982029Z",
79
- "fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
80
- "href"=>"/bank_accounts/BA4WYHt1wCRMAJGm6k0BDaeR",
81
- "id"=>"BA4WYHt1wCRMAJGm6k0BDaeR",
82
- "links"=>
83
- {"bank_account_verification"=>nil,
84
- "customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR"},
85
- "meta"=>{},
86
- "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
87
- "routing_number"=>"121042882",
88
- "updated_at"=>"2014-03-06T19:22:12.982032Z"}],
89
- "links"=>
90
- {"bank_accounts.bank_account_verification"=>
91
- "/verifications/{bank_accounts.bank_account_verification}",
92
- "bank_accounts.bank_account_verifications"=>
93
- "/bank_accounts/{bank_accounts.id}/verifications",
94
- "bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
95
- "bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
96
- "bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
97
- "href"=>"/events/EVa2d381faa56411e3838802219cc35fd9",
98
- "id"=>"EVa2d381faa56411e3838802219cc35fd9",
99
- "links"=>{},
100
- "occurred_at"=>"2014-03-06T19:22:12.982000Z",
101
- "type"=>"bank_account.created"},
102
- @hyperlinks=
103
- {"callbacks"=>
104
- #<Proc:0x007fa4e49e3938/lib/balanced/utils.rb:6 (lambda)>}>]
104
+ #<Proc:0x007fa93ea4c920/lib/balanced/utils.rb:6 (lambda)>}>]
105
105
 
106
106
  % endif