balanced 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile +1 -0
  4. data/balanced.gemspec +1 -1
  5. data/lib/balanced/client.rb +1 -2
  6. data/lib/balanced/error.rb +3 -3
  7. data/lib/balanced/resources/card.rb +15 -1
  8. data/lib/balanced/version.rb +1 -1
  9. data/scenarios/api_key_create/ruby.mako +6 -6
  10. data/scenarios/api_key_delete/ruby.mako +2 -2
  11. data/scenarios/api_key_list/ruby.mako +10 -10
  12. data/scenarios/api_key_show/ruby.mako +6 -6
  13. data/scenarios/bank_account_associate_to_customer/ruby.mako +14 -14
  14. data/scenarios/bank_account_create/ruby.mako +11 -11
  15. data/scenarios/bank_account_credit/ruby.mako +15 -15
  16. data/scenarios/bank_account_debit/ruby.mako +15 -15
  17. data/scenarios/bank_account_delete/ruby.mako +2 -2
  18. data/scenarios/bank_account_list/ruby.mako +22 -22
  19. data/scenarios/bank_account_show/ruby.mako +12 -12
  20. data/scenarios/bank_account_update/ruby.mako +12 -12
  21. data/scenarios/bank_account_verification_create/definition.rb +1 -1
  22. data/scenarios/bank_account_verification_create/ruby.mako +10 -10
  23. data/scenarios/bank_account_verification_show/definition.rb +1 -1
  24. data/scenarios/bank_account_verification_show/request.rb +1 -1
  25. data/scenarios/bank_account_verification_show/ruby.mako +10 -10
  26. data/scenarios/bank_account_verification_update/definition.rb +1 -1
  27. data/scenarios/bank_account_verification_update/request.rb +1 -1
  28. data/scenarios/bank_account_verification_update/ruby.mako +10 -10
  29. data/scenarios/callback_create/ruby.mako +4 -4
  30. data/scenarios/callback_delete/ruby.mako +2 -2
  31. data/scenarios/callback_list/ruby.mako +4 -4
  32. data/scenarios/callback_show/ruby.mako +5 -5
  33. data/scenarios/card_associate_to_customer/ruby.mako +21 -12
  34. data/scenarios/card_create/ruby.mako +18 -9
  35. data/scenarios/card_create_creditable/definition.rb +1 -0
  36. data/scenarios/card_create_creditable/request.rb +4 -0
  37. data/scenarios/card_create_creditable/ruby.mako +62 -0
  38. data/scenarios/card_create_dispute/ruby.mako +18 -9
  39. data/scenarios/card_credit/definition.rb +1 -0
  40. data/scenarios/card_credit/request.rb +5 -0
  41. data/scenarios/card_credit/ruby.mako +43 -0
  42. data/scenarios/card_debit/ruby.mako +16 -16
  43. data/scenarios/card_debit_dispute/ruby.mako +15 -15
  44. data/scenarios/card_delete/ruby.mako +2 -2
  45. data/scenarios/card_hold_capture/ruby.mako +16 -16
  46. data/scenarios/card_hold_create/ruby.mako +14 -14
  47. data/scenarios/card_hold_list/ruby.mako +25 -25
  48. data/scenarios/card_hold_show/ruby.mako +14 -14
  49. data/scenarios/card_hold_update/ruby.mako +14 -14
  50. data/scenarios/card_hold_void/ruby.mako +15 -15
  51. data/scenarios/card_list/ruby.mako +36 -18
  52. data/scenarios/card_show/ruby.mako +19 -10
  53. data/scenarios/card_update/ruby.mako +19 -10
  54. data/scenarios/credit_list/ruby.mako +14 -14
  55. data/scenarios/credit_list_bank_account/ruby.mako +2 -2
  56. data/scenarios/credit_order/definition.rb +1 -0
  57. data/scenarios/credit_order/request.rb +7 -0
  58. data/scenarios/credit_order/ruby.mako +26 -0
  59. data/scenarios/credit_show/ruby.mako +15 -15
  60. data/scenarios/credit_update/ruby.mako +15 -15
  61. data/scenarios/customer_create/ruby.mako +20 -18
  62. data/scenarios/customer_delete/ruby.mako +1 -1
  63. data/scenarios/customer_list/ruby.mako +39 -35
  64. data/scenarios/customer_show/ruby.mako +21 -19
  65. data/scenarios/customer_update/ruby.mako +21 -19
  66. data/scenarios/debit_dispute_show/ruby.mako +12 -12
  67. data/scenarios/debit_list/ruby.mako +34 -34
  68. data/scenarios/debit_order/definition.rb +1 -0
  69. data/scenarios/debit_order/request.rb +7 -0
  70. data/scenarios/debit_order/ruby.mako +49 -0
  71. data/scenarios/debit_show/ruby.mako +16 -16
  72. data/scenarios/debit_update/ruby.mako +16 -16
  73. data/scenarios/dispute_list/ruby.mako +11 -11
  74. data/scenarios/dispute_show/ruby.mako +12 -12
  75. data/scenarios/event_list/ruby.mako +56 -55
  76. data/scenarios/event_show/ruby.mako +41 -35
  77. data/scenarios/order_create/ruby.mako +14 -14
  78. data/scenarios/order_list/ruby.mako +45 -13
  79. data/scenarios/order_show/ruby.mako +14 -14
  80. data/scenarios/order_update/ruby.mako +14 -14
  81. data/scenarios/refund_create/ruby.mako +13 -13
  82. data/scenarios/refund_list/ruby.mako +12 -12
  83. data/scenarios/refund_show/ruby.mako +13 -13
  84. data/scenarios/refund_update/ruby.mako +13 -13
  85. data/scenarios/render_mako.rb +1 -1
  86. data/scenarios/reversal_create/ruby.mako +12 -12
  87. data/scenarios/reversal_list/ruby.mako +11 -11
  88. data/scenarios/reversal_show/ruby.mako +12 -12
  89. data/scenarios/reversal_update/ruby.mako +12 -12
  90. data/spec/balanced/resources/card_spec.rb +73 -11
  91. data/spec/balanced/resources/credit_spec.rb +155 -26
  92. data/spec/balanced/response/balanced_exception_middleware_spec.rb +1 -2
  93. data/spec/spec_helper.rb +3 -1
  94. metadata +22 -4
