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
@@ -2,28 +2,28 @@
2
2
  Balanced::Dispute.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
  disputes = Balanced::Dispute.all
8
8
  % elif mode == 'response':
9
- [#<Balanced::Dispute:0x007fa93eaad108
9
+ [#<Balanced::Dispute:0x007fa7d30e1230
10
10
  @attributes=
11
11
  {"amount"=>5000,
12
- "created_at"=>"2014-04-25T20:18:33.022136Z",
12
+ "created_at"=>"2014-05-15T00:42:52.610582Z",
13
13
  "currency"=>"USD",
14
- "href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
15
- "id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
16
- "initiated_at"=>"2014-04-25T20:10:26.554057Z",
17
- "links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
14
+ "href"=>"/disputes/DT6BoisMcacTIu3QWX32JVtl",
15
+ "id"=>"DT6BoisMcacTIu3QWX32JVtl",
16
+ "initiated_at"=>"2014-05-15T00:42:41.973330Z",
17
+ "links"=>{"transaction"=>"WD6mairBakAx5t8ETjMYFu7T"},
18
18
  "meta"=>{},
19
19
  "reason"=>"fraud",
20
- "respond_by"=>"2014-05-25T20:10:26.554061Z",
20
+ "respond_by"=>"2014-06-14T00:42:41.973334Z",
21
21
  "status"=>"pending",
22
- "updated_at"=>"2014-04-25T20:18:33.022139Z"},
22
+ "updated_at"=>"2014-05-15T00:42:52.610592Z"},
23
23
  @hyperlinks=
24
24
  {"events"=>
25
- #<Proc:0x007fa93eaa6f60/lib/balanced/utils.rb:6 (lambda)>,
25
+ #<Proc:0x007fa7d30daef8/lib/balanced/utils.rb:6 (lambda)>,
26
26
  "transaction"=>
27
- #<Proc:0x007fa93eaa54d0/lib/balanced/resources/resource.rb:60 (lambda)>}>]
27
+ #<Proc:0x007fa7d30d93a0/lib/balanced/resources/resource.rb:60 (lambda)>}>]
28
28
 
29
29
  % endif
@@ -3,29 +3,29 @@ Balanced::Dispute.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
- dispute = Balanced::Dispute.fetch('/disputes/DT61IA2iRqyYBLqUCJNt5XNV')
8
+ dispute = Balanced::Dispute.fetch('/disputes/DT6BoisMcacTIu3QWX32JVtl')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Dispute:0x007fa93ea8d948
11
+ #<Balanced::Dispute:0x007fa7d30c2740
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
- "created_at"=>"2014-04-25T20:18:33.022136Z",
14
+ "created_at"=>"2014-05-15T00:42:52.610582Z",
15
15
  "currency"=>"USD",
16
- "href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
17
- "id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
18
- "initiated_at"=>"2014-04-25T20:10:26.554057Z",
19
- "links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
16
+ "href"=>"/disputes/DT6BoisMcacTIu3QWX32JVtl",
17
+ "id"=>"DT6BoisMcacTIu3QWX32JVtl",
18
+ "initiated_at"=>"2014-05-15T00:42:41.973330Z",
19
+ "links"=>{"transaction"=>"WD6mairBakAx5t8ETjMYFu7T"},
20
20
  "meta"=>{},
21
21
  "reason"=>"fraud",
22
- "respond_by"=>"2014-05-25T20:10:26.554061Z",
22
+ "respond_by"=>"2014-06-14T00:42:41.973334Z",
23
23
  "status"=>"pending",
24
- "updated_at"=>"2014-04-25T20:18:33.022139Z"},
24
+ "updated_at"=>"2014-05-15T00:42:52.610592Z"},
25
25
  @hyperlinks=
