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,62 +3,62 @@ Balanced::CardHold.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
  holds = Balanced::CardHold.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::CardHold:0x007fa93b7bd4f0
10
+ [#<Balanced::CardHold:0x007fa7d314e920
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
- "created_at"=>"2014-04-25T20:09:41.712497Z",
13
+ "created_at"=>"2014-05-15T00:39:39.384771Z",
14
14
  "currency"=>"USD",
15
15
  "description"=>"Some descriptive text for the debit in the dashboard",
16
- "expires_at"=>"2014-05-02T20:09:41.878825Z",
16
+ "expires_at"=>"2014-05-22T00:39:39.775030Z",
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
20
- "id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
21
- "links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
19
+ "href"=>"/card_holds/HL363Kap0nkbuV050V9DHpjf",
20
+ "id"=>"HL363Kap0nkbuV050V9DHpjf",
21
+ "links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
22
22
  "meta"=>{},
23
23
  "status"=>"succeeded",
24
- "transaction_number"=>"HL244-046-8353",
25
- "updated_at"=>"2014-04-25T20:09:42.023214Z",
24
+ "transaction_number"=>"HL376-078-9747",
25
+ "updated_at"=>"2014-05-15T00:39:40.103344Z",
26
26
  "voided_at"=>nil},
27
27
  @hyperlinks=
