balanced 1.0.beta1 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/LICENSE +2 -2
  5. data/balanced.gemspec +1 -1
  6. data/lib/balanced/resources.rb +1 -0
  7. data/lib/balanced/resources/customer.rb +0 -14
  8. data/lib/balanced/resources/dispute.rb +12 -0
  9. data/lib/balanced/version.rb +1 -1
  10. data/scenario.cache +142 -141
  11. data/scenarios/api_key_create/ruby.mako +6 -6
  12. data/scenarios/api_key_delete/ruby.mako +2 -2
  13. data/scenarios/api_key_list/ruby.mako +10 -10
  14. data/scenarios/api_key_show/ruby.mako +6 -6
  15. data/scenarios/bank_account_associate_to_customer/ruby.mako +13 -13
  16. data/scenarios/bank_account_create/ruby.mako +13 -13
  17. data/scenarios/bank_account_credit/ruby.mako +15 -15
  18. data/scenarios/bank_account_debit/ruby.mako +15 -15
  19. data/scenarios/bank_account_delete/ruby.mako +2 -2
  20. data/scenarios/bank_account_list/ruby.mako +22 -22
  21. data/scenarios/bank_account_show/ruby.mako +12 -12
  22. data/scenarios/bank_account_update/ruby.mako +12 -12
  23. data/scenarios/bank_account_verification_create/ruby.mako +9 -9
  24. data/scenarios/bank_account_verification_show/ruby.mako +9 -9
  25. data/scenarios/bank_account_verification_update/ruby.mako +9 -9
  26. data/scenarios/callback_create/ruby.mako +5 -4
  27. data/scenarios/callback_delete/ruby.mako +2 -2
  28. data/scenarios/callback_list/ruby.mako +4 -4
  29. data/scenarios/callback_show/ruby.mako +5 -5
  30. data/scenarios/card_associate_to_customer/ruby.mako +15 -15
  31. data/scenarios/card_create/ruby.mako +14 -14
  32. data/scenarios/card_debit/ruby.mako +16 -16
  33. data/scenarios/card_delete/ruby.mako +2 -2
  34. data/scenarios/card_hold_capture/ruby.mako +16 -16
  35. data/scenarios/card_hold_create/ruby.mako +16 -14
  36. data/scenarios/card_hold_list/ruby.mako +29 -25
  37. data/scenarios/card_hold_show/ruby.mako +16 -14
  38. data/scenarios/card_hold_update/ruby.mako +16 -14
  39. data/scenarios/card_hold_void/ruby.mako +16 -14
  40. data/scenarios/card_list/ruby.mako +24 -24
  41. data/scenarios/card_show/ruby.mako +13 -13
  42. data/scenarios/card_update/ruby.mako +13 -13
  43. data/scenarios/credit_list/ruby.mako +14 -14
  44. data/scenarios/credit_list_bank_account/ruby.mako +2 -2
  45. data/scenarios/credit_show/ruby.mako +15 -15
  46. data/scenarios/credit_update/ruby.mako +15 -15
  47. data/scenarios/customer_create/ruby.mako +19 -17
  48. data/scenarios/customer_delete/ruby.mako +1 -1
  49. data/scenarios/customer_list/ruby.mako +37 -33
  50. data/scenarios/customer_show/ruby.mako +20 -18
  51. data/scenarios/customer_update/ruby.mako +20 -18
  52. data/scenarios/debit_list/ruby.mako +28 -28
  53. data/scenarios/debit_show/ruby.mako +15 -15
  54. data/scenarios/debit_update/ruby.mako +15 -15
  55. data/scenarios/event_list/ruby.mako +67 -20
  56. data/scenarios/event_show/ruby.mako +23 -21
  57. data/scenarios/order_create/ruby.mako +14 -14
  58. data/scenarios/order_list/ruby.mako +13 -13
  59. data/scenarios/order_show/ruby.mako +14 -14
  60. data/scenarios/order_update/ruby.mako +14 -14
  61. data/scenarios/refund_create/ruby.mako +13 -13
  62. data/scenarios/refund_list/ruby.mako +12 -12
  63. data/scenarios/refund_show/ruby.mako +13 -13
  64. data/scenarios/refund_update/ruby.mako +13 -13
  65. data/scenarios/render_mako.rb +0 -1
  66. data/scenarios/reversal_create/ruby.mako +12 -12
  67. data/scenarios/reversal_list/ruby.mako +11 -11
  68. data/scenarios/reversal_show/ruby.mako +12 -12
  69. data/scenarios/reversal_update/ruby.mako +12 -12
  70. data/spec/balanced/resources/bank_account_spec.rb +0 -3
  71. data/spec/balanced/resources/debit_spec.rb +0 -13
  72. data/spec/balanced/resources/dispute_spec.rb +65 -0
  73. metadata +20 -18
  74. data/.rbenv-version +0 -1