@@ -3,39 +3,39 @@ Balanced::Credit.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
8
  credits = Balanced::Credit.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Credit:0x007fa93b558930
10
+ [#<Balanced::Credit:0x007fa7d41ce638
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
13
  "appears_on_statement_as"=>"example.com",
14
- "created_at"=>"2014-04-25T20:10:02.398021Z",
14
+ "created_at"=>"2014-05-15T00:41:13.829371Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>nil,
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/credits/CR4yt4sdkTWI1t3HVS16mNAV",
20
- "id"=>"CR4yt4sdkTWI1t3HVS16mNAV",
19
+ "href"=>"/credits/CR4OhD4V9LuxGe5kXaNpUULD",
20
+ "id"=>"CR4OhD4V9LuxGe5kXaNpUULD",
21
21
  "links"=>
22
- {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
23
- "destination"=>"BA3Y63fK5STwlhKNMkE3Utmd",
22
+ {"customer"=>"CU2L981m9AtPY8pjpGpjnjnf",
23
+ "destination"=>"BA2RqFlRIm0xqCNnHJNLYWMd",
24
24
  "order"=>nil},
25
25
  "meta"=>{},
26
26
  "status"=>"succeeded",
27
- "transaction_number"=>"CR883-913-0274",
28
- "updated_at"=>"2014-04-25T20:10:03.049785Z"},
27
+ "transaction_number"=>"CR666-433-9281",
28
+ "updated_at"=>"2014-05-15T00:41:14.822162Z"},
29
29
  @hyperlinks=
