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,60 +3,55 @@ Balanced::Event.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
- event = Balanced::Event.fetch('/events/EVa26caeeea56411e3838802219cc35fd9')
8
+ event = Balanced::Event.fetch('/events/EV754ca810ccb511e3b6ef061e5f402045')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Event:0x007fa4e2919ba8
11
+ #<Balanced::Event:0x007fa93e99cfc0
12
12
  @attributes=
13
13
  {"callback_statuses"=>
14
14
  {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
15
15
  "entity"=>
16
- {"customers"=>
17
- [{"address"=>
18
- {"city"=>"Nowhere",
19
- "country_code"=>"USA",
16
+ {"bank_accounts"=>
17
+ [{"account_number"=>"xxxxxxxxxxx5555",
18
+ "account_type"=>"CHECKING",
19
+ "address"=>
20
+ {"city"=>nil,
21
+ "country_code"=>nil,
20
22
  "line1"=>nil,
21
23
  "line2"=>nil,
22
- "postal_code"=>"90210",
24
+ "postal_code"=>nil,
23
25
  "state"=>nil},
24
- "business_name"=>nil,
25
- "created_at"=>"2014-03-06T19:22:12.312268Z",
26
- "dob_month"=>2,
27
- "dob_year"=>1947,
28
- "ein"=>nil,
29
- "email"=>"whc@example.org",
30
- "href"=>"/customers/CU4Wt8xSbREzV2NWtdVAFGeR",
31
- "id"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
32
- "links"=>{"destination"=>nil, "source"=>nil},
33
- "merchant_status"=>"underwritten",
26
+ "bank_name"=>"WELLS FARGO BANK NA",
27
+ "can_credit"=>true,
28
+ "can_debit"=>true,
29
+ "created_at"=>"2014-04-25T20:09:08.031387Z",
30
+ "fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
31
+ "href"=>"/bank_accounts/BA3z8ko53HDEFwxjmNlc998p",
32
+ "id"=>"BA3z8ko53HDEFwxjmNlc998p",
33
+ "links"=>
34
+ {"bank_account_verification"=>nil,
35
+ "customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
34
36
  "meta"=>{},
35
- "name"=>"William Henry Cavendish III",
36
- "phone"=>"+16505551212",
37
- "ssn_last4"=>"xxxx",
38
- "updated_at"=>"2014-03-06T19:22:12.718847Z"}],
37
+ "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
38
+ "routing_number"=>"121042882",
39
+ "updated_at"=>"2014-04-25T20:09:08.031391Z"}],
39
40
  "links"=>
40
- {"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
41
- "customers.card_holds"=>"/customers/{customers.id}/card_holds",
42
- "customers.cards"=>"/customers/{customers.id}/cards",
43
- "customers.credits"=>"/customers/{customers.id}/credits",
44
- "customers.debits"=>"/customers/{customers.id}/debits",
45
- "customers.destination"=>"/resources/{customers.destination}",
46
- "customers.external_accounts"=>
47
- "/customers/{customers.id}/external_accounts",
48
- "customers.orders"=>"/customers/{customers.id}/orders",
49
- "customers.refunds"=>"/customers/{customers.id}/refunds",
50
- "customers.reversals"=>"/customers/{customers.id}/reversals",
51
- "customers.source"=>"/resources/{customers.source}",
52
- "customers.transactions"=>"/customers/{customers.id}/transactions"}},
53
- "href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
54
- "id"=>"EVa26caeeea56411e3838802219cc35fd9",
41
+ {"bank_accounts.bank_account_verification"=>
42
+ "/verifications/{bank_accounts.bank_account_verification}",
43
+ "bank_accounts.bank_account_verifications"=>
44
+ "/bank_accounts/{bank_accounts.id}/verifications",
45
+ "bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
46
+ "bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
47
+ "bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
48
+ "href"=>"/events/EV754ca810ccb511e3b6ef061e5f402045",
49
+ "id"=>"EV754ca810ccb511e3b6ef061e5f402045",
55
50
  "links"=>{},
56
- "occurred_at"=>"2014-03-06T19:22:12.718000Z",
57
- "type"=>"account.created"},
51
+ "occurred_at"=>"2014-04-25T20:09:08.031000Z",
52
+ "type"=>"bank_account.created"},
58
53
  @hyperlinks=
59
54
  {"callbacks"=>
60
- #<Proc:0x007fa4e291a1c0/lib/balanced/utils.rb:6 (lambda)>}>
55
+ #<Proc:0x007fa93e997c50/lib/balanced/utils.rb:6 (lambda)>}>
61
56
 
62
57
  % 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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
- merchant_customer = Balanced::Customer.fetch('/customers/CU64R7DS6DwuXYVg9RTskFK8')
8
+ merchant_customer = Balanced::Customer.fetch('/customers/CU4MnFEab304anOtUtEu5hkN')
9
9
  merchant_customer.create_order(
10
10
  :description => 'Order #12341234'
11
11
  )
12
12
  % elif mode == 'response':
13
- #<Balanced::Order:0x007fa4e494d398
13
+ #<Balanced::Order:0x007fa93e965318
14
14
  @attributes=
15
15
  {"amount"=>0,
16
16
  "amount_escrowed"=>0,
17
- "created_at"=>"2014-03-06T19:23:39.207291Z",
17
+ "created_at"=>"2014-04-25T20:18:43.120760Z",
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/OR6wcEVkOymvs4PairiGEcIx",
28
- "id"=>"OR6wcEVkOymvs4PairiGEcIx",
29
- "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
27
+ "href"=>"/orders/OR6d55qbtKx5aWSURkQeodRr",
28
+ "id"=>"OR6d55qbtKx5aWSURkQeodRr",
29
+ "links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
30
30
  "meta"=>{},
31
- "updated_at"=>"2014-03-06T19:23:39.207294Z"},
31
+ "updated_at"=>"2014-04-25T20:18:43.120762Z"},
32
32
  @hyperlinks=
33
33
  {"buyers"=>
34
- #<Proc:0x007fa4e49466b0/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa93e95f008/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "credits"=>
36
- #<Proc:0x007fa4e493ef78/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa93e95cba0/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "debits"=>
38
- #<Proc:0x007fa4e493ce58/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa93e956b10/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "merchant"=>
40
- #<Proc:0x007fa4e4934af0/lib/balanced/resources/resource.rb:60 (lambda)>,
40
+ #<Proc:0x007fa93e955008/lib/balanced/resources/resource.rb:60 (lambda)>,
41
41
  "refunds"=>
42
- #<Proc:0x007fa4e4127d30/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93e94f018/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "reversals"=>
44
- #<Proc:0x007fa4e411fe50/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007fa93e94d038/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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
6
 
7
7
  orders = Balanced::Order.all
8
8
  % elif mode == 'response':
9
- [#<Balanced::Order:0x007fa4e40fd5a8
9
+ [#<Balanced::Order:0x007fa93e866c50
10
10
  @attributes=
11
11
  {"amount"=>0,
12
12
  "amount_escrowed"=>0,
13
- "created_at"=>"2014-03-06T19:23:39.207291Z",
13
+ "created_at"=>"2014-04-25T20:18:43.120760Z",
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/OR6wcEVkOymvs4PairiGEcIx",
24
- "id"=>"OR6wcEVkOymvs4PairiGEcIx",
25
- "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
23
+ "href"=>"/orders/OR6d55qbtKx5aWSURkQeodRr",
24
+ "id"=>"OR6d55qbtKx5aWSURkQeodRr",
25
+ "links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
26
26
  "meta"=>{},
27
- "updated_at"=>"2014-03-06T19:23:39.207294Z"},
27
+ "updated_at"=>"2014-04-25T20:18:43.120762Z"},
28
28
  @hyperlinks=
29
29
  {"buyers"=>
30
- #<Proc:0x007fa4e40f41b0/lib/balanced/utils.rb:6 (lambda)>,
30
+ #<Proc:0x007fa93e864338/lib/balanced/utils.rb:6 (lambda)>,
31
31
  "credits"=>
32
- #<Proc:0x007fa4e40e1628/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa93e8563f0/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "debits"=>
34
- #<Proc:0x007fa4e40dcec0/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa93e854500/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "merchant"=>
36
- #<Proc:0x007fa4e40de9c8/lib/balanced/resources/resource.rb:60 (lambda)>,
36
+ #<Proc:0x007fa93e84ea38/lib/balanced/resources/resource.rb:60 (lambda)>,
37
37
  "refunds"=>
38
- #<Proc:0x007fa4e40d75b0/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa93e84cbc0/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "reversals"=>
40
- #<Proc:0x007fa4e40d5260/lib/balanced/utils.rb:6 (lambda)>}>]
40
+ #<Proc:0x007fa93e846bd0/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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
- order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
8
+ order = Balanced::Order.fetch('/orders/OR6d55qbtKx5aWSURkQeodRr')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Order:0x007fa4e48f7e48
11
+ #<Balanced::Order:0x007fa93e82ee68
12
12
  @attributes=
13
13
  {"amount"=>0,
14
14
  "amount_escrowed"=>0,
15
- "created_at"=>"2014-03-06T19:23:39.207291Z",
15
+ "created_at"=>"2014-04-25T20:18:43.120760Z",
16
16
  "currency"=>"USD",
17
17
  "delivery_address"=>
18
18
  {"city"=>nil,
@@ -22,23 +22,23 @@ order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
22
22
  "postal_code"=>nil,
23
23
  "state"=>nil},
24
24
  "description"=>"Order #12341234",
25
- "href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
26
- "id"=>"OR6wcEVkOymvs4PairiGEcIx",
27
- "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
25
+ "href"=>"/orders/OR6d55qbtKx5aWSURkQeodRr",
26
+ "id"=>"OR6d55qbtKx5aWSURkQeodRr",
27
+ "links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
28
28
  "meta"=>{},
29
- "updated_at"=>"2014-03-06T19:23:39.207294Z"},
29
+ "updated_at"=>"2014-04-25T20:18:43.120762Z"},
30
30
  @hyperlinks=
31
31
  {"buyers"=>
32
- #<Proc:0x007fa4e48f4e78/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa93e819db0/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "credits"=>
34
- #<Proc:0x007fa4e48eda60/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa93e827dc0/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "debits"=>
36
- #<Proc:0x007fa4e48d76e8/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa93e825750/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "merchant"=>
38
- #<Proc:0x007fa4e48e6e68/lib/balanced/resources/resource.rb:60 (lambda)>,
38
+ #<Proc:0x007fa93e8139b0/lib/balanced/resources/resource.rb:60 (lambda)>,
39
39
  "refunds"=>
40
- #<Proc:0x007fa4e48e58b0/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa93e80bd50/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "reversals"=>
42
- #<Proc:0x007fa4e48d3390/lib/balanced/utils.rb:6 (lambda)>}>
42
+ #<Proc:0x007fa93e8093e8/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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
- order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
8
+ order = Balanced::Order.fetch('/orders/OR6d55qbtKx5aWSURkQeodRr')
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:0x007fa4e3201838
17
+ #<Balanced::Order:0x007fa93b7e6058
18
18
  @attributes=
19
19
  {"amount"=>0,
20
20
  "amount_escrowed"=>0,
21
- "created_at"=>"2014-03-06T19:23:39.207291Z",
21
+ "created_at"=>"2014-04-25T20:18:43.120760Z",
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/OR6wcEVkOymvs4PairiGEcIx",
32
- "id"=>"OR6wcEVkOymvs4PairiGEcIx",
33
- "links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
31
+ "href"=>"/orders/OR6d55qbtKx5aWSURkQeodRr",
32
+ "id"=>"OR6d55qbtKx5aWSURkQeodRr",
33
+ "links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
34
34
  "meta"=>{"anykey"=>"valuegoeshere", "product.id"=>"1234567890"},
35
- "updated_at"=>"2014-03-06T19:23:42.673919Z"},
35
+ "updated_at"=>"2014-04-25T20:18:46.797463Z"},
36
36
  @hyperlinks=
37
37
  {"buyers"=>
38
- #<Proc:0x007fa4e31ca748/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa93b7dfe60/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "credits"=>
40
- #<Proc:0x007fa4e31b91a0/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa93b7ddfe8/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "debits"=>
42
- #<Proc:0x007fa4e31a0d30/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93b7dc148/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "merchant"=>
44
- #<Proc:0x007fa4e48a7b00/lib/balanced/resources/resource.rb:60 (lambda)>,
44
+ #<Proc:0x007fa93b7d66a8/lib/balanced/resources/resource.rb:60 (lambda)>,
45
45
  "refunds"=>
46
- #<Proc:0x007fa4e319b060/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa93b7d4830/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "reversals"=>
48
- #<Proc:0x007fa4e488e510/lib/balanced/utils.rb:6 (lambda)>}>
48
+ #<Proc:0x007fa93b7ce908/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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
5
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
6
 
7
- debit = Balanced::Debit.fetch('/debits/WD6BKYhbRzlRhfKSE1DcpqS5')
7
+ debit = Balanced::Debit.fetch('/debits/WD4SOTNKiZbBFrmMk6mfszIl')
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:0x007fa4e30f0958
19
+ #<Balanced::Refund:0x007fa93b7ad5f0
20
20
  @attributes=
21
21
  {"amount"=>3000,
22
- "created_at"=>"2014-03-06T19:23:46.176138Z",
22
+ "created_at"=>"2014-04-25T20:10:22.593252Z",
23
23
  "currency"=>"USD",
24
24
  "description"=>"Refund for Order #1111",
25
- "href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
26
- "id"=>"RF6HsnqferSuES9VZEWrthG2",
25
+ "href"=>"/refunds/RF4VbbS5LdgSxlECITkHg0Zf",
26
+ "id"=>"RF4VbbS5LdgSxlECITkHg0Zf",
27
27
  "links"=>
28
- {"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
28
+ {"debit"=>"WD4SOTNKiZbBFrmMk6mfszIl", "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"=>"RF348-549-7723",
35
- "updated_at"=>"2014-03-06T19:23:48.234584Z"},
34
+ "transaction_number"=>"RF854-846-2859",
35
+ "updated_at"=>"2014-04-25T20:10:23.032505Z"},
36
36
  @hyperlinks=
37
37
  {"debit"=>
38
- #<Proc:0x007fa4e30e0288/lib/balanced/resources/resource.rb:60 (lambda)>,
38
+ #<Proc:0x007fa93b7a79c0/lib/balanced/resources/resource.rb:60 (lambda)>,
39
39
  "dispute"=>
40
- #<Proc:0x007fa4e30da130/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa93b7a6fe8/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "events"=>
42
- #<Proc:0x007fa4e30cb6a8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa93b7a5058/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "order"=>
44
- #<Proc:0x007fa4e30c0410/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007fa93b7a4680/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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
8
  refunds = Balanced::Refund.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Refund:0x007fa4e3039898
10
+ [#<Balanced::Refund:0x007fa93b7854d8
11
11
  @attributes=
12
12
  {"amount"=>3000,
13
- "created_at"=>"2014-03-06T19:23:46.176138Z",
13
+ "created_at"=>"2014-04-25T20:10:22.593252Z",
14
14
  "currency"=>"USD",
15
15
  "description"=>"Refund for Order #1111",
16
- "href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
17
- "id"=>"RF6HsnqferSuES9VZEWrthG2",
16
+ "href"=>"/refunds/RF4VbbS5LdgSxlECITkHg0Zf",
17
+ "id"=>"RF4VbbS5LdgSxlECITkHg0Zf",
18
18
  "links"=>
19
- {"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
19
+ {"debit"=>"WD4SOTNKiZbBFrmMk6mfszIl", "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"=>"RF348-549-7723",
26
- "updated_at"=>"2014-03-06T19:23:48.234584Z"},
25
+ "transaction_number"=>"RF854-846-2859",
26
+ "updated_at"=>"2014-04-25T20:10:23.032505Z"},
27
27
  @hyperlinks=
28
28
  {"debit"=>
29
- #<Proc:0x007fa4e40a4f98/lib/balanced/resources/resource.rb:60 (lambda)>,
29
+ #<Proc:0x007fa93b77f718/lib/balanced/resources/resource.rb:60 (lambda)>,
30
30
  "dispute"=>
31
- #<Proc:0x007fa4e4a7bd28/lib/balanced/utils.rb:6 (lambda)>,
31
+ #<Proc:0x007fa93b77ed90/lib/balanced/utils.rb:6 (lambda)>,
32
32
  "events"=>
33
- #<Proc:0x007fa4e4a784e8/lib/balanced/utils.rb:6 (lambda)>,
33
+ #<Proc:0x007fa93b77ce50/lib/balanced/utils.rb:6 (lambda)>,
34
34
  "order"=>
35
- #<Proc:0x007fa4e4a73510/lib/balanced/utils.rb:6 (lambda)>}>]
35
+ #<Proc:0x007fa93b77c450/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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
+ Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
7
7
 
8
- refund = Balanced::Refund.fetch('/refunds/RF6HsnqferSuES9VZEWrthG2')
8
+ refund = Balanced::Refund.fetch('/refunds/RF4VbbS5LdgSxlECITkHg0Zf')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Refund:0x007fa4e4a50c40
11
+ #<Balanced::Refund:0x007fa93b75f490
12
12
  @attributes=
13
13
  {"amount"=>3000,
14
- "created_at"=>"2014-03-06T19:23:46.176138Z",
14
+ "created_at"=>"2014-04-25T20:10:22.593252Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>"Refund for Order #1111",
17
- "href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
18
- "id"=>"RF6HsnqferSuES9VZEWrthG2",
17
+ "href"=>"/refunds/RF4VbbS5LdgSxlECITkHg0Zf",
18
+ "id"=>"RF4VbbS5LdgSxlECITkHg0Zf",
19
19
  "links"=>
20
- {"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
20
+ {"debit"=>"WD4SOTNKiZbBFrmMk6mfszIl", "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"=>"RF348-549-7723",
27
- "updated_at"=>"2014-03-06T19:23:48.234584Z"},
26
+ "transaction_number"=>"RF854-846-2859",
27
+ "updated_at"=>"2014-04-25T20:10:23.032505Z"},
28
28
  @hyperlinks=
29
29
  {"debit"=>
30
- #<Proc:0x007fa4e4a4aa98/lib/balanced/resources/resource.rb:60 (lambda)>,
30
+ #<Proc:0x007fa93b75d8e8/lib/balanced/resources/resource.rb:60 (lambda)>,
31
31
  "dispute"=>
32
- #<Proc:0x007fa4e4a49df0/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa93b75cf60/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "events"=>
34
- #<Proc:0x007fa4e4a43f18/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa93b756fc0/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "order"=>
36
- #<Proc:0x007fa4e4a43338/lib/balanced/utils.rb:6 (lambda)>}>
36
+ #<Proc:0x007fa93b7565c0/lib/balanced/utils.rb:6 (lambda)>}>
37
37
 
38
38
  % endif