@@ -3,39 +3,39 @@ Balanced::Event.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- event = Balanced::Event.fetch('/events/EV2abbb98487a611e3a86f026ba7d31e6f')
8
+ event = Balanced::Event.fetch('/events/EVa26caeeea56411e3838802219cc35fd9')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Event:0x007fdc9d13b420
11
+ #<Balanced::Event:0x007ff2bc0edf10
12
12
  @attributes=
13
13
  {"callback_statuses"=>
14
14
  {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
15
15
  "entity"=>
16
16
  {"customers"=>
17
17
  [{"address"=>
18
- {"city"=>nil,
19
- "country_code"=>nil,
18
+ {"city"=>"Nowhere",
19
+ "country_code"=>"USA",
20
20
  "line1"=>nil,
21
21
  "line2"=>nil,
22
- "postal_code"=>nil,
22
+ "postal_code"=>"90210",
23
23
  "state"=>nil},
24
24
  "business_name"=>nil,
25
- "created_at"=>"2014-01-27T22:55:50.253066Z",
26
- "dob_month"=>nil,
27
- "dob_year"=>nil,
25
+ "created_at"=>"2014-03-06T19:22:12.312268Z",
26
+ "dob_month"=>2,
27
+ "dob_year"=>1947,
28
28
  "ein"=>nil,
29
- "email"=>nil,
30
- "href"=>"/customers/CU1iDnBalzHoZg47Np92rNrV",
31
- "id"=>"CU1iDnBalzHoZg47Np92rNrV",
29
+ "email"=>"whc@example.org",
30
+ "href"=>"/customers/CU4Wt8xSbREzV2NWtdVAFGeR",
31
+ "id"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
32
32
  "links"=>{"destination"=>nil, "source"=>nil},
33
- "merchant_status"=>"no-match",
33
+ "merchant_status"=>"underwritten",
34
34
  "meta"=>{},
35
- "name"=>nil,
36
- "phone"=>nil,
37
- "ssn_last4"=>nil,
38
- "updated_at"=>"2014-01-27T22:55:50.767858Z"}],
35
+ "name"=>"William Henry Cavendish III",
36
+ "phone"=>"+16505551212",
37
+ "ssn_last4"=>"xxxx",
38
+ "updated_at"=>"2014-03-06T19:22:12.718847Z"}],
39
39
  "links"=>
40
40
  {"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
41
41
  "customers.card_holds"=>"/customers/{customers.id}/card_holds",
@@ -43,18 +43,20 @@ event = Balanced::Event.fetch('/events/EV2abbb98487a611e3a86f026ba7d31e6f')
43
43
  "customers.credits"=>"/customers/{customers.id}/credits",
44
44
  "customers.debits"=>"/customers/{customers.id}/debits",
45
45
  "customers.destination"=>"/resources/{customers.destination}",
46
+ "customers.external_accounts"=>
47
+ "/customers/{customers.id}/external_accounts",
46
48
  "customers.orders"=>"/customers/{customers.id}/orders",
47
49
  "customers.refunds"=>"/customers/{customers.id}/refunds",
48
50
  "customers.reversals"=>"/customers/{customers.id}/reversals",
49
51
  "customers.source"=>"/resources/{customers.source}",
50
52
  "customers.transactions"=>"/customers/{customers.id}/transactions"}},
51
- "href"=>"/events/EV2abbb98487a611e3a86f026ba7d31e6f",
52
- "id"=>"EV2abbb98487a611e3a86f026ba7d31e6f",
53
+ "href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
54
+ "id"=>"EVa26caeeea56411e3838802219cc35fd9",
53
55
  "links"=>{},
54
- "occurred_at"=>"2014-01-27T22:55:50.767000Z",
56
+ "occurred_at"=>"2014-03-06T19:22:12.718000Z",
55
57
  "type"=>"account.created"},