30
30
  {"customer"=>
31
- #<Proc:0x007fa93b54b370/lib/balanced/resources/resource.rb:60 (lambda)>,
31
+ #<Proc:0x007fa7d41cc978/lib/balanced/resources/resource.rb:60 (lambda)>,
32
32
  "destination"=>
33
- #<Proc:0x007fa93b540448/lib/balanced/resources/resource.rb:60 (lambda)>,
33
+ #<Proc:0x007fa7d41c6f50/lib/balanced/resources/resource.rb:60 (lambda)>,
34
34
  "events"=>
35
- #<Proc:0x007fa93b5287a8/lib/balanced/utils.rb:6 (lambda)>,
35
+ #<Proc:0x007fa7d41c4c78/lib/balanced/utils.rb:6 (lambda)>,
36
36
  "order"=>
37
- #<Proc:0x007fa93b523190/lib/balanced/utils.rb:6 (lambda)>,
37
+ #<Proc:0x007fa7d41c4228/lib/balanced/utils.rb:6 (lambda)>,
38
38
  "reversals"=>
39
- #<Proc:0x007fa93b51b030/lib/balanced/utils.rb:6 (lambda)>}>]
39
+ #<Proc:0x007fa7d41bdf18/lib/balanced/utils.rb:6 (lambda)>}>]
40
40
 
41
41
  % endif
@@ -3,9 +3,9 @@ Balanced::BankAccount.credits
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA3PDwDCkdeC4OgPtPNwoCWl')
8
+ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA2EmblHC08bmwiwwNrbI0Rj')
9
9
  credits = bank_account.credits
10
10
  % elif mode == 'response':
11
11
  {}
@@ -0,0 +1 @@
1
+ Balanced::Order.credit_to
@@ -0,0 +1,7 @@
1
+ <%= boiler_plate %>
2
+ order = Balanced::Order.fetch('<%= request['order_href'] %>')
3
+ bank_account = Balanced::BankAccount.fetch('<%= request['bank_account_href'] %>')
4
+ order.credit_to(
5
+ :source => bank_account,
6
+ :amount => <%= request['payload']['amount'] %>
7
+ )
@@ -0,0 +1,26 @@
1
+ % if mode == 'definition':
2
+ Balanced::Order.credit_to
3
+
4
+ % elif mode == 'request':
5
+ require 'balanced'
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
+
8
+ order = Balanced::Order.fetch('/orders/OR4R53c8wdUiVEUiegSHpwaN')
9
+ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA2EmblHC08bmwiwwNrbI0Rj/credits')
10
+ order.credit_to(
11
+ :source => bank_account,
12
+ :amount => 5000
13
+ )
14
+ % elif mode == 'response':
15
+ {"errors"=>
16
+ [{"additional"=>nil,
17
+ "category_code"=>"order",
18
+ "category_type"=>"logical",
19
+ "description"=>
20
+ "Funding instrument BA2EmblHC08bmwiwwNrbI0Rj is not associated with order customer CU2L981m9AtPY8pjpGpjnjnf or marketplace owner customer CU1mlBGw9Cybp1cbj3Lltvcp Your request id is OHMa013033cdbc911e38d4506429171ffad.",
21
+ "extras"=>{},
22
+ "request_id"=>"OHMa013033cdbc911e38d4506429171ffad",
23
+ "status"=>"Conflict",
24
+ "status_code"=>409}]}
25
+
26
+ % endif
@@ -3,39 +3,39 @@ Balanced::Credit.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- credit = Balanced::Credit.fetch('/credits/CR4yt4sdkTWI1t3HVS16mNAV')
8
+ credit = Balanced::Credit.fetch('/credits/CR4OhD4V9LuxGe5kXaNpUULD')
9
9
  % elif mode == 'response':
10
- #<Balanced::Credit:0x007fa93b4d03a0
10
+ #<Balanced::Credit:0x007fa7d415c650
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
13
  "appears_on_statement_as"=>"example.com",
14
- "created_at"=>"2014-04-25T20:10:02.398021Z",
14
+ "created_at"=>"2014-05-15T00:41:13.829371Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>nil,
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/credits/CR4yt4sdkTWI1t3HVS16mNAV",
20
- "id"=>"CR4yt4sdkTWI1t3HVS16mNAV",
19
+ "href"=>"/credits/CR4OhD4V9LuxGe5kXaNpUULD",
20
+ "id"=>"CR4OhD4V9LuxGe5kXaNpUULD",
21
21
  "links"=>
22
- {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
23
- "destination"=>"BA3Y63fK5STwlhKNMkE3Utmd",
22
+ {"customer"=>"CU2L981m9AtPY8pjpGpjnjnf",
23
+ "destination"=>"BA2RqFlRIm0xqCNnHJNLYWMd",
24
24
  "order"=>nil},
25
25
  "meta"=>{},
26
26
  "status"=>"succeeded",
27
- "transaction_number"=>"CR883-913-0274",
28
- "updated_at"=>"2014-04-25T20:10:03.049785Z"},
27
+ "transaction_number"=>"CR666-433-9281",
28
+ "updated_at"=>"2014-05-15T00:41:14.822162Z"},
29
29
  @hyperlinks=