26
26
  {"events"=>
27
- #<Proc:0x007fa93ea87458/lib/balanced/utils.rb:6 (lambda)>,
27
+ #<Proc:0x007fa7d30c0558/lib/balanced/utils.rb:6 (lambda)>,
28
28
  "transaction"=>
29
- #<Proc:0x007fa93ea856f8/lib/balanced/resources/resource.rb:60 (lambda)>}>
29
+ #<Proc:0x007fa7d30be898/lib/balanced/resources/resource.rb:60 (lambda)>}>
30
30
 
31
31
  % endif
@@ -3,56 +3,11 @@ Balanced::Event.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
  events = Balanced::Event.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Event:0x007fa93ea4f170
11
- @attributes=
12
- {"callback_statuses"=>
13
- {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
14
- "entity"=>
15
- {"bank_accounts"=>
16
- [{"account_number"=>"xxxxxxxxxxx5555",
17
- "account_type"=>"CHECKING",
18
- "address"=>
19
- {"city"=>nil,
20
- "country_code"=>nil,
21
- "line1"=>nil,
22
- "line2"=>nil,
23
- "postal_code"=>nil,
24
- "state"=>nil},
25
- "bank_name"=>"WELLS FARGO BANK NA",
26
- "can_credit"=>true,
27
- "can_debit"=>true,
28
- "created_at"=>"2014-04-25T20:09:08.031387Z",
29
- "fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
30
- "href"=>"/bank_accounts/BA3z8ko53HDEFwxjmNlc998p",
31
- "id"=>"BA3z8ko53HDEFwxjmNlc998p",
32
- "links"=>
33
- {"bank_account_verification"=>nil,
34
- "customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
35
- "meta"=>{},
36
- "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
37
- "routing_number"=>"121042882",
38
- "updated_at"=>"2014-04-25T20:09:08.031391Z"}],
39
- "links"=>
40
- {"bank_accounts.bank_account_verification"=>
41
- "/verifications/{bank_accounts.bank_account_verification}",
42
- "bank_accounts.bank_account_verifications"=>
43
- "/bank_accounts/{bank_accounts.id}/verifications",
44
- "bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
45
- "bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
46
- "bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
47
- "href"=>"/events/EV754ca810ccb511e3b6ef061e5f402045",
48
- "id"=>"EV754ca810ccb511e3b6ef061e5f402045",
49
- "links"=>{},
50
- "occurred_at"=>"2014-04-25T20:09:08.031000Z",
51
- "type"=>"bank_account.created"},
52
- @hyperlinks=
53
- {"callbacks"=>
54
- #<Proc:0x007fa93ea4dd70/lib/balanced/utils.rb:6 (lambda)>}>,
55
- #<Balanced::Event:0x007fa93ea4dd20
10
+ [#<Balanced::Event:0x007fa7d31b0cd8
56
11
  @attributes=
57
12
  {"callback_statuses"=>
58
13
  {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
@@ -66,20 +21,20 @@ events = Balanced::Event.all
66
21
  "postal_code"=>"90210",
67
22
  "state"=>nil},
68
23
  "business_name"=>nil,
69
- "created_at"=>"2014-04-25T20:09:07.786846Z",
24
+ "created_at"=>"2014-05-15T00:38:03.617262Z",
70
25
  "dob_month"=>2,
71
26
  "dob_year"=>1947,
72
27
  "ein"=>nil,
73
28
  "email"=>"whc@example.org",
74
- "href"=>"/customers/CU3z3rwGWGazDwwyLy0rNqfj",
75
- "id"=>"CU3z3rwGWGazDwwyLy0rNqfj",
29
+ "href"=>"/customers/CU1mlBGw9Cybp1cbj3Lltvcp",
30
+ "id"=>"CU1mlBGw9Cybp1cbj3Lltvcp",
76
31
  "links"=>{"destination"=>nil, "source"=>nil},
77
32
  "merchant_status"=>"underwritten",
78
33
  "meta"=>{},
79
34
  "name"=>"William Henry Cavendish III",
80
35
  "phone"=>"+16505551212",
81
36
  "ssn_last4"=>"xxxx",
82
- "updated_at"=>"2014-04-25T20:09:07.845324Z"}],
37
+ "updated_at"=>"2014-05-15T00:38:03.766910Z"}],
83
38
  "links"=>
84
39
  {"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
85
40
  "customers.card_holds"=>"/customers/{customers.id}/card_holds",
@@ -87,6 +42,7 @@ events = Balanced::Event.all
87
42
  "customers.credits"=>"/customers/{customers.id}/credits",
88
43
  "customers.debits"=>"/customers/{customers.id}/debits",
89
44
  "customers.destination"=>"/resources/{customers.destination}",
45
+ "customers.disputes"=>"/customers/{customers.id}/disputes",
90
46
  "customers.external_accounts"=>
91
47
  "/customers/{customers.id}/external_accounts",
92
48
  "customers.orders"=>"/customers/{customers.id}/orders",
@@ -94,13 +50,58 @@ events = Balanced::Event.all
94
50
  "customers.reversals"=>"/customers/{customers.id}/reversals",
95
51
  "customers.source"=>"/resources/{customers.source}",
96
52
  "customers.transactions"=>"/customers/{customers.id}/transactions"}},
97
- "href"=>"/events/EV75268b80ccb511e3b6ef061e5f402045",
98
- "id"=>"EV75268b80ccb511e3b6ef061e5f402045",
53
+ "href"=>"/events/EV2cc035eedbc911e38d4f061e5f402045",
54
+ "id"=>"EV2cc035eedbc911e38d4f061e5f402045",
99
55
  "links"=>{},
100
- "occurred_at"=>"2014-04-25T20:09:07.845000Z",
56
+ "occurred_at"=>"2014-05-15T00:38:03.766000Z",
101
57
  "type"=>"account.created"},
102
58
  @hyperlinks=
103
59
  {"callbacks"=>
104
- #<Proc:0x007fa93ea4c920/lib/balanced/utils.rb:6 (lambda)>}>]
60
+ #<Proc:0x007fa7d31ab968/lib/balanced/utils.rb:6 (lambda)>}>,
61
+ #<Balanced::Event:0x007fa7d31ab918
62
+ @attributes=
63
+ {"callback_statuses"=>
64
+ {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
65
+ "entity"=>
66
+ {"bank_accounts"=>
67
+ [{"account_number"=>"xxxxxxxxxxx5555",
68
+ "account_type"=>"checking",
69
+ "address"=>
70
+ {"city"=>nil,
71
+ "country_code"=>nil,
72
+ "line1"=>nil,
73
+ "line2"=>nil,
74
+ "postal_code"=>nil,
75
+ "state"=>nil},
76
+ "bank_name"=>"WELLS FARGO BANK NA",
77
+ "can_credit"=>true,
78
+ "can_debit"=>true,
79
+ "created_at"=>"2014-05-15T00:38:04.313775Z",
80
+ "fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
81
+ "href"=>"/bank_accounts/BA1mL1iIV0OiaTD4IHw51jkp",
82
+ "id"=>"BA1mL1iIV0OiaTD4IHw51jkp",
83
+ "links"=>
84
+ {"bank_account_verification"=>nil,
85
+ "customer"=>"CU1mlBGw9Cybp1cbj3Lltvcp"},
86
+ "meta"=>{},
87
+ "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
88
+ "routing_number"=>"121042882",
89
+ "updated_at"=>"2014-05-15T00:38:04.313777Z"}],
90
+ "links"=>
91
+ {"bank_accounts.bank_account_verification"=>
92
+ "/verifications/{bank_accounts.bank_account_verification}",
93
+ "bank_accounts.bank_account_verifications"=>
94
+ "/bank_accounts/{bank_accounts.id}/verifications",
95
+ "bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
96
+ "bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
97
+ "bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
98
+ "href"=>"/events/EV2d2b4e42dbc911e38d4f061e5f402045",
99
+ "id"=>"EV2d2b4e42dbc911e38d4f061e5f402045",
100
+ "links"=>{},
101
+ "occurred_at"=>"2014-05-15T00:38:04.313000Z",
102
+ "type"=>"bank_account.created"},
103
+ @hyperlinks=
104
+ {"callbacks"=>
105
+ #<Proc:0x007fa7d31aa608/lib/balanced/utils.rb:6 (lambda)>}>]
105
106
 
106
107
  % endif
@@ -3,55 +3,61 @@ Balanced::Event.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
- event = Balanced::Event.fetch('/events/EV754ca810ccb511e3b6ef061e5f402045')
8
+ event = Balanced::Event.fetch('/events/EV2cc035eedbc911e38d4f061e5f402045')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Event:0x007fa93e99cfc0
11
+ #<Balanced::Event:0x007fa7d3155a68
12
12
  @attributes=
13
13
  {"callback_statuses"=>
14
14
  {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
15
15
  "entity"=>
16
- {"bank_accounts"=>
17
- [{"account_number"=>"xxxxxxxxxxx5555",
18
- "account_type"=>"CHECKING",
19
- "address"=>
20
- {"city"=>nil,
21
- "country_code"=>nil,
16
+ {"customers"=>
17
+ [{"address"=>
18
+ {"city"=>"Nowhere",
19
+ "country_code"=>"USA",
22
20
  "line1"=>nil,
23
21
  "line2"=>nil,
24
- "postal_code"=>nil,
22
+ "postal_code"=>"90210",
25
23
  "state"=>nil},
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"},
24
+ "business_name"=>nil,
25
+ "created_at"=>"2014-05-15T00:38:03.617262Z",
26
+ "dob_month"=>2,
27
+ "dob_year"=>1947,
28
+ "ein"=>nil,
29
+ "email"=>"whc@example.org",
30
+ "href"=>"/customers/CU1mlBGw9Cybp1cbj3Lltvcp",
31
+ "id"=>"CU1mlBGw9Cybp1cbj3Lltvcp",
32
+ "links"=>{"destination"=>nil, "source"=>nil},
33
+ "merchant_status"=>"underwritten",
36
34
  "meta"=>{},
37
- "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
38
- "routing_number"=>"121042882",
39
- "updated_at"=>"2014-04-25T20:09:08.031391Z"}],
35
+ "name"=>"William Henry Cavendish III",
36
+ "phone"=>"+16505551212",
37
+ "ssn_last4"=>"xxxx",
38
+ "updated_at"=>"2014-05-15T00:38:03.766910Z"}],
40
39
  "links"=>
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",
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.disputes"=>"/customers/{customers.id}/disputes",
47
+ "customers.external_accounts"=>
48
+ "/customers/{customers.id}/external_accounts",
49
+ "customers.orders"=>"/customers/{customers.id}/orders",
50
+ "customers.refunds"=>"/customers/{customers.id}/refunds",
51
+ "customers.reversals"=>"/customers/{customers.id}/reversals",
52
+ "customers.source"=>"/resources/{customers.source}",
53
+ "customers.transactions"=>"/customers/{customers.id}/transactions"}},
54
+ "href"=>"/events/EV2cc035eedbc911e38d4f061e5f402045",
55
+ "id"=>"EV2cc035eedbc911e38d4f061e5f402045",
50
56
  "links"=>{},
51
- "occurred_at"=>"2014-04-25T20:09:08.031000Z",
52
- "type"=>"bank_account.created"},
57
+ "occurred_at"=>"2014-05-15T00:38:03.766000Z",
58
+ "type"=>"account.created"},
53
59
  @hyperlinks=
54
60
  {"callbacks"=>
55
- #<Proc:0x007fa93e997c50/lib/balanced/utils.rb:6 (lambda)>}>
61
+ #<Proc:0x007fa7d31546b8/lib/balanced/utils.rb:6 (lambda)>}>
56
62
 
57
63
  % 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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- merchant_customer = Balanced::Customer.fetch('/customers/CU4MnFEab304anOtUtEu5hkN')
8
+ merchant_customer = Balanced::Customer.fetch('/customers/CU56PvhKAwSiV6LahZCcBMJ7')
9
9
  merchant_customer.create_order(
10
10
  :description => 'Order #12341234'
11
11
  )
12
12
  % elif mode == 'response':
13
- #<Balanced::Order:0x007fa93e965318
13
+ #<Balanced::Order:0x007fa7d32081e0
14
14
  @attributes=
15
15
  {"amount"=>0,
16
16
  "amount_escrowed"=>0,
17
- "created_at"=>"2014-04-25T20:18:43.120760Z",
17
+ "created_at"=>"2014-05-15T00:43:14.079629Z",
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/OR6d55qbtKx5aWSURkQeodRr",
28
- "id"=>"OR6d55qbtKx5aWSURkQeodRr",
29
- "links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
27
+ "href"=>"/orders/OR6Zx317bzTVRgDxt3JqnZIx",
28
+ "id"=>"OR6Zx317bzTVRgDxt3JqnZIx",
29
+ "links"=>{"merchant"=>"CU56PvhKAwSiV6LahZCcBMJ7"},
30
30
  "meta"=>{},
31
- "updated_at"=>"2014-04-25T20:18:43.120762Z"},
31
+ "updated_at"=>"2014-05-15T00:43:14.079632Z"},
32
32
  @hyperlinks=
33
33
  {"buyers"=>
34
- #<Proc:0x007fa93e95f008/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa7d3204e00/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "credits"=>
36
- #<Proc:0x007fa93e95cba0/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa7d3202588/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "debits"=>
38
- #<Proc:0x007fa93e956b10/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa7d31fb8a0/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "merchant"=>
40
- #<Proc:0x007fa93e955008/lib/balanced/resources/resource.rb:60 (lambda)>,
40
+ #<Proc:0x007fa7d31f97f8/lib/balanced/resources/resource.rb:60 (lambda)>,
41
41
  "refunds"=>
42
- #<Proc:0x007fa93e94f018/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa7d31f30d8/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "reversals"=>
44
- #<Proc:0x007fa93e94d038/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007fa7d31f1120/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
5
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
6
 
7
7
  orders = Balanced::Order.all
8
8
  % elif mode == 'response':
9
- [#<Balanced::Order:0x007fa93e866c50
9
+ [#<Balanced::Order:0x007fa7d33a99b8
10
10
  @attributes=
11
11
  {"amount"=>0,
12
12
  "amount_escrowed"=>0,
13
- "created_at"=>"2014-04-25T20:18:43.120760Z",
13
+ "created_at"=>"2014-05-15T00:43:14.079629Z",
14
14
  "currency"=>"USD",
15
15
  "delivery_address"=>
16
16
  {"city"=>nil,
@@ -20,23 +20,55 @@ orders = Balanced::Order.all
20
20
  "postal_code"=>nil,
21
21
  "state"=>nil},
22
22
  "description"=>"Order #12341234",
23
- "href"=>"/orders/OR6d55qbtKx5aWSURkQeodRr",
24
- "id"=>"OR6d55qbtKx5aWSURkQeodRr",
25
- "links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
23
+ "href"=>"/orders/OR6Zx317bzTVRgDxt3JqnZIx",
24
+ "id"=>"OR6Zx317bzTVRgDxt3JqnZIx",
25
+ "links"=>{"merchant"=>"CU56PvhKAwSiV6LahZCcBMJ7"},
26
26
  "meta"=>{},
27
- "updated_at"=>"2014-04-25T20:18:43.120762Z"},
27
+ "updated_at"=>"2014-05-15T00:43:14.079632Z"},
28
28
  @hyperlinks=
29
29
  {"buyers"=>
30
- #<Proc:0x007fa93e864338/lib/balanced/utils.rb:6 (lambda)>,
30
+ #<Proc:0x007fa7d33a28c0/lib/balanced/utils.rb:6 (lambda)>,
31
31
  "credits"=>
32
- #<Proc:0x007fa93e8563f0/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007fa7d339be08/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "debits"=>
34
- #<Proc:0x007fa93e854500/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007fa7d3399360/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "merchant"=>
36
- #<Proc:0x007fa93e84ea38/lib/balanced/resources/resource.rb:60 (lambda)>,
36
+ #<Proc:0x007fa7d3392f10/lib/balanced/resources/resource.rb:60 (lambda)>,
37
37
  "refunds"=>
38
- #<Proc:0x007fa93e84cbc0/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa7d3390620/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "reversals"=>
40
- #<Proc:0x007fa93e846bd0/lib/balanced/utils.rb:6 (lambda)>}>]
40
+ #<Proc:0x007fa7d338d268/lib/balanced/utils.rb:6 (lambda)>}>,
41
+ #<Balanced::Order:0x007fa7d338d1f0
42
+ @attributes=
43
+ {"amount"=>5000,
44
+ "amount_escrowed"=>5000,
45
+ "created_at"=>"2014-05-15T00:41:16.316070Z",
46
+ "currency"=>"USD",
47
+ "delivery_address"=>
48
+ {"city"=>nil,
49
+ "country_code"=>nil,
50
+ "line1"=>nil,
51
+ "line2"=>nil,
52
+ "postal_code"=>nil,
53
+ "state"=>nil},
54
+ "description"=>"Order #12341234",
55
+ "href"=>"/orders/OR4R53c8wdUiVEUiegSHpwaN",
56
+ "id"=>"OR4R53c8wdUiVEUiegSHpwaN",
57
+ "links"=>{"merchant"=>"CU2L981m9AtPY8pjpGpjnjnf"},
58
+ "meta"=>{},
59
+ "updated_at"=>"2014-05-15T00:41:16.316074Z"},
60
+ @hyperlinks=
61
+ {"buyers"=>
62
+ #<Proc:0x007fa7d338a9f0/lib/balanced/utils.rb:6 (lambda)>,
63
+ "credits"=>
64
+ #<Proc:0x007fa7d3388b78/lib/balanced/utils.rb:6 (lambda)>,
65
+ "debits"=>
66
+ #<Proc:0x007fa7d33823b8/lib/balanced/utils.rb:6 (lambda)>,
67
+ "merchant"=>
68
+ #<Proc:0x007fa7d3380860/lib/balanced/resources/resource.rb:60 (lambda)>,
69
+ "refunds"=>
70
+ #<Proc:0x007fa7d337a960/lib/balanced/utils.rb:6 (lambda)>,
71
+ "reversals"=>
72
+ #<Proc:0x007fa7d3378a48/lib/balanced/utils.rb:6 (lambda)>}>]
41
73
 
42
74
  % endif