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,9 +3,9 @@ Balanced::Credit.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
- credit = Balanced::Credit.fetch('/credits/CR5XXPwA1ckaTDSIg3593sEx')
8
+ credit = Balanced::Credit.fetch('/credits/CR4yt4sdkTWI1t3HVS16mNAV')
9
9
  credit.description = 'New description for credit'
10
10
  credit.meta = {
11
11
  'anykey' => 'valuegoeshere',
@@ -14,35 +14,35 @@ credit.meta = {
14
14
  credit.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::Credit:0x007fa4e4a4a6b0
17
+ #<Balanced::Credit:0x007fa93b4689f8
18
18
  @attributes=
19
19
  {"amount"=>5000,
20
20
  "appears_on_statement_as"=>"example.com",
21
- "created_at"=>"2014-03-06T19:23:08.771807Z",
21
+ "created_at"=>"2014-04-25T20:10:02.398021Z",
22
22
  "currency"=>"USD",
23
23
  "description"=>"New description for credit",
24
24
  "failure_reason"=>nil,
25
25
  "failure_reason_code"=>nil,
26
- "href"=>"/credits/CR5XXPwA1ckaTDSIg3593sEx",
27
- "id"=>"CR5XXPwA1ckaTDSIg3593sEx",
26
+ "href"=>"/credits/CR4yt4sdkTWI1t3HVS16mNAV",
27
+ "id"=>"CR4yt4sdkTWI1t3HVS16mNAV",
28
28
  "links"=>
29
- {"customer"=>"CU5LVuaZG7gURfbA7TuMNoZa",
30
- "destination"=>"BA5OqdmH8URGBYpilMITWsNW",
29
+ {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
30
+ "destination"=>"BA3Y63fK5STwlhKNMkE3Utmd",
31
31
  "order"=>nil},
32
32
  "meta"=>{"anykey"=>"valuegoeshere", "facebook.id"=>"1234567890"},
33
33
  "status"=>"succeeded",
34
- "transaction_number"=>"CR570-678-5174",
35
- "updated_at"=>"2014-03-06T19:23:14.259690Z"},
34
+ "transaction_number"=>"CR883-913-0274",
35
+ "updated_at"=>"2014-04-25T20:10:07.895933Z"},
36
36
  @hyperlinks=
37
37
  {"customer"=>
38
- #<Proc:0x007fa4e4a43f18/lib/balanced/resources/resource.rb:60 (lambda)>,
38
+ #<Proc:0x007fa93b459958/lib/balanced/resources/resource.rb:60 (lambda)>,
39
39
  "destination"=>
40
- #<Proc:0x007fa4e4a41f60/lib/balanced/resources/resource.rb:60 (lambda)>,
40
+ #<Proc:0x007fa93b451488/lib/balanced/resources/resource.rb:60 (lambda)>,
41
41
  "events"=>
42
- #<Proc:0x007fa4e4a3ada0/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93b44a4f8/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "order"=>
44
- #<Proc:0x007fa4e4a396a8/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa93b449198/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "reversals"=>
46
- #<Proc:0x007fa4e41cb2c8/lib/balanced/utils.rb:6 (lambda)>}>
46
+ #<Proc:0x007fa93b432c18/lib/balanced/utils.rb:6 (lambda)>}>
47
47
 
48
48
  % endif
@@ -3,7 +3,7 @@ Balanced::Customer.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
  customer = Balanced::Customer.new(
9
9
  :address => {
@@ -16,7 +16,7 @@ customer = Balanced::Customer.new(
16
16
  customer.save
17
17
 
18
18
  % elif mode == 'response':
19
- #<Balanced::Customer:0x007fa4e4a197e0
19
+ #<Balanced::Customer:0x007fa93b3c95b0
20
20
  @attributes=
21
21
  {"address"=>
22
22
  {"city"=>nil,
@@ -26,44 +26,44 @@ customer.save
26
26
  "postal_code"=>"48120",
27
27
  "state"=>nil},
28
28
  "business_name"=>nil,
29
- "created_at"=>"2014-03-06T19:23:21.728225Z",
29
+ "created_at"=>"2014-04-25T20:10:14.759932Z",
30
30
  "dob_month"=>7,
31
31
  "dob_year"=>1963,
32
32
  "ein"=>nil,
33
33
  "email"=>nil,
34
- "href"=>"/customers/CU64R7DS6DwuXYVg9RTskFK8",
35
- "id"=>"CU64R7DS6DwuXYVg9RTskFK8",
34
+ "href"=>"/customers/CU4MnFEab304anOtUtEu5hkN",
35
+ "id"=>"CU4MnFEab304anOtUtEu5hkN",
36
36
  "links"=>{"destination"=>nil, "source"=>nil},
37
37
  "merchant_status"=>"underwritten",
38
38
  "meta"=>{},
39
39
  "name"=>"Henry Ford",
40
40
  "phone"=>nil,
41
41
  "ssn_last4"=>nil,
42
- "updated_at"=>"2014-03-06T19:23:22.907102Z"},
42
+ "updated_at"=>"2014-04-25T20:10:15.048688Z"},
43
43
  @hyperlinks=
44
44
  {"bank_accounts"=>
45
- #<Proc:0x007fa4e4a12058/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007fa93b3ba0d8/lib/balanced/utils.rb:6 (lambda)>,
46
46
  "card_holds"=>
47
- #<Proc:0x007fa4e328f610/lib/balanced/utils.rb:6 (lambda)>,
47
+ #<Proc:0x007fa93b39b8e0/lib/balanced/utils.rb:6 (lambda)>,
48
48
  "cards"=>
49
- #<Proc:0x007fa4e32844b8/lib/balanced/utils.rb:6 (lambda)>,
49
+ #<Proc:0x007fa93b38ac98/lib/balanced/utils.rb:6 (lambda)>,
50
50
  "credits"=>
51
- #<Proc:0x007fa4e32862b8/lib/balanced/utils.rb:6 (lambda)>,
51
+ #<Proc:0x007fa93b381170/lib/balanced/utils.rb:6 (lambda)>,
52
52
  "debits"=>
53
- #<Proc:0x007fa4e327e5e0/lib/balanced/utils.rb:6 (lambda)>,
53
+ #<Proc:0x007fa93b361c30/lib/balanced/utils.rb:6 (lambda)>,
54
54
  "destination"=>
55
- #<Proc:0x007fa4e327d8e8/lib/balanced/utils.rb:6 (lambda)>,
55
+ #<Proc:0x007fa93b35b240/lib/balanced/utils.rb:6 (lambda)>,
56
56
  "external_accounts"=>
57
- #<Proc:0x007fa4e32766b0/lib/balanced/utils.rb:6 (lambda)>,
57
+ #<Proc:0x007fa93b33b4b8/lib/balanced/utils.rb:6 (lambda)>,
58
58
  "orders"=>
59
- #<Proc:0x007fa4e326f720/lib/balanced/utils.rb:6 (lambda)>,
59
+ #<Proc:0x007fa93b32bab8/lib/balanced/utils.rb:6 (lambda)>,
60
60
  "refunds"=>
61
- #<Proc:0x007fa4e326c2a0/lib/balanced/utils.rb:6 (lambda)>,
61
+ #<Proc:0x007fa93b310a88/lib/balanced/utils.rb:6 (lambda)>,
62
62
  "reversals"=>
63
- #<Proc:0x007fa4e3265bd0/lib/balanced/utils.rb:6 (lambda)>,
63
+ #<Proc:0x007fa93b31b640/lib/balanced/utils.rb:6 (lambda)>,
64
64
  "source"=>
65
- #<Proc:0x007fa4e3264640/lib/balanced/utils.rb:6 (lambda)>,
65
+ #<Proc:0x007fa93b319c28/lib/balanced/utils.rb:6 (lambda)>,
66
66
  "transactions"=>
67
- #<Proc:0x007fa4e325e330/lib/balanced/utils.rb:6 (lambda)>}>
67
+ #<Proc:0x007fa93b305570/lib/balanced/utils.rb:6 (lambda)>}>
68
68
 
69
69
  % endif
@@ -2,7 +2,7 @@
2
2
  Balanced::Customer.unstore
3
3
 
4
4
  % elif mode == 'request':
5
- customer = Balanced::Customer.fetch('/customers/CU64R7DS6DwuXYVg9RTskFK8')
5
+ customer = Balanced::Customer.fetch('/customers/CU4MnFEab304anOtUtEu5hkN')
6
6
  customer.unstore
7
7
 
8
8
  % elif mode == 'response':
@@ -3,11 +3,11 @@ Balanced::Customer.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
  customers = Balanced::Customer.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Customer:0x007fa4e49cb388
10
+ [#<Balanced::Customer:0x007fa93b24f1f8
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -17,46 +17,46 @@ customers = Balanced::Customer.all
17
17
  "postal_code"=>"48120",
18
18
  "state"=>nil},
19
19
  "business_name"=>nil,
20
- "created_at"=>"2014-03-06T19:23:15.982885Z",
20
+ "created_at"=>"2014-04-25T20:10:09.606769Z",
21
21
  "dob_month"=>7,
22
22
  "dob_year"=>1963,
23
23
  "ein"=>nil,
24
24
  "email"=>nil,
25
- "href"=>"/customers/CU5YopHN07Ul5XQnILUifeQT",
26
- "id"=>"CU5YopHN07Ul5XQnILUifeQT",
25
+ "href"=>"/customers/CU4GAx8tZTDNIgAmwfV35e53",
26
+ "id"=>"CU4GAx8tZTDNIgAmwfV35e53",
27
27
  "links"=>{"destination"=>nil, "source"=>nil},
28
28
  "merchant_status"=>"underwritten",
29
29
  "meta"=>{},
30
30
  "name"=>"Henry Ford",
31
31
  "phone"=>nil,
32
32
  "ssn_last4"=>nil,
33
- "updated_at"=>"2014-03-06T19:23:16.724050Z"},
33
+ "updated_at"=>"2014-04-25T20:10:09.810570Z"},
34
34
  @hyperlinks=
35
35
  {"bank_accounts"=>
36
- #<Proc:0x007fa4e49c84d0/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa93b225970/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "card_holds"=>
38
- #<Proc:0x007fa4e49c2a58/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa93b214710/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "cards"=>
40
- #<Proc:0x007fa4e49c0410/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa93b204d38/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "credits"=>
42
- #<Proc:0x007fa4e49ba8d0/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93b1f6cb0/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "debits"=>
44
- #<Proc:0x007fa4e49b8378/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa93b1e6608/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "destination"=>
46
- #<Proc:0x007fa4e49b3e18/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa93b1de2c8/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "external_accounts"=>
48
- #<Proc:0x007fa4e49b0bc8/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fa93b1c5200/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "orders"=>
50
- #<Proc:0x007fa4e49aa728/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa93b17b150/lib/balanced/utils.rb:6 (lambda)>,
51
51
  "refunds"=>
52
- #<Proc:0x007fa4e49a81d0/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa93b1a8538/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "reversals"=>
54
- #<Proc:0x007fa4e49a0ea8/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fa93b1734c8/lib/balanced/utils.rb:6 (lambda)>,
55
55
  "source"=>
56
- #<Proc:0x007fa4e4998438/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fa93b1705e8/lib/balanced/utils.rb:6 (lambda)>,
57
57
  "transactions"=>
58
- #<Proc:0x007fa4e499a1e8/lib/balanced/utils.rb:6 (lambda)>}>,
59
- #<Balanced::Customer:0x007fa4e499a0a8
58
+ #<Proc:0x007fa93b0fe290/lib/balanced/utils.rb:6 (lambda)>}>,
59
+ #<Balanced::Customer:0x007fa93b0fe240
60
60
  @attributes=
61
61
  {"address"=>
62
62
  {"city"=>nil,
@@ -66,44 +66,44 @@ customers = Balanced::Customer.all
66
66
  "postal_code"=>"48120",
67
67
  "state"=>nil},
68
68
  "business_name"=>nil,
69
- "created_at"=>"2014-03-06T19:23:04.895882Z",
69
+ "created_at"=>"2014-04-25T20:09:28.164202Z",
70
70
  "dob_month"=>7,
71
71
  "dob_year"=>1963,
72
72
  "ein"=>nil,
73
73
  "email"=>nil,
74
- "href"=>"/customers/CU5LVuaZG7gURfbA7TuMNoZa",
75
- "id"=>"CU5LVuaZG7gURfbA7TuMNoZa",
74
+ "href"=>"/customers/CU3VYCUIfwngJsidJWdGw2W5",
75
+ "id"=>"CU3VYCUIfwngJsidJWdGw2W5",
76
76
  "links"=>{"destination"=>nil, "source"=>nil},
77
77
  "merchant_status"=>"underwritten",
78
78
  "meta"=>{},
79
79
  "name"=>"Henry Ford",
80
80
  "phone"=>nil,
81
81
  "ssn_last4"=>nil,
82
- "updated_at"=>"2014-03-06T19:23:05.747337Z"},
82
+ "updated_at"=>"2014-04-25T20:09:28.595435Z"},
83
83
  @hyperlinks=
84
84
  {"bank_accounts"=>
85
- #<Proc:0x007fa4e4992cb8/lib/balanced/utils.rb:6 (lambda)>,
85
+ #<Proc:0x007fa93b161de0/lib/balanced/utils.rb:6 (lambda)>,
86
86
  "card_holds"=>
87
- #<Proc:0x007fa4e2938940/lib/balanced/utils.rb:6 (lambda)>,
87
+ #<Proc:0x007fa93b148f20/lib/balanced/utils.rb:6 (lambda)>,
88
88
  "cards"=>
89
- #<Proc:0x007fa4e29385d0/lib/balanced/utils.rb:6 (lambda)>,
89
+ #<Proc:0x007fa93b12b538/lib/balanced/utils.rb:6 (lambda)>,
90
90
  "credits"=>
91
- #<Proc:0x007fa4e29324c8/lib/balanced/utils.rb:6 (lambda)>,
91
+ #<Proc:0x007fa93b118258/lib/balanced/utils.rb:6 (lambda)>,
92
92
  "debits"=>
93
- #<Proc:0x007fa4e292bab0/lib/balanced/utils.rb:6 (lambda)>,
93
+ #<Proc:0x007fa93b0cfa08/lib/balanced/utils.rb:6 (lambda)>,
94
94
  "destination"=>
95
- #<Proc:0x007fa4e292afe8/lib/balanced/utils.rb:6 (lambda)>,
95
+ #<Proc:0x007fa93b0c53a0/lib/balanced/utils.rb:6 (lambda)>,
96
96
  "external_accounts"=>
97
- #<Proc:0x007fa4e2928c70/lib/balanced/utils.rb:6 (lambda)>,
97
+ #<Proc:0x007fa93b0a0898/lib/balanced/utils.rb:6 (lambda)>,
98
98
  "orders"=>
99
- #<Proc:0x007fa4e291ae18/lib/balanced/utils.rb:6 (lambda)>,
99
+ #<Proc:0x007fa93b091708/lib/balanced/utils.rb:6 (lambda)>,
100
100
  "refunds"=>
101
- #<Proc:0x007fa4e2918780/lib/balanced/utils.rb:6 (lambda)>,
101
+ #<Proc:0x007fa93b043440/lib/balanced/utils.rb:6 (lambda)>,
102
102
  "reversals"=>
103
- #<Proc:0x007fa4e41b1c38/lib/balanced/utils.rb:6 (lambda)>,
103
+ #<Proc:0x007fa93e85fb80/lib/balanced/utils.rb:6 (lambda)>,
104
104
  "source"=>
105
- #<Proc:0x007fa4e41b0ba8/lib/balanced/utils.rb:6 (lambda)>,
105
+ #<Proc:0x007fa93e85f1a8/lib/balanced/utils.rb:6 (lambda)>,
106
106
  "transactions"=>
107
- #<Proc:0x007fa4e497f550/lib/balanced/utils.rb:6 (lambda)>}>]
107
+ #<Proc:0x007fa93e85d308/lib/balanced/utils.rb:6 (lambda)>}>]
108
108
 
109
109
  % endif
@@ -3,11 +3,11 @@ Balanced::Customer.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
- customer = Balanced::Customer.fetch('/customers/CU5YopHN07Ul5XQnILUifeQT')
8
+ customer = Balanced::Customer.fetch('/customers/CU4GAx8tZTDNIgAmwfV35e53')
9
9
  % elif mode == 'response':
10
- #<Balanced::Customer:0x007fa4e4114f28
10
+ #<Balanced::Customer:0x007fa93e9f5c60
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -17,44 +17,44 @@ customer = Balanced::Customer.fetch('/customers/CU5YopHN07Ul5XQnILUifeQT')
17
17
  "postal_code"=>"48120",
18
18
  "state"=>nil},
19
19
  "business_name"=>nil,
20
- "created_at"=>"2014-03-06T19:23:15.982885Z",
20
+ "created_at"=>"2014-04-25T20:10:09.606769Z",
21
21
  "dob_month"=>7,
22
22
  "dob_year"=>1963,
23
23
  "ein"=>nil,
24
24
  "email"=>nil,
25
- "href"=>"/customers/CU5YopHN07Ul5XQnILUifeQT",
26
- "id"=>"CU5YopHN07Ul5XQnILUifeQT",
25
+ "href"=>"/customers/CU4GAx8tZTDNIgAmwfV35e53",
26
+ "id"=>"CU4GAx8tZTDNIgAmwfV35e53",
27
27
  "links"=>{"destination"=>nil, "source"=>nil},
28
28
  "merchant_status"=>"underwritten",
29
29
  "meta"=>{},
30
30
  "name"=>"Henry Ford",
31
31
  "phone"=>nil,
32
32
  "ssn_last4"=>nil,
33
- "updated_at"=>"2014-03-06T19:23:16.724050Z"},
33
+ "updated_at"=>"2014-04-25T20:10:09.810570Z"},
34
34
  @hyperlinks=
35
35
  {"bank_accounts"=>
36
- #<Proc:0x007fa4e410eb78/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa93ea1fb50/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "card_holds"=>
38
- #<Proc:0x007fa4e410c3c8/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa93ea1db48/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "cards"=>
40
- #<Proc:0x007fa4e4106680/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa93eb2ff40/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "credits"=>
42
- #<Proc:0x007fa4e4104100/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93eb2e000/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "debits"=>
44
- #<Proc:0x007fa4e40fe2c8/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa93eb2c070/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "destination"=>
46
- #<Proc:0x007fa4e40fcb08/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa93eb3f760/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "external_accounts"=>
48
- #<Proc:0x007fa4e40e6f38/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fa93eb3d938/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "orders"=>
50
- #<Proc:0x007fa4e40e3a68/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa93eb5fa88/lib/balanced/utils.rb:6 (lambda)>,
51
51
  "refunds"=>
52
- #<Proc:0x007fa4e40dfdf0/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa93eb5dc10/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "reversals"=>
54
- #<Proc:0x007fa4e40dce98/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fa93eb67d50/lib/balanced/utils.rb:6 (lambda)>,
55
55
  "source"=>
56
- #<Proc:0x007fa4e40d4d88/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fa93eb673a0/lib/balanced/utils.rb:6 (lambda)>,
57
57
  "transactions"=>
58
- #<Proc:0x007fa4e40d6070/lib/balanced/utils.rb:6 (lambda)>}>
58
+ #<Proc:0x007fa93eb65550/lib/balanced/utils.rb:6 (lambda)>}>
59
59
 
60
60
  % endif
@@ -3,9 +3,9 @@ Balanced::Customer.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
- customer = Balanced::Customer.fetch('/customers/CU5YopHN07Ul5XQnILUifeQT')
8
+ customer = Balanced::Customer.fetch('/customers/CU4GAx8tZTDNIgAmwfV35e53')
9
9
  customer.email = 'email@newdomain.com'
10
10
  customer.meta = {
11
11
  'shipping-preference' => 'ground'
@@ -13,7 +13,7 @@ customer.meta = {
13
13
  customer.save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Customer:0x007fa4e48eccc8
16
+ #<Balanced::Customer:0x007fa93eb95868
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -23,44 +23,44 @@ customer.save
23
23
  "postal_code"=>"48120",
24
24
  "state"=>nil},
25
25
  "business_name"=>nil,
26
- "created_at"=>"2014-03-06T19:23:15.982885Z",
26
+ "created_at"=>"2014-04-25T20:10:09.606769Z",
27
27
  "dob_month"=>7,
28
28
  "dob_year"=>1963,
29
29
  "ein"=>nil,
30
30
  "email"=>"email@newdomain.com",
31
- "href"=>"/customers/CU5YopHN07Ul5XQnILUifeQT",
32
- "id"=>"CU5YopHN07Ul5XQnILUifeQT",
31
+ "href"=>"/customers/CU4GAx8tZTDNIgAmwfV35e53",
32
+ "id"=>"CU4GAx8tZTDNIgAmwfV35e53",
33
33
  "links"=>{"destination"=>nil, "source"=>nil},
34
34
  "merchant_status"=>"underwritten",
35
35
  "meta"=>{"shipping-preference"=>"ground"},
36
36
  "name"=>"Henry Ford",
37
37
  "phone"=>nil,
38
38
  "ssn_last4"=>nil,
39
- "updated_at"=>"2014-03-06T19:23:20.140160Z"},
39
+ "updated_at"=>"2014-04-25T20:10:13.306289Z"},
40
40
  @hyperlinks=
41
41
  {"bank_accounts"=>
42
- #<Proc:0x007fa4e48d4380/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93eb9f7a0/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "card_holds"=>
44
- #<Proc:0x007fa4e48e66c0/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa93eb9d900/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "cards"=>
46
- #<Proc:0x007fa4e48d28a0/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa93eba7a40/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "credits"=>
48
- #<Proc:0x007fa4e48d10b8/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fa93eba5bc8/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "debits"=>
50
- #<Proc:0x007fa4e48df500/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa93ebb7d00/lib/balanced/utils.rb:6 (lambda)>,
51
51
  "destination"=>
52
- #<Proc:0x007fa4e48de6a0/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa93ebb7350/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "external_accounts"=>
54
- #<Proc:0x007fa4e48cfc68/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fa93ebb5528/lib/balanced/utils.rb:6 (lambda)>,
55
55
  "orders"=>
56
- #<Proc:0x007fa4e48cd3f0/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fa93ebbf668/lib/balanced/utils.rb:6 (lambda)>,
57
57
  "refunds"=>
58
- #<Proc:0x007fa4e48cafd8/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fa93ebbd7f0/lib/balanced/utils.rb:6 (lambda)>,
59
59
  "reversals"=>
60
- #<Proc:0x007fa4e48c01f0/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fa93ebc7930/lib/balanced/utils.rb:6 (lambda)>,
61
61
  "source"=>
62
- #<Proc:0x007fa4e48c2bd0/lib/balanced/utils.rb:6 (lambda)>,
62
+ #<Proc:0x007fa93ebc6f80/lib/balanced/utils.rb:6 (lambda)>,
63
63
  "transactions"=>
64
- #<Proc:0x007fa4e3213df8/lib/balanced/utils.rb:6 (lambda)>}>
64
+ #<Proc:0x007fa93ebc5130/lib/balanced/utils.rb:6 (lambda)>}>
65
65
 
66
66
  % endif
@@ -0,0 +1 @@
1
+ Balanced::Debit.dispute
@@ -0,0 +1,3 @@
1
+ <%= boiler_plate %>
2
+ debit = Balanced::Debit.fetch('<%= request['debit_href'] %>')
3
+ dispute = debit.dispute