30
30
  {"customer"=>
31
- #<Proc:0x007fa93b4c8df8/lib/balanced/resources/resource.rb:60 (lambda)>,
31
+ #<Proc:0x007fa7d4156688/lib/balanced/resources/resource.rb:60 (lambda)>,
32
32
  "destination"=>
33
- #<Proc:0x007fa93b4c1670/lib/balanced/resources/resource.rb:60 (lambda)>,
33
+ #<Proc:0x007fa7d41541a8/lib/balanced/resources/resource.rb:60 (lambda)>,
34
34
  "events"=>
35
- #<Proc:0x007fa93b4b1f90/lib/balanced/utils.rb:6 (lambda)>,
35
+ #<Proc:0x007fa7d414e230/lib/balanced/utils.rb:6 (lambda)>,
36
36
  "order"=>
37
- #<Proc:0x007fa93b4ab5c8/lib/balanced/utils.rb:6 (lambda)>,
37
+ #<Proc:0x007fa7d414d830/lib/balanced/utils.rb:6 (lambda)>,
38
38
  "reversals"=>
39
- #<Proc:0x007fa93b49a778/lib/balanced/utils.rb:6 (lambda)>}>
39
+ #<Proc:0x007fa7d4147778/lib/balanced/utils.rb:6 (lambda)>}>
40
40
 
41
41
  % endif
@@ -3,9 +3,9 @@ Balanced::Credit.save
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- credit = Balanced::Credit.fetch('/credits/CR4yt4sdkTWI1t3HVS16mNAV')
8
+ credit = Balanced::Credit.fetch('/credits/CR4OhD4V9LuxGe5kXaNpUULD')
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:0x007fa93b4689f8
17
+ #<Balanced::Credit:0x007fa7d4127568
18
18
  @attributes=
19
19
  {"amount"=>5000,
20
20
  "appears_on_statement_as"=>"example.com",
21
- "created_at"=>"2014-04-25T20:10:02.398021Z",
21
+ "created_at"=>"2014-05-15T00:41:13.829371Z",
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/CR4yt4sdkTWI1t3HVS16mNAV",
27
- "id"=>"CR4yt4sdkTWI1t3HVS16mNAV",
26
+ "href"=>"/credits/CR4OhD4V9LuxGe5kXaNpUULD",
27
+ "id"=>"CR4OhD4V9LuxGe5kXaNpUULD",
28
28
  "links"=>
29
- {"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
30
- "destination"=>"BA3Y63fK5STwlhKNMkE3Utmd",
29
+ {"customer"=>"CU2L981m9AtPY8pjpGpjnjnf",
30
+ "destination"=>"BA2RqFlRIm0xqCNnHJNLYWMd",
31
31
  "order"=>nil},
32
32
  "meta"=>{"anykey"=>"valuegoeshere", "facebook.id"=>"1234567890"},
33
33
  "status"=>"succeeded",
34
- "transaction_number"=>"CR883-913-0274",
35
- "updated_at"=>"2014-04-25T20:10:07.895933Z"},
34
+ "transaction_number"=>"CR666-433-9281",
35
+ "updated_at"=>"2014-05-15T00:41:21.980193Z"},
36
36
  @hyperlinks=
37
37
  {"customer"=>
38
- #<Proc:0x007fa93b459958/lib/balanced/resources/resource.rb:60 (lambda)>,
38
+ #<Proc:0x007fa7d4125588/lib/balanced/resources/resource.rb:60 (lambda)>,
39
39
  "destination"=>
40
- #<Proc:0x007fa93b451488/lib/balanced/resources/resource.rb:60 (lambda)>,
40
+ #<Proc:0x007fa7d411f818/lib/balanced/resources/resource.rb:60 (lambda)>,
41
41
  "events"=>
42
- #<Proc:0x007fa93b44a4f8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa7d411c848/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "order"=>
44
- #<Proc:0x007fa93b449198/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa7d41177f8/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "reversals"=>
46
- #<Proc:0x007fa93b432c18/lib/balanced/utils.rb:6 (lambda)>}>
46
+ #<Proc:0x007fa7d4115318/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
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:0x007fa93b3c95b0
19
+ #<Balanced::Customer:0x007fa7d40c7488
20
20
  @attributes=
21
21
  {"address"=>
22
22
  {"city"=>nil,
@@ -26,44 +26,46 @@ customer.save
26
26
  "postal_code"=>"48120",
27
27
  "state"=>nil},
28
28
  "business_name"=>nil,
29
- "created_at"=>"2014-04-25T20:10:14.759932Z",
29
+ "created_at"=>"2014-05-15T00:41:30.318855Z",
30
30
  "dob_month"=>7,
31
31
  "dob_year"=>1963,
32
32
  "ein"=>nil,
33
33
  "email"=>nil,
34
- "href"=>"/customers/CU4MnFEab304anOtUtEu5hkN",
35
- "id"=>"CU4MnFEab304anOtUtEu5hkN",
34
+ "href"=>"/customers/CU56PvhKAwSiV6LahZCcBMJ7",
35
+ "id"=>"CU56PvhKAwSiV6LahZCcBMJ7",
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-04-25T20:10:15.048688Z"},
42
+ "updated_at"=>"2014-05-15T00:41:34.844176Z"},
43
43
  @hyperlinks=
44
44
  {"bank_accounts"=>
45
- #<Proc:0x007fa93b3ba0d8/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007fa7d40bd230/lib/balanced/utils.rb:6 (lambda)>,
46
46
  "card_holds"=>
47
- #<Proc:0x007fa93b39b8e0/lib/balanced/utils.rb:6 (lambda)>,
47
+ #<Proc:0x007fa7d40b5788/lib/balanced/utils.rb:6 (lambda)>,
48
48
  "cards"=>
49
- #<Proc:0x007fa93b38ac98/lib/balanced/utils.rb:6 (lambda)>,
49
+ #<Proc:0x007fa7d40af860/lib/balanced/utils.rb:6 (lambda)>,
50
50
  "credits"=>
51
- #<Proc:0x007fa93b381170/lib/balanced/utils.rb:6 (lambda)>,
51
+ #<Proc:0x007fa7d40ad9e8/lib/balanced/utils.rb:6 (lambda)>,
52
52
  "debits"=>
53
- #<Proc:0x007fa93b361c30/lib/balanced/utils.rb:6 (lambda)>,
53
+ #<Proc:0x007fa7d409f758/lib/balanced/utils.rb:6 (lambda)>,
54
54
  "destination"=>
55
- #<Proc:0x007fa93b35b240/lib/balanced/utils.rb:6 (lambda)>,
55
+ #<Proc:0x007fa7d409ecb8/lib/balanced/utils.rb:6 (lambda)>,
56
+ "disputes"=>
57
+ #<Proc:0x007fa7d409ca08/lib/balanced/utils.rb:6 (lambda)>,
56
58
  "external_accounts"=>
57
- #<Proc:0x007fa93b33b4b8/lib/balanced/utils.rb:6 (lambda)>,
59
+ #<Proc:0x007fa7d4096950/lib/balanced/utils.rb:6 (lambda)>,
58
60
  "orders"=>
59
- #<Proc:0x007fa93b32bab8/lib/balanced/utils.rb:6 (lambda)>,
61
+ #<Proc:0x007fa7d40947e0/lib/balanced/utils.rb:6 (lambda)>,
60
62
  "refunds"=>
61
- #<Proc:0x007fa93b310a88/lib/balanced/utils.rb:6 (lambda)>,
63
+ #<Proc:0x007fa7d408e750/lib/balanced/utils.rb:6 (lambda)>,
62
64
  "reversals"=>
63
- #<Proc:0x007fa93b31b640/lib/balanced/utils.rb:6 (lambda)>,
65
+ #<Proc:0x007fa7d408c4f0/lib/balanced/utils.rb:6 (lambda)>,
64
66
  "source"=>
65
- #<Proc:0x007fa93b319c28/lib/balanced/utils.rb:6 (lambda)>,
67
+ #<Proc:0x007fa7d4087a90/lib/balanced/utils.rb:6 (lambda)>,
66
68
  "transactions"=>
67
- #<Proc:0x007fa93b305570/lib/balanced/utils.rb:6 (lambda)>}>
69
+ #<Proc:0x007fa7d4085bf0/lib/balanced/utils.rb:6 (lambda)>}>
68
70
 
69
71
  % endif
@@ -2,7 +2,7 @@
2
2
  Balanced::Customer.unstore
3
3
 
4
4
  % elif mode == 'request':
5
- customer = Balanced::Customer.fetch('/customers/CU4MnFEab304anOtUtEu5hkN')
5
+ customer = Balanced::Customer.fetch('/customers/CU56PvhKAwSiV6LahZCcBMJ7')
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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
8
  customers = Balanced::Customer.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Customer:0x007fa93b24f1f8
10
+ [#<Balanced::Customer:0x007fa7d2815548
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -17,46 +17,48 @@ customers = Balanced::Customer.all
17
17
  "postal_code"=>"48120",
18
18
  "state"=>nil},
19
19
  "business_name"=>nil,
20
- "created_at"=>"2014-04-25T20:10:09.606769Z",
20
+ "created_at"=>"2014-05-15T00:41:24.028958Z",
21
21
  "dob_month"=>7,
22
22
  "dob_year"=>1963,
23
23
  "ein"=>nil,
24
24
  "email"=>nil,
25
- "href"=>"/customers/CU4GAx8tZTDNIgAmwfV35e53",
26
- "id"=>"CU4GAx8tZTDNIgAmwfV35e53",
25
+ "href"=>"/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP",
26
+ "id"=>"CU4ZKTtaAaR7Rc5M8EP2gLlP",
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-04-25T20:10:09.810570Z"},
33
+ "updated_at"=>"2014-05-15T00:41:24.914750Z"},
34
34
  @hyperlinks=
35
35
  {"bank_accounts"=>
36
- #<Proc:0x007fa93b225970/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa7d280c9c0/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "card_holds"=>
38
- #<Proc:0x007fa93b214710/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa7d1e7b9d8/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "cards"=>
40
- #<Proc:0x007fa93b204d38/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa7d1e69af8/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "credits"=>
42
- #<Proc:0x007fa93b1f6cb0/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa7d1e5ba98/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "debits"=>
44
- #<Proc:0x007fa93b1e6608/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa7d1e52358/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "destination"=>
46
- #<Proc:0x007fa93b1de2c8/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa7d1e50738/lib/balanced/utils.rb:6 (lambda)>,
47
+ "disputes"=>
48
+ #<Proc:0x007fa7d1e482e0/lib/balanced/utils.rb:6 (lambda)>,
47
49
  "external_accounts"=>
48
- #<Proc:0x007fa93b1c5200/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa7d1e3bb08/lib/balanced/utils.rb:6 (lambda)>,
49
51
  "orders"=>
50
- #<Proc:0x007fa93b17b150/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa7d1e33980/lib/balanced/utils.rb:6 (lambda)>,
51
53
  "refunds"=>
52
- #<Proc:0x007fa93b1a8538/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fa7d1e2a420/lib/balanced/utils.rb:6 (lambda)>,
53
55
  "reversals"=>
54
- #<Proc:0x007fa93b1734c8/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fa7d1e0b1b0/lib/balanced/utils.rb:6 (lambda)>,
55
57
  "source"=>
56
- #<Proc:0x007fa93b1705e8/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fa7d1e0a238/lib/balanced/utils.rb:6 (lambda)>,
57
59
  "transactions"=>
58
- #<Proc:0x007fa93b0fe290/lib/balanced/utils.rb:6 (lambda)>}>,
59
- #<Balanced::Customer:0x007fa93b0fe240
60
+ #<Proc:0x007fa7d1e01cf0/lib/balanced/utils.rb:6 (lambda)>}>,
61
+ #<Balanced::Customer:0x007fa7d1e01c78
60
62
  @attributes=
61
63
  {"address"=>
62
64
  {"city"=>nil,
@@ -66,44 +68,46 @@ customers = Balanced::Customer.all
66
68
  "postal_code"=>"48120",
67
69
  "state"=>nil},
68
70
  "business_name"=>nil,
69
- "created_at"=>"2014-04-25T20:09:28.164202Z",
71
+ "created_at"=>"2014-05-15T00:39:20.790653Z",
70
72
  "dob_month"=>7,
71
73
  "dob_year"=>1963,
72
74
  "ein"=>nil,
73
75
  "email"=>nil,
74
- "href"=>"/customers/CU3VYCUIfwngJsidJWdGw2W5",
75
- "id"=>"CU3VYCUIfwngJsidJWdGw2W5",
76
+ "href"=>"/customers/CU2L981m9AtPY8pjpGpjnjnf",
77
+ "id"=>"CU2L981m9AtPY8pjpGpjnjnf",
76
78
  "links"=>{"destination"=>nil, "source"=>nil},
77
79
  "merchant_status"=>"underwritten",
78
80
  "meta"=>{},
79
81
  "name"=>"Henry Ford",
80
82
  "phone"=>nil,
81
83
  "ssn_last4"=>nil,
82
- "updated_at"=>"2014-04-25T20:09:28.595435Z"},
84
+ "updated_at"=>"2014-05-15T00:39:21.958148Z"},
83
85
  @hyperlinks=
84
86
  {"bank_accounts"=>
85
- #<Proc:0x007fa93b161de0/lib/balanced/utils.rb:6 (lambda)>,
87
+ #<Proc:0x007fa7d1de0898/lib/balanced/utils.rb:6 (lambda)>,
86
88
  "card_holds"=>
87
- #<Proc:0x007fa93b148f20/lib/balanced/utils.rb:6 (lambda)>,
89
+ #<Proc:0x007fa7d1dc9738/lib/balanced/utils.rb:6 (lambda)>,
88
90
  "cards"=>
89
- #<Proc:0x007fa93b12b538/lib/balanced/utils.rb:6 (lambda)>,
91
+ #<Proc:0x007fa7d1dc1a60/lib/balanced/utils.rb:6 (lambda)>,
90
92
  "credits"=>
91
- #<Proc:0x007fa93b118258/lib/balanced/utils.rb:6 (lambda)>,
93
+ #<Proc:0x007fa7d1db8730/lib/balanced/utils.rb:6 (lambda)>,
92
94
  "debits"=>
93
- #<Proc:0x007fa93b0cfa08/lib/balanced/utils.rb:6 (lambda)>,
95
+ #<Proc:0x007fa7d1dab350/lib/balanced/utils.rb:6 (lambda)>,
94
96
  "destination"=>
95
- #<Proc:0x007fa93b0c53a0/lib/balanced/utils.rb:6 (lambda)>,
97
+ #<Proc:0x007fa7d1daa298/lib/balanced/utils.rb:6 (lambda)>,
98
+ "disputes"=>
99
+ #<Proc:0x007fa7d1da1530/lib/balanced/utils.rb:6 (lambda)>,
96
100
  "external_accounts"=>
97
- #<Proc:0x007fa93b0a0898/lib/balanced/utils.rb:6 (lambda)>,
101
+ #<Proc:0x007fa7d1d92328/lib/balanced/utils.rb:6 (lambda)>,
98
102
  "orders"=>
99
- #<Proc:0x007fa93b091708/lib/balanced/utils.rb:6 (lambda)>,
103
+ #<Proc:0x007fa7d1d83170/lib/balanced/utils.rb:6 (lambda)>,
100
104
  "refunds"=>
101
- #<Proc:0x007fa93b043440/lib/balanced/utils.rb:6 (lambda)>,
105
+ #<Proc:0x007fa7d1d79558/lib/balanced/utils.rb:6 (lambda)>,
102
106
  "reversals"=>
103
- #<Proc:0x007fa93e85fb80/lib/balanced/utils.rb:6 (lambda)>,
107
+ #<Proc:0x007fa7d1d71d08/lib/balanced/utils.rb:6 (lambda)>,
104
108
  "source"=>
105
- #<Proc:0x007fa93e85f1a8/lib/balanced/utils.rb:6 (lambda)>,
109
+ #<Proc:0x007fa7d1d70228/lib/balanced/utils.rb:6 (lambda)>,
106
110
  "transactions"=>
107
- #<Proc:0x007fa93e85d308/lib/balanced/utils.rb:6 (lambda)>}>]
111
+ #<Proc:0x007fa7d1d639d8/lib/balanced/utils.rb:6 (lambda)>}>]
108
112
 
109
113
  % endif