28
28
  {"card"=>
29
- #<Proc:0x007fa93b7b79b0/lib/balanced/resources/resource.rb:60 (lambda)>,
29
+ #<Proc:0x007fa7d314c9e0/lib/balanced/resources/resource.rb:60 (lambda)>,
30
30
  "debit"=>
31
- #<Proc:0x007fa93b7b6f60/lib/balanced/utils.rb:6 (lambda)>,
31
+ #<Proc:0x007fa7d314e358/lib/balanced/utils.rb:6 (lambda)>,
32
32
  "debits"=>
33
- #<Proc:0x007fa93b7b4df0/lib/balanced/utils.rb:6 (lambda)>,
33
+ #<Proc:0x007fa7d3149c40/lib/balanced/utils.rb:6 (lambda)>,
34
34
  "events"=>
35
- #<Proc:0x007fa93b7aefb8/lib/balanced/utils.rb:6 (lambda)>}>,
36
- #<Balanced::CardHold:0x007fa93b7aef68
35
+ #<Proc:0x007fa7d3147af8/lib/balanced/utils.rb:6 (lambda)>}>,
36
+ #<Balanced::CardHold:0x007fa7d3147aa8
37
37
  @attributes=
38
38
  {"amount"=>10000000,
39
- "created_at"=>"2014-04-25T20:09:10.201844Z",
39
+ "created_at"=>"2014-05-15T00:38:09.797065Z",
40
40
  "currency"=>"USD",
41
41
  "description"=>nil,
42
- "expires_at"=>"2014-05-02T20:09:10.501460Z",
42
+ "expires_at"=>"2014-05-22T00:38:10.721627Z",
43
43
  "failure_reason"=>nil,
44
44
  "failure_reason_code"=>nil,
45
- "href"=>"/card_holds/HL3BLQCYcUDdnWRrsy01Yqhf",
46
- "id"=>"HL3BLQCYcUDdnWRrsy01Yqhf",
45
+ "href"=>"/card_holds/HL1tiQ6q1MB2h7L4RjznIibT",
46
+ "id"=>"HL1tiQ6q1MB2h7L4RjznIibT",
47
47
  "links"=>
48
- {"card"=>"CC3B0K4gs5gKB5e1wawj8Rgx", "debit"=>"WD3BMUJeA9K2L4m7jqc7w9db"},
48
+ {"card"=>"CC1rSjzxK321d4qkS81yg4zf", "debit"=>"WD1tD4DVB1YM8LnsmmZ5GEHL"},
49
49
  "meta"=>{},
50
50
  "status"=>"succeeded",
51
- "transaction_number"=>"HL048-561-7017",
52
- "updated_at"=>"2014-04-25T20:09:10.970666Z",
51
+ "transaction_number"=>"HL330-466-8498",
52
+ "updated_at"=>"2014-05-15T00:38:16.149117Z",
53
53
  "voided_at"=>nil},
54
54
  @hyperlinks=
55
55
  {"card"=>
56
- #<Proc:0x007fa93b7ad2f8/lib/balanced/resources/resource.rb:60 (lambda)>,
56
+ #<Proc:0x007fa7d3145ac8/lib/balanced/resources/resource.rb:60 (lambda)>,
57
57
  "debit"=>
58
- #<Proc:0x007fa93b7a7948/lib/balanced/resources/resource.rb:60 (lambda)>,
58
+ #<Proc:0x007fa7d3147d28/lib/balanced/resources/resource.rb:60 (lambda)>,
59
59
  "debits"=>
60
- #<Proc:0x007fa93b7a5788/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fa7d3141ba8/lib/balanced/utils.rb:6 (lambda)>,
61
61
  "events"=>
62
- #<Proc:0x007fa93b79f7e8/lib/balanced/utils.rb:6 (lambda)>}>]
62
+ #<Proc:0x007fa7d313f9e8/lib/balanced/utils.rb:6 (lambda)>}>]
63
63
 
64
64
  % endif
@@ -3,36 +3,36 @@ Balanced::CardHold.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
- card_hold = Balanced::CardHold.fetch('/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl')
8
+ card_hold = Balanced::CardHold.fetch('/card_holds/HL363Kap0nkbuV050V9DHpjf')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::CardHold:0x007fa93b774958
11
+ #<Balanced::CardHold:0x007fa7d31ec468
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
- "created_at"=>"2014-04-25T20:09:41.712497Z",
14
+ "created_at"=>"2014-05-15T00:39:39.384771Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>"Some descriptive text for the debit in the dashboard",
17
- "expires_at"=>"2014-05-02T20:09:41.878825Z",
17
+ "expires_at"=>"2014-05-22T00:39:39.775030Z",
18
18
  "failure_reason"=>nil,
19
19
  "failure_reason_code"=>nil,
20
- "href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
21
- "id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
22
- "links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
20
+ "href"=>"/card_holds/HL363Kap0nkbuV050V9DHpjf",
21
+ "id"=>"HL363Kap0nkbuV050V9DHpjf",
22
+ "links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
23
23
  "meta"=>{},
24
24
  "status"=>"succeeded",
25
- "transaction_number"=>"HL244-046-8353",
26
- "updated_at"=>"2014-04-25T20:09:42.023214Z",
25
+ "transaction_number"=>"HL376-078-9747",
26
+ "updated_at"=>"2014-05-15T00:39:40.103344Z",
27
27
  "voided_at"=>nil},
28
28
  @hyperlinks=
29
29
  {"card"=>
30
- #<Proc:0x007fa93b76ecd8/lib/balanced/resources/resource.rb:60 (lambda)>,
30
+ #<Proc:0x007fa7d33b6460/lib/balanced/resources/resource.rb:60 (lambda)>,
31
31
  "debit"=>
32
- #<Proc:0x007fa93b76e300/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa7d33b5768/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "debits"=>
34
- #<Proc:0x007fa93b76c2f8/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa7d33b2cc0/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "events"=>
36
- #<Proc:0x007fa93b766268/lib/balanced/utils.rb:6 (lambda)>}>
36
+ #<Proc:0x007fa7d33b08d0/lib/balanced/utils.rb:6 (lambda)>}>
37
37
 
38
38
  % endif
@@ -3,9 +3,9 @@ Balanced::CardHold.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
- card_hold = Balanced::CardHold.fetch('/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl')
8
+ card_hold = Balanced::CardHold.fetch('/card_holds/HL363Kap0nkbuV050V9DHpjf')
9
9
  card_hold.description = 'update this description'
10
10
  card_hold.meta = {
11
11
  'holding.for' => 'user1',
@@ -14,31 +14,31 @@ card_hold.meta = {
14
14
  card_hold.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::CardHold:0x007fa93b74c868
17
+ #<Balanced::CardHold:0x007fa7d3391ca0
18
18
  @attributes=
19
19
  {"amount"=>5000,
20
- "created_at"=>"2014-04-25T20:09:41.712497Z",
20
+ "created_at"=>"2014-05-15T00:39:39.384771Z",
21
21
  "currency"=>"USD",
22
22
  "description"=>"update this description",
23
- "expires_at"=>"2014-05-02T20:09:41.878825Z",
23
+ "expires_at"=>"2014-05-22T00:39:39.775030Z",
24
24
  "failure_reason"=>nil,
25
25
  "failure_reason_code"=>nil,
26
- "href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
27
- "id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
28
- "links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
26
+ "href"=>"/card_holds/HL363Kap0nkbuV050V9DHpjf",
27
+ "id"=>"HL363Kap0nkbuV050V9DHpjf",
28
+ "links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
29
29
  "meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
30
30
  "status"=>"succeeded",
31
- "transaction_number"=>"HL244-046-8353",
32
- "updated_at"=>"2014-04-25T20:09:45.729280Z",
31
+ "transaction_number"=>"HL376-078-9747",
32
+ "updated_at"=>"2014-05-15T00:39:44.237965Z",
33
33
  "voided_at"=>nil},
34
34
  @hyperlinks=
35
35
  {"card"=>
36
- #<Proc:0x007fa93b746c10/lib/balanced/resources/resource.rb:60 (lambda)>,
36
+ #<Proc:0x007fa7d338f6a8/lib/balanced/resources/resource.rb:60 (lambda)>,
37
37
  "debit"=>
38
- #<Proc:0x007fa93b745f90/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa7d338e690/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "debits"=>
40
- #<Proc:0x007fa93b746788/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa7d338b788/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "events"=>
42
- #<Proc:0x007fa93b73dcf0/lib/balanced/utils.rb:6 (lambda)>}>
42
+ #<Proc:0x007fa7d3389690/lib/balanced/utils.rb:6 (lambda)>}>
43
43
 
44
44
  % endif
@@ -3,36 +3,36 @@ Balanced::CardHold.unstore
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
- card_hold = Balanced::CardHold.fetch('/card_holds/HL4joUazeM3BJE6emmv2Q8EF')
8
+ card_hold = Balanced::CardHold.fetch('/card_holds/HL3GI4qAmsr7ZdOzUgVuzmOF')
9
9
  card_hold.unstore
10
10
  % elif mode == 'response':
11
- #<Balanced::CardHold:0x007fa93b71db58
11
+ #<Balanced::CardHold:0x007fa7d3370230
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
- "created_at"=>"2014-04-25T20:09:48.990540Z",
14
+ "created_at"=>"2014-05-15T00:40:11.970823Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>"Some descriptive text for the debit in the dashboard",
17
- "expires_at"=>"2014-05-02T20:09:49.096484Z",
17
+ "expires_at"=>"2014-05-22T00:40:17.141216Z",
18
18
  "failure_reason"=>nil,
19
19
  "failure_reason_code"=>nil,
20
- "href"=>"/card_holds/HL4joUazeM3BJE6emmv2Q8EF",
21
- "id"=>"HL4joUazeM3BJE6emmv2Q8EF",
22
- "links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
20
+ "href"=>"/card_holds/HL3GI4qAmsr7ZdOzUgVuzmOF",
21
+ "id"=>"HL3GI4qAmsr7ZdOzUgVuzmOF",
22
+ "links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
23
23
  "meta"=>{},
24
24
  "status"=>"succeeded",
25
- "transaction_number"=>"HL161-849-8610",
26
- "updated_at"=>"2014-04-25T20:09:49.731653Z",
27
- "voided_at"=>"2014-04-25T20:09:49.731656Z"},
25
+ "transaction_number"=>"HL069-470-2887",
26
+ "updated_at"=>"2014-05-15T00:40:27.177705Z",
27
+ "voided_at"=>"2014-05-15T00:40:27.177708Z"},
28
28
  @hyperlinks=
29
29
  {"card"=>
30
- #<Proc:0x007fa93b71f9d0/lib/balanced/resources/resource.rb:60 (lambda)>,
30
+ #<Proc:0x007fa7d336a448/lib/balanced/resources/resource.rb:60 (lambda)>,
31
31
  "debit"=>
32
- #<Proc:0x007fa93b717618/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa7d3369ac0/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "debits"=>
34
- #<Proc:0x007fa93b715520/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa7d3363a30/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "events"=>
36
- #<Proc:0x007fa93b70f698/lib/balanced/utils.rb:6 (lambda)>}>
36
+ #<Proc:0x007fa7d3361a28/lib/balanced/utils.rb:6 (lambda)>}>
37
37
 
38
38
  % endif
@@ -2,11 +2,11 @@
2
2
  Balanced::Card.all
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
5
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
6
 
7
7
  cards = Balanced::Card.all
8
8
  % elif mode == 'response':
9
- [#<Balanced::Card:0x007fa93b6f4618
9
+ [#<Balanced::Card:0x007fa7d3349590
10
10
  @attributes=
11
11
  {"address"=>
12
12
  {"city"=>nil,
@@ -18,8 +18,12 @@ cards = Balanced::Card.all
18
18
  "avs_postal_match"=>nil,
19
19
  "avs_result"=>nil,
20
20
  "avs_street_match"=>nil,
21
+ "bank"=>"BANK OF HAWAII",
21
22
  "brand"=>"MasterCard",
22
- "created_at"=>"2014-04-25T20:09:52.175221Z",
23
+ "can_credit"=>false,
24
+ "can_debit"=>true,
25
+ "category"=>nil,
26
+ "created_at"=>"2014-05-15T00:40:43.949061Z",
23
27
  "cvv"=>"xxx",
24
28
  "cvv_match"=>"yes",
25
29
  "cvv_result"=>"Match",
@@ -27,22 +31,27 @@ cards = Balanced::Card.all
27
31
  "expiration_year"=>2020,
28
32
  "fingerprint"=>
29
33
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
30
- "href"=>"/cards/CC4mYF7dj7X6OA2K5F0Qyb4N",
31
- "id"=>"CC4mYF7dj7X6OA2K5F0Qyb4N",
34
+ "href"=>"/cards/CC4gG6BE70pMOYKPBive9qoF",
35
+ "id"=>"CC4gG6BE70pMOYKPBive9qoF",
32
36
  "is_verified"=>true,
33
37
  "links"=>{"customer"=>nil},
34
38
  "meta"=>{},
35
39
  "name"=>nil,
36
40
  "number"=>"xxxxxxxxxxxx5100",
37
- "updated_at"=>"2014-04-25T20:09:52.175224Z"},
41
+ "type"=>"",
42
+ "updated_at"=>"2014-05-15T00:40:43.949064Z"},
38
43
  @hyperlinks=
39
44
  {"card_holds"=>
40
- #<Proc:0x007fa93b6ee128/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007fa7d3346bb0/lib/balanced/utils.rb:6 (lambda)>,
46
+ "credits"=>
47
+ #<Proc:0x007fa7d3343af0/lib/balanced/utils.rb:6 (lambda)>,
41
48
  "customer"=>
42
- #<Proc:0x007fa93b6ed638/lib/balanced/utils.rb:6 (lambda)>,
49
+ #<Proc:0x007fa7d3343140/lib/balanced/utils.rb:6 (lambda)>,
43
50
  "debits"=>
44
- #<Proc:0x007fa93b6e77b0/lib/balanced/utils.rb:6 (lambda)>}>,
45
- #<Balanced::Card:0x007fa93b6e7760
51
+ #<Proc:0x007fa7d3341278/lib/balanced/utils.rb:6 (lambda)>,
52
+ "disputes"=>
53
+ #<Proc:0x007fa7d333b0a8/lib/balanced/utils.rb:6 (lambda)>}>,
54
+ #<Balanced::Card:0x007fa7d333b058
46
55
  @attributes=
47
56
  {"address"=>
48
57
  {"city"=>nil,
@@ -54,8 +63,12 @@ cards = Balanced::Card.all
54
63
  "avs_postal_match"=>nil,
55
64
  "avs_result"=>nil,
56
65
  "avs_street_match"=>nil,
66
+ "bank"=>"BANK OF HAWAII",
57
67
  "brand"=>"MasterCard",
58
- "created_at"=>"2014-04-25T20:09:41.078409Z",
68
+ "can_credit"=>false,
69
+ "can_debit"=>true,
70
+ "category"=>nil,
71
+ "created_at"=>"2014-05-15T00:39:38.599386Z",
59
72
  "cvv"=>"xxx",
60
73
  "cvv_match"=>"yes",
61
74
  "cvv_result"=>"Match",
@@ -63,20 +76,25 @@ cards = Balanced::Card.all
63
76
  "expiration_year"=>2020,
64
77
  "fingerprint"=>
65
78
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
66
- "href"=>"/cards/CC4auQXiAWMBxJcEUIMYeZFj",
67
- "id"=>"CC4auQXiAWMBxJcEUIMYeZFj",
79
+ "href"=>"/cards/CC35aRYQB8XnL0CxtKGFG7d3",
80
+ "id"=>"CC35aRYQB8XnL0CxtKGFG7d3",
68
81
  "is_verified"=>true,
69
- "links"=>{"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
82
+ "links"=>{"customer"=>nil},
70
83
  "meta"=>{},
71
84
  "name"=>nil,
72
85
  "number"=>"xxxxxxxxxxxx5100",
73
- "updated_at"=>"2014-04-25T20:09:41.708881Z"},
86
+ "type"=>"",
87
+ "updated_at"=>"2014-05-15T00:39:38.599390Z"},
74
88
  @hyperlinks=
75
89
  {"card_holds"=>
76
- #<Proc:0x007fa93b6e5618/lib/balanced/utils.rb:6 (lambda)>,
90
+ #<Proc:0x007fa7d3338e98/lib/balanced/utils.rb:6 (lambda)>,
91
+ "credits"=>
92
+ #<Proc:0x007fa7d3332f98/lib/balanced/utils.rb:6 (lambda)>,
77
93
  "customer"=>
78
- #<Proc:0x007fa93b6df628/lib/balanced/resources/resource.rb:60 (lambda)>,
94
+ #<Proc:0x007fa7d3332598/lib/balanced/utils.rb:6 (lambda)>,
79
95
  "debits"=>
80
- #<Proc:0x007fa93b6dd760/lib/balanced/utils.rb:6 (lambda)>}>]
96
+ #<Proc:0x007fa7d3330040/lib/balanced/utils.rb:6 (lambda)>,
97
+ "disputes"=>
98
+ #<Proc:0x007fa7d3329920/lib/balanced/utils.rb:6 (lambda)>}>]
81
99
 
82
100
  % endif
@@ -3,11 +3,11 @@ Balanced::Card.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
- card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
8
+ card = Balanced::Card.fetch('/cards/CC4gG6BE70pMOYKPBive9qoF')
9
9
  % elif mode == 'response':
10
- #<Balanced::Card:0x007fa93b667998
10
+ #<Balanced::Card:0x007fa7d32ed1c8
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -19,8 +19,12 @@ card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
19
19
  "avs_postal_match"=>nil,
20
20
  "avs_result"=>nil,
21
21
  "avs_street_match"=>nil,
22
+ "bank"=>"BANK OF HAWAII",
22
23
  "brand"=>"MasterCard",
23
- "created_at"=>"2014-04-25T20:09:52.175221Z",
24
+ "can_credit"=>false,
25
+ "can_debit"=>true,
26
+ "category"=>nil,
27
+ "created_at"=>"2014-05-15T00:40:43.949061Z",
24
28
  "cvv"=>"xxx",
25
29
  "cvv_match"=>"yes",
26
30
  "cvv_result"=>"Match",
@@ -28,20 +32,25 @@ card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
28
32
  "expiration_year"=>2020,
29
33
  "fingerprint"=>
30
34
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
31
- "href"=>"/cards/CC4mYF7dj7X6OA2K5F0Qyb4N",
32
- "id"=>"CC4mYF7dj7X6OA2K5F0Qyb4N",
35
+ "href"=>"/cards/CC4gG6BE70pMOYKPBive9qoF",
36
+ "id"=>"CC4gG6BE70pMOYKPBive9qoF",
33
37
  "is_verified"=>true,
34
38
  "links"=>{"customer"=>nil},
35
39
  "meta"=>{},
36
40
  "name"=>nil,
37
41
  "number"=>"xxxxxxxxxxxx5100",
38
- "updated_at"=>"2014-04-25T20:09:52.175224Z"},
42
+ "type"=>"",
43
+ "updated_at"=>"2014-05-15T00:40:43.949064Z"},
39
44
  @hyperlinks=
40
45
  {"card_holds"=>
41
- #<Proc:0x007fa93b65f1d0/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa7d32ea770/lib/balanced/utils.rb:6 (lambda)>,
47
+ "credits"=>
48
+ #<Proc:0x007fa7d32e8628/lib/balanced/utils.rb:6 (lambda)>,
42
49
  "customer"=>
43
- #<Proc:0x007fa93b65c610/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa7d32e7bb0/lib/balanced/utils.rb:6 (lambda)>,
44
51
  "debits"=>
45
- #<Proc:0x007fa93b654140/lib/balanced/utils.rb:6 (lambda)>}>
52
+ #<Proc:0x007fa7d32e5c70/lib/balanced/utils.rb:6 (lambda)>,
53
+ "disputes"=>
54
+ #<Proc:0x007fa7d32b3478/lib/balanced/utils.rb:6 (lambda)>}>
46
55
 
47
56
  % endif
@@ -3,9 +3,9 @@ Balanced::Card.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
- card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
8
+ card = Balanced::Card.fetch('/cards/CC4gG6BE70pMOYKPBive9qoF')
9
9
  card.meta = {
10
10
  'facebook.user_id' => '0192837465',
11
11
  'my-own-customer-id' => '12345',
@@ -14,7 +14,7 @@ card.meta = {
14
14
  card.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::Card:0x007fa93b5e48b8
17
+ #<Balanced::Card:0x007fa7d4216410
18
18
  @attributes=
19
19
  {"address"=>
20
20
  {"city"=>nil,
@@ -26,8 +26,12 @@ card.save
26
26
  "avs_postal_match"=>nil,
27
27
  "avs_result"=>nil,
28
28
  "avs_street_match"=>nil,
29
+ "bank"=>"BANK OF HAWAII",
29
30
  "brand"=>"MasterCard",
30
- "created_at"=>"2014-04-25T20:09:52.175221Z",
31
+ "can_credit"=>false,
32
+ "can_debit"=>true,
33
+ "category"=>nil,
34
+ "created_at"=>"2014-05-15T00:40:43.949061Z",
31
35
  "cvv"=>"xxx",
32
36
  "cvv_match"=>"yes",
33
37
  "cvv_result"=>"Match",
@@ -35,8 +39,8 @@ card.save
35
39
  "expiration_year"=>2020,
36
40
  "fingerprint"=>
37
41
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
38
- "href"=>"/cards/CC4mYF7dj7X6OA2K5F0Qyb4N",
39
- "id"=>"CC4mYF7dj7X6OA2K5F0Qyb4N",
42
+ "href"=>"/cards/CC4gG6BE70pMOYKPBive9qoF",
43
+ "id"=>"CC4gG6BE70pMOYKPBive9qoF",
40
44
  "is_verified"=>true,
41
45
  "links"=>{"customer"=>nil},
42
46
  "meta"=>
@@ -45,13 +49,18 @@ card.save
45
49
  "twitter.id"=>"1234987650"},
46
50
  "name"=>nil,
47
51
  "number"=>"xxxxxxxxxxxx5100",
48
- "updated_at"=>"2014-04-25T20:09:55.802789Z"},
52
+ "type"=>"",
53
+ "updated_at"=>"2014-05-15T00:40:47.925893Z"},
49
54
  @hyperlinks=
50
55
  {"card_holds"=>
51
- #<Proc:0x007fa93b5cee78/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fa7d420ff20/lib/balanced/utils.rb:6 (lambda)>,
57
+ "credits"=>
58
+ #<Proc:0x007fa7d420da90/lib/balanced/utils.rb:6 (lambda)>,
52
59
  "customer"=>
53
- #<Proc:0x007fa93b5c2ee8/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fa7d420cfa0/lib/balanced/utils.rb:6 (lambda)>,
54
61
  "debits"=>
55
- #<Proc:0x007fa93b5b3d80/lib/balanced/utils.rb:6 (lambda)>}>
62
+ #<Proc:0x007fa7d4205ca0/lib/balanced/utils.rb:6 (lambda)>,
63
+ "disputes"=>
64
+ #<Proc:0x007fa7d41ff3f0/lib/balanced/utils.rb:6 (lambda)>}>
56
65
 
57
66
  % endif