56
58
  @hyperlinks=
57
59
  {"callbacks"=>
58
- #<Proc:0x007fdc9d139468/lib/balanced/utils.rb:6 (lambda)>}>
60
+ #<Proc:0x007ff2bc869208/lib/balanced/utils.rb:6 (lambda)>}>
59
61
 
60
62
  % endif
@@ -3,18 +3,18 @@ Balanced::Customer.create_order
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- merchant_customer = Balanced::Customer.fetch('/customers/CU3eeasZ9yQ86uzzIYZkrPGg')
8
+ merchant_customer = Balanced::Customer.fetch('/customers/CU64R7DS6DwuXYVg9RTskFK8')
9
9
  merchant_customer.create_order(
10
10
  :description => 'Order #12341234'
11
11
  )
12
12
  % elif mode == 'response':
13
- #<Balanced::Order:0x007fdc9c1eb948
13
+ #<Balanced::Order:0x007ff2bdb5b0a0
14
14
  @attributes=
15
15
  {"amount"=>0,
16
16
  "amount_escrowed"=>0,
17
- "created_at"=>"2014-01-27T22:58:01.115720Z",
17
+ "created_at"=>"2014-03-06T19:23:39.207291Z",
18
18
  "currency"=>"USD",
19
19
  "delivery_address"=>
20
20
  {"city"=>nil,
@@ -24,23 +24,23 @@ merchant_customer.create_order(
24
24
  "postal_code"=>nil,
25
25
  "state"=>nil},
26
26
  "description"=>"Order #12341234",
27
- "href"=>"/orders/OR3FOihZa7lMHdAP5p8BJZVY",
28
- "id"=>"OR3FOihZa7lMHdAP5p8BJZVY",
29
- "links"=>{"merchant"=>"CU3eeasZ9yQ86uzzIYZkrPGg"},
27
+ "href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
28
+ "id"=>"OR6wcEVkOymvs4PairiGEcIx",
29
+ "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
30
30
  "meta"=>{},
31
- "updated_at"=>"2014-01-27T22:58:01.115723Z"},
31
+ "updated_at"=>"2014-03-06T19:23:39.207294Z"},
32
32
  @hyperlinks=
33
33
  {"buyers"=>
34
- #<Proc:0x007fdc9c1e2320/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007ff2bdb58558/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "credits"=>
36
- #<Proc:0x007fdc9c1e2028/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007ff2bdb529a0/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "debits"=>
38
- #<Proc:0x007fdc9c1d85a0/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007ff2bdb50498/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "merchant"=>
40
- #<Proc:0x007fdc9c1da990/lib/balanced/resources/resource.rb:60 (lambda)>,
40
+ #<Proc:0x007ff2bdb4aed0/lib/balanced/resources/resource.rb:60 (lambda)>,
41
41
  "refunds"=>
42
- #<Proc:0x007fdc9c1d84d8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007ff2bdb48a90/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "reversals"=>
44
- #<Proc:0x007fdc9c1d2588/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007ff2bdb42410/lib/balanced/utils.rb:6 (lambda)>}>
45
45
 
46
46
  % endif
@@ -2,15 +2,15 @@
2
2
  Balanced::Order.all
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
5
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
6
 
7
7
  orders = Balanced::Order.all
8
8
  % elif mode == 'response':
9
- [#<Balanced::Order:0x007fdc9c1a8ff8
9
+ [#<Balanced::Order:0x007ff2bdaf12e0
10
10
  @attributes=
11
11
  {"amount"=>0,
12
12
  "amount_escrowed"=>0,
13
- "created_at"=>"2014-01-27T22:58:01.115720Z",
13
+ "created_at"=>"2014-03-06T19:23:39.207291Z",
14
14
  "currency"=>"USD",
15
15
  "delivery_address"=>
16
16
  {"city"=>nil,
@@ -20,23 +20,23 @@ orders = Balanced::Order.all
20
20
  "postal_code"=>nil,
21
21
  "state"=>nil},
22
22
  "description"=>"Order #12341234",
23
- "href"=>"/orders/OR3FOihZa7lMHdAP5p8BJZVY",
24
- "id"=>"OR3FOihZa7lMHdAP5p8BJZVY",
25
- "links"=>{"merchant"=>"CU3eeasZ9yQ86uzzIYZkrPGg"},
23
+ "href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
24
+ "id"=>"OR6wcEVkOymvs4PairiGEcIx",
25
+ "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
26
26
  "meta"=>{},
27
- "updated_at"=>"2014-01-27T22:58:01.115723Z"},
27
+ "updated_at"=>"2014-03-06T19:23:39.207294Z"},
28
28
  @hyperlinks=
29
29
  {"buyers"=>
30
- #<Proc:0x007fdc9c1a2b30/lib/balanced/utils.rb:6 (lambda)>,
30
+ #<Proc:0x007ff2bdafafe8/lib/balanced/utils.rb:6 (lambda)>,
31
31
  "credits"=>
32
- #<Proc:0x007fdc9c198b30/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007ff2bc93fda8/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "debits"=>
34
- #<Proc:0x007fdc9c19a0c0/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007ff2bc933288/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "merchant"=>
36
- #<Proc:0x007fdc9c198108/lib/balanced/resources/resource.rb:60 (lambda)>,
36
+ #<Proc:0x007ff2bc9317d0/lib/balanced/resources/resource.rb:60 (lambda)>,
37
37
  "refunds"=>
38
- #<Proc:0x007fdc9c1916a0/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007ff2bc92b6f0/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "reversals"=>
40
- #<Proc:0x007fdc9c18b958/lib/balanced/utils.rb:6 (lambda)>}>]
40
+ #<Proc:0x007ff2bc9284a0/lib/balanced/utils.rb:6 (lambda)>}>]
41
41
 
42
42
  % endif
@@ -3,16 +3,16 @@ Balanced::Order.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- order = Balanced::Order.fetch('/orders/OR3FOihZa7lMHdAP5p8BJZVY')
8
+ order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Order:0x007fdc9c166b80
11
+ #<Balanced::Order:0x007ff2bc1a1998
12
12
  @attributes=
13
13
  {"amount"=>0,
14
14
  "amount_escrowed"=>0,
15
- "created_at"=>"2014-01-27T22:58:01.115720Z",
15
+ "created_at"=>"2014-03-06T19:23:39.207291Z",
16
16
  "currency"=>"USD",
17
17
  "delivery_address"=>
18
18
  {"city"=>nil,
@@ -22,23 +22,23 @@ order = Balanced::Order.fetch('/orders/OR3FOihZa7lMHdAP5p8BJZVY')
22
22
  "postal_code"=>nil,
23
23
  "state"=>nil},
24
24
  "description"=>"Order #12341234",
25
- "href"=>"/orders/OR3FOihZa7lMHdAP5p8BJZVY",
26
- "id"=>"OR3FOihZa7lMHdAP5p8BJZVY",
27
- "links"=>{"merchant"=>"CU3eeasZ9yQ86uzzIYZkrPGg"},
25
+ "href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
26
+ "id"=>"OR6wcEVkOymvs4PairiGEcIx",
27
+ "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
28
28
  "meta"=>{},
29
- "updated_at"=>"2014-01-27T22:58:01.115723Z"},
29
+ "updated_at"=>"2014-03-06T19:23:39.207294Z"},
30
30
  @hyperlinks=
31
31
  {"buyers"=>
32
- #<Proc:0x007fdc9c15e570/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007ff2bc19b098/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "credits"=>
34
- #<Proc:0x007fdc9c15c428/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007ff2bdae7f10/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "debits"=>
36
- #<Proc:0x007fdc9c13f2d8/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007ff2bdae5850/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "merchant"=>
38
- #<Proc:0x007fdc9c14c988/lib/balanced/resources/resource.rb:60 (lambda)>,
38
+ #<Proc:0x007ff2bdadfbf8/lib/balanced/resources/resource.rb:60 (lambda)>,
39
39
  "refunds"=>
40
- #<Proc:0x007fdc9c136d18/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007ff2bdad5090/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "reversals"=>
42
- #<Proc:0x007fdc9c1330a0/lib/balanced/utils.rb:6 (lambda)>}>
42
+ #<Proc:0x007ff2bdad4050/lib/balanced/utils.rb:6 (lambda)>}>
43
43
 
44
44
  % endif
@@ -3,9 +3,9 @@ Balanced::Order.save
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- order = Balanced::Order.fetch('/orders/OR3FOihZa7lMHdAP5p8BJZVY')
8
+ order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
9
9
  order.description = 'New description for order'
10
10
  order.meta = {
11
11
  'anykey' => 'valuegoeshere',
@@ -14,11 +14,11 @@ order.meta = {
14
14
  order.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::Order:0x007fdc9c11c5a8
17
+ #<Balanced::Order:0x007ff2bdaa41c0
18
18
  @attributes=
19
19
  {"amount"=>0,
20
20
  "amount_escrowed"=>0,
21
- "created_at"=>"2014-01-27T22:58:01.115720Z",
21
+ "created_at"=>"2014-03-06T19:23:39.207291Z",
22
22
  "currency"=>"USD",
23
23
  "delivery_address"=>
24
24
  {"city"=>nil,
@@ -28,23 +28,23 @@ order.save
28
28
  "postal_code"=>nil,
29
29
  "state"=>nil},
30
30
  "description"=>"New description for order",
31
- "href"=>"/orders/OR3FOihZa7lMHdAP5p8BJZVY",
32
- "id"=>"OR3FOihZa7lMHdAP5p8BJZVY",
33
- "links"=>{"merchant"=>"CU3eeasZ9yQ86uzzIYZkrPGg"},
31
+ "href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
32
+ "id"=>"OR6wcEVkOymvs4PairiGEcIx",
33
+ "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
34
34
  "meta"=>{"anykey"=>"valuegoeshere", "product.id"=>"1234567890"},
35
- "updated_at"=>"2014-01-27T22:58:05.657463Z"},
35
+ "updated_at"=>"2014-03-06T19:23:42.673919Z"},
36
36
  @hyperlinks=
37
37
  {"buyers"=>
38
- #<Proc:0x007fdc9c114470/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007ff2bda9df28/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "credits"=>
40
- #<Proc:0x007fdc9c10e700/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007ff2bda942e8/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "debits"=>
42
- #<Proc:0x007fdc9c10c0b8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007ff2bc8cd050/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "merchant"=>
44
- #<Proc:0x007fdc9c106988/lib/balanced/resources/resource.rb:60 (lambda)>,
44
+ #<Proc:0x007ff2bc8c77b8/lib/balanced/resources/resource.rb:60 (lambda)>,
45
45
  "refunds"=>
46
- #<Proc:0x007fdc9c104200/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007ff2bc8c4810/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "reversals"=>
48
- #<Proc:0x007fdc9c0f67b8/lib/balanced/utils.rb:6 (lambda)>}>
48
+ #<Proc:0x007ff2bc8be6e0/lib/balanced/utils.rb:6 (lambda)>}>
49
49
 
50
50
  % endif
@@ -2,9 +2,9 @@
2
2
  Balanced::Debit.refund
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
5
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
6
 
7
- debit = Balanced::Debit.fetch('/debits/WD3MKNxNTKBGgA7mX50yogiu')
7
+ debit = Balanced::Debit.fetch('/debits/WD6BKYhbRzlRhfKSE1DcpqS5')
8
8
  debit.refund(
9
9
  :amount => 3000,
10
10
  :description => 'Refund for Order #1111',
@@ -16,31 +16,31 @@ debit.refund(
16
16
  )
17
17
 
18
18
  % elif mode == 'response':
19
- #<Balanced::Refund:0x007fdc9c0e1958
19
+ #<Balanced::Refund:0x007ff2bda0ead0
20
20
  @attributes=
21
21
  {"amount"=>3000,
22
- "created_at"=>"2014-01-27T22:58:11.375665Z",
22
+ "created_at"=>"2014-03-06T19:23:46.176138Z",
23
23
  "currency"=>"USD",
24
24
  "description"=>"Refund for Order #1111",
25
- "href"=>"/refunds/RF3RklPuFgsgI50UuYtr4g6I",
26
- "id"=>"RF3RklPuFgsgI50UuYtr4g6I",
25
+ "href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
26
+ "id"=>"RF6HsnqferSuES9VZEWrthG2",
27
27
  "links"=>
28
- {"debit"=>"WD3MKNxNTKBGgA7mX50yogiu", "dispute"=>nil, "order"=>nil},
28
+ {"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
29
29
  "meta"=>
30
30
  {"fulfillment.item.condition"=>"OK",
31
31
  "merchant.feedback"=>"positive",
32
32
  "user.refund_reason"=>"not happy with product"},
33
33
  "status"=>"succeeded",
34
- "transaction_number"=>"RF383-088-7077",
35
- "updated_at"=>"2014-01-27T22:58:12.115131Z"},
34
+ "transaction_number"=>"RF348-549-7723",
35
+ "updated_at"=>"2014-03-06T19:23:48.234584Z"},
36
36
  @hyperlinks=
37
37
  {"debit"=>
38
- #<Proc:0x007fdc9c0d6eb8/lib/balanced/resources/resource.rb:60 (lambda)>,
38
+ #<Proc:0x007ff2bda0c7d0/lib/balanced/resources/resource.rb:60 (lambda)>,
39
39
  "dispute"=>
40
- #<Proc:0x007fdc9c0d5798/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007ff2bda05688/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "events"=>
42
- #<Proc:0x007fdc9c0cf938/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007ff2bda057f0/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "order"=>
44
- #<Proc:0x007fdc9c0cebf0/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007ff2bda04a08/lib/balanced/utils.rb:6 (lambda)>}>
45
45
 
46
46
  % endif
@@ -3,35 +3,35 @@ Balanced::Refund.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
8
  refunds = Balanced::Refund.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Refund:0x007fdc9c09f788
10
+ [#<Balanced::Refund:0x007ff2bd9dcb48
11
11
  @attributes=
12
12
  {"amount"=>3000,
13
- "created_at"=>"2014-01-27T22:58:11.375665Z",
13
+ "created_at"=>"2014-03-06T19:23:46.176138Z",
14
14
  "currency"=>"USD",
15
15
  "description"=>"Refund for Order #1111",
16
- "href"=>"/refunds/RF3RklPuFgsgI50UuYtr4g6I",
17
- "id"=>"RF3RklPuFgsgI50UuYtr4g6I",
16
+ "href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
17
+ "id"=>"RF6HsnqferSuES9VZEWrthG2",
18
18
  "links"=>
19
- {"debit"=>"WD3MKNxNTKBGgA7mX50yogiu", "dispute"=>nil, "order"=>nil},
19
+ {"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
20
20
  "meta"=>
21
21
  {"fulfillment.item.condition"=>"OK",
22
22
  "merchant.feedback"=>"positive",
23
23
  "user.refund_reason"=>"not happy with product"},
24
24
  "status"=>"succeeded",
25
- "transaction_number"=>"RF383-088-7077",
26
- "updated_at"=>"2014-01-27T22:58:12.115131Z"},
25
+ "transaction_number"=>"RF348-549-7723",
26
+ "updated_at"=>"2014-03-06T19:23:48.234584Z"},
27
27
  @hyperlinks=
28
28
  {"debit"=>
29
- #<Proc:0x007fdc9c097d58/lib/balanced/resources/resource.rb:60 (lambda)>,
29
+ #<Proc:0x007ff2bd9d68d8/lib/balanced/resources/resource.rb:60 (lambda)>,
30
30
  "dispute"=>
31
- #<Proc:0x007fdc9c097290/lib/balanced/utils.rb:6 (lambda)>,
31
+ #<Proc:0x007ff2bd9d5ac8/lib/balanced/utils.rb:6 (lambda)>,
32
32
  "events"=>
33
- #<Proc:0x007fdc9c0945b8/lib/balanced/utils.rb:6 (lambda)>,
33
+ #<Proc:0x007ff2bd9cfa38/lib/balanced/utils.rb:6 (lambda)>,
34
34
  "order"=>
35
- #<Proc:0x007fdc9c08c890/lib/balanced/utils.rb:6 (lambda)>}>]
35
+ #<Proc:0x007ff2bd9ceb88/lib/balanced/utils.rb:6 (lambda)>}>]
36
36
 
37
37
  % endif
@@ -3,36 +3,36 @@ Balanced::Refund.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- refund = Balanced::Refund.fetch('/refunds/RF3RklPuFgsgI50UuYtr4g6I')
8
+ refund = Balanced::Refund.fetch('/refunds/RF6HsnqferSuES9VZEWrthG2')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Refund:0x007fdc9b1cd250
11
+ #<Balanced::Refund:0x007ff2bc1125e0
12
12
  @attributes=
13
13
  {"amount"=>3000,
14
- "created_at"=>"2014-01-27T22:58:11.375665Z",
14
+ "created_at"=>"2014-03-06T19:23:46.176138Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>"Refund for Order #1111",
17
- "href"=>"/refunds/RF3RklPuFgsgI50UuYtr4g6I",
18
- "id"=>"RF3RklPuFgsgI50UuYtr4g6I",
17
+ "href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
18
+ "id"=>"RF6HsnqferSuES9VZEWrthG2",
19
19
  "links"=>
20
- {"debit"=>"WD3MKNxNTKBGgA7mX50yogiu", "dispute"=>nil, "order"=>nil},
20
+ {"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
21
21
  "meta"=>
22
22
  {"fulfillment.item.condition"=>"OK",
23
23
  "merchant.feedback"=>"positive",
24
24
  "user.refund_reason"=>"not happy with product"},
25
25
  "status"=>"succeeded",
26
- "transaction_number"=>"RF383-088-7077",
27
- "updated_at"=>"2014-01-27T22:58:12.115131Z"},
26
+ "transaction_number"=>"RF348-549-7723",
27
+ "updated_at"=>"2014-03-06T19:23:48.234584Z"},
28
28
  @hyperlinks=
29
29
  {"debit"=>
30
- #<Proc:0x007fdc9b1c5f28/lib/balanced/resources/resource.rb:60 (lambda)>,
30
+ #<Proc:0x007ff2bd9b5f48/lib/balanced/resources/resource.rb:60 (lambda)>,
31
31
  "dispute"=>
32
- #<Proc:0x007fdc9b1c4c18/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007ff2bd9b6970/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "events"=>
34
- #<Proc:0x007fdc9b1a3d88/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007ff2bd9afb98/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "order"=>
36
- #<Proc:0x007fdc9b198320/lib/balanced/utils.rb:6 (lambda)>}>
36
+ #<Proc:0x007ff2bd9aed38/lib/balanced/utils.rb:6 (lambda)>}>
37
37
 
38
38
  % endif