balanced 1.1.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +10 -6
  4. data/CHANGELOG.md +4 -0
  5. data/README.md +1 -1
  6. data/lib/balanced/resources.rb +2 -0
  7. data/lib/balanced/resources/account.rb +33 -0
  8. data/lib/balanced/resources/card.rb +1 -1
  9. data/lib/balanced/resources/customer.rb +8 -0
  10. data/lib/balanced/resources/resource.rb +4 -6
  11. data/lib/balanced/resources/settlement.rb +12 -0
  12. data/lib/balanced/response/balanced_exception_middleware.rb +1 -1
  13. data/lib/balanced/utils.rb +1 -1
  14. data/lib/balanced/version.rb +1 -1
  15. data/scenarios/account_credit/definition.rb +1 -0
  16. data/scenarios/account_credit/request.rb +5 -0
  17. data/scenarios/account_credit/ruby.mako +49 -0
  18. data/scenarios/account_list/definition.rb +1 -0
  19. data/scenarios/account_list/request.rb +2 -0
  20. data/scenarios/account_list/ruby.mako +64 -0
  21. data/scenarios/account_list_customer/definition.rb +1 -0
  22. data/scenarios/account_list_customer/request.rb +3 -0
  23. data/scenarios/account_list_customer/ruby.mako +38 -0
  24. data/scenarios/account_show/definition.rb +1 -0
  25. data/scenarios/account_show/request.rb +2 -0
  26. data/scenarios/account_show/ruby.mako +37 -0
  27. data/scenarios/api_key_create/ruby.mako +6 -6
  28. data/scenarios/api_key_delete/ruby.mako +2 -2
  29. data/scenarios/api_key_list/ruby.mako +10 -10
  30. data/scenarios/api_key_show/ruby.mako +6 -6
  31. data/scenarios/bank_account_associate_to_customer/ruby.mako +16 -14
  32. data/scenarios/bank_account_create/ruby.mako +13 -11
  33. data/scenarios/bank_account_credit/ruby.mako +16 -16
  34. data/scenarios/bank_account_debit/ruby.mako +21 -18
  35. data/scenarios/bank_account_debit_order/definition.rb +1 -0
  36. data/scenarios/bank_account_debit_order/request.rb +7 -0
  37. data/scenarios/bank_account_debit_order/ruby.mako +52 -0
  38. data/scenarios/bank_account_delete/ruby.mako +2 -2
  39. data/scenarios/bank_account_list/ruby.mako +26 -22
  40. data/scenarios/bank_account_show/ruby.mako +14 -12
  41. data/scenarios/bank_account_update/ruby.mako +14 -12
  42. data/scenarios/bank_account_verification_create/ruby.mako +10 -10
  43. data/scenarios/bank_account_verification_show/ruby.mako +10 -10
  44. data/scenarios/bank_account_verification_update/ruby.mako +9 -9
  45. data/scenarios/callback_create/ruby.mako +4 -4
  46. data/scenarios/callback_delete/ruby.mako +2 -2
  47. data/scenarios/callback_list/ruby.mako +4 -4
  48. data/scenarios/callback_show/ruby.mako +5 -5
  49. data/scenarios/card_associate_to_customer/ruby.mako +26 -26
  50. data/scenarios/card_create/ruby.mako +13 -15
  51. data/scenarios/card_create_creditable/ruby.mako +11 -11
  52. data/scenarios/card_create_dispute/ruby.mako +13 -13
  53. data/scenarios/card_credit/ruby.mako +16 -14
  54. data/scenarios/card_credit_order/definition.rb +1 -0
  55. data/scenarios/card_credit_order/request.rb +7 -0
  56. data/scenarios/card_credit_order/ruby.mako +45 -0
  57. data/scenarios/card_debit/ruby.mako +20 -17
  58. data/scenarios/card_debit_dispute/ruby.mako +20 -17
  59. data/scenarios/card_delete/ruby.mako +2 -2
  60. data/scenarios/card_hold_capture/ruby.mako +20 -17
  61. data/scenarios/card_hold_create/ruby.mako +16 -14
  62. data/scenarios/card_hold_list/ruby.mako +33 -27
  63. data/scenarios/card_hold_order/definition.rb +1 -0
  64. data/scenarios/card_hold_order/request.rb +6 -0
  65. data/scenarios/card_hold_order/ruby.mako +45 -0
  66. data/scenarios/card_hold_show/ruby.mako +16 -14
  67. data/scenarios/card_hold_update/ruby.mako +16 -14
  68. data/scenarios/card_hold_void/ruby.mako +17 -15
  69. data/scenarios/card_list/ruby.mako +25 -29
  70. data/scenarios/card_show/ruby.mako +14 -16
  71. data/scenarios/card_update/ruby.mako +14 -16
  72. data/scenarios/credit_list/ruby.mako +44 -14
  73. data/scenarios/credit_list_bank_account/ruby.mako +3 -3
  74. data/scenarios/credit_order/request.rb +2 -2
  75. data/scenarios/credit_order/ruby.mako +35 -14
  76. data/scenarios/credit_show/ruby.mako +16 -16
  77. data/scenarios/credit_update/ruby.mako +16 -16
  78. data/scenarios/customer_create/ruby.mako +22 -20
  79. data/scenarios/customer_delete/ruby.mako +1 -1
  80. data/scenarios/customer_list/ruby.mako +43 -39
  81. data/scenarios/customer_show/ruby.mako +23 -21
  82. data/scenarios/customer_update/ruby.mako +23 -21
  83. data/scenarios/debit_dispute_show/ruby.mako +12 -12
  84. data/scenarios/debit_list/ruby.mako +43 -37
  85. data/scenarios/debit_order/ruby.mako +22 -19
  86. data/scenarios/debit_show/ruby.mako +20 -17
  87. data/scenarios/debit_update/ruby.mako +20 -17
  88. data/scenarios/dispute_list/ruby.mako +11 -11
  89. data/scenarios/dispute_show/ruby.mako +12 -12
  90. data/scenarios/event_list/ruby.mako +55 -81
  91. data/scenarios/event_show/ruby.mako +35 -45
  92. data/scenarios/order_create/ruby.mako +16 -14
  93. data/scenarios/order_list/ruby.mako +33 -29
  94. data/scenarios/order_show/ruby.mako +16 -14
  95. data/scenarios/order_update/ruby.mako +16 -14
  96. data/scenarios/refund_create/ruby.mako +13 -13
  97. data/scenarios/refund_list/ruby.mako +12 -12
  98. data/scenarios/refund_show/ruby.mako +13 -13
  99. data/scenarios/refund_update/ruby.mako +13 -13
  100. data/scenarios/reversal_create/ruby.mako +13 -13
  101. data/scenarios/reversal_list/ruby.mako +12 -12
  102. data/scenarios/reversal_show/ruby.mako +13 -13
  103. data/scenarios/reversal_update/ruby.mako +13 -13
  104. data/scenarios/settlement_create/definition.rb +1 -0
  105. data/scenarios/settlement_create/request.rb +5 -0
  106. data/scenarios/settlement_create/ruby.mako +48 -0
  107. data/scenarios/settlement_list/definition.rb +1 -0
  108. data/scenarios/settlement_list/request.rb +2 -0
  109. data/scenarios/settlement_list/ruby.mako +40 -0
  110. data/scenarios/settlement_list_account/definition.rb +1 -0
  111. data/scenarios/settlement_list_account/request.rb +3 -0
  112. data/scenarios/settlement_list_account/ruby.mako +41 -0
  113. data/scenarios/settlement_show/definition.rb +1 -0
  114. data/scenarios/settlement_show/request.rb +2 -0
  115. data/scenarios/settlement_show/ruby.mako +40 -0
  116. data/snippets/account-balance.rb +1 -0
  117. data/snippets/bank-account-create.rb +6 -0
  118. data/snippets/bank-account-debit.rb +9 -0
  119. data/snippets/bank-account-verification-confirm.rb +5 -0
  120. data/snippets/bank-account-verification-create.rb +1 -0
  121. data/snippets/callback-create.rb +4 -0
  122. data/snippets/card-associate-to-customer.rb +2 -0
  123. data/snippets/card-create-dispute.rb +6 -0
  124. data/snippets/card-create.rb +7 -0
  125. data/snippets/card-credit.rb +9 -0
  126. data/snippets/card-debit.rb +9 -0
  127. data/snippets/card-hold-capture.rb +6 -0
  128. data/snippets/card-hold-create.rb +6 -0
  129. data/snippets/card-hold-void.rb +3 -0
  130. data/snippets/create-buyer-and-card.rb +13 -0
  131. data/snippets/credit-create.rb +8 -0
  132. data/snippets/credit-fetch.rb +1 -0
  133. data/snippets/credit-marketplace-escrow.rb +4 -0
  134. data/snippets/credit-reverse.rb +1 -0
  135. data/snippets/credit-soft-descriptor.rb +9 -0
  136. data/snippets/credit-split.rb +13 -0
  137. data/snippets/customer-create.rb +8 -0
  138. data/snippets/debit-dispute-show.rb +3 -0
  139. data/snippets/debit-fetch.rb +1 -0
  140. data/snippets/debit-marketplace-escrow.rb +4 -0
  141. data/snippets/debit-refund.rb +1 -0
  142. data/snippets/dispute-list.rb +1 -0
  143. data/snippets/dispute-show.rb +2 -0
  144. data/snippets/examine-order-after-refund.rb +3 -0
  145. data/snippets/examine-order-after-reversal.rb +3 -0
  146. data/snippets/example.rb +1 -0
  147. data/snippets/marketplace-in-escrow.rb +1 -0
  148. data/snippets/merchant-payable-account-fetch.rb +2 -0
  149. data/snippets/order-amount-escrowed.rb +3 -0
  150. data/snippets/order-bank-account-create.rb +8 -0
  151. data/snippets/order-create.rb +1 -0
  152. data/snippets/order-credit-marketplace.rb +5 -0
  153. data/snippets/order-credit-merchant-payable-account.rb +4 -0
  154. data/snippets/order-credit.rb +4 -0
  155. data/snippets/order-credits-fetch.rb +1 -0
  156. data/snippets/order-debit.rb +4 -0
  157. data/snippets/order-debits-fetch.rb +1 -0
  158. data/snippets/order-fetch.rb +1 -0
  159. data/snippets/order-update.rb +5 -0
  160. data/snippets/refund-create.rb +13 -0
  161. data/snippets/reversal-create.rb +13 -0
  162. data/snippets/settlement-create.rb +5 -0
  163. data/spec/balanced/resources/account_spec.rb +265 -0
  164. data/spec/balanced/resources/card_spec.rb +6 -6
  165. metadata +86 -2
@@ -2,7 +2,7 @@
2
2
  Balanced::Customer.unstore
3
3
 
4
4
  % elif mode == 'request':
5
- customer = Balanced::Customer.fetch('/customers/CU56PvhKAwSiV6LahZCcBMJ7')
5
+ customer = Balanced::Customer.fetch('/customers/CU7yoUz1HuDE7t7p9GcVNYbz')
6
6
  customer.unstore
7
7
 
8
8
  % elif mode == 'response':
@@ -3,11 +3,11 @@ Balanced::Customer.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
8
  customers = Balanced::Customer.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Customer:0x007fa7d2815548
10
+ [#<Balanced::Customer:0x007fcde09f0528
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -17,48 +17,50 @@ customers = Balanced::Customer.all
17
17
  "postal_code"=>"48120",
18
18
  "state"=>nil},
19
19
  "business_name"=>nil,
20
- "created_at"=>"2014-05-15T00:41:24.028958Z",
20
+ "created_at"=>"2014-12-17T21:25:16.650481Z",
21
21
  "dob_month"=>7,
22
22
  "dob_year"=>1963,
23
23
  "ein"=>nil,
24
24
  "email"=>nil,
25
- "href"=>"/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP",
26
- "id"=>"CU4ZKTtaAaR7Rc5M8EP2gLlP",
25
+ "href"=>"/customers/CU7s0pNLu0DEtFKtoljSeCAB",
26
+ "id"=>"CU7s0pNLu0DEtFKtoljSeCAB",
27
27
  "links"=>{"destination"=>nil, "source"=>nil},
28
28
  "merchant_status"=>"underwritten",
29
29
  "meta"=>{},
30
30
  "name"=>"Henry Ford",
31
31
  "phone"=>nil,
32
32
  "ssn_last4"=>nil,
33
- "updated_at"=>"2014-05-15T00:41:24.914750Z"},
33
+ "updated_at"=>"2014-12-17T21:25:16.874084Z"},
34
34
  @hyperlinks=
35
- {"bank_accounts"=>
36
- #<Proc:0x007fa7d280c9c0/lib/balanced/utils.rb:6 (lambda)>,
35
+ {"accounts"=>
36
+ #<Proc:0x007fcde09ea420/lib/balanced/utils.rb:6 (lambda)>,
37
+ "bank_accounts"=>
38
+ #<Proc:0x007fcde09e83f0/lib/balanced/utils.rb:6 (lambda)>,
37
39
  "card_holds"=>
38
- #<Proc:0x007fa7d1e7b9d8/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fcde09c2538/lib/balanced/utils.rb:6 (lambda)>,
39
41
  "cards"=>
40
- #<Proc:0x007fa7d1e69af8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fcde09c0580/lib/balanced/utils.rb:6 (lambda)>,
41
43
  "credits"=>
42
- #<Proc:0x007fa7d1e5ba98/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fcde09a20d0/lib/balanced/utils.rb:6 (lambda)>,
43
45
  "debits"=>
44
- #<Proc:0x007fa7d1e52358/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fcde09a0258/lib/balanced/utils.rb:6 (lambda)>,
45
47
  "destination"=>
46
- #<Proc:0x007fa7d1e50738/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fcde099b848/lib/balanced/utils.rb:6 (lambda)>,
47
49
  "disputes"=>
48
- #<Proc:0x007fa7d1e482e0/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fcde09999f8/lib/balanced/utils.rb:6 (lambda)>,
49
51
  "external_accounts"=>
50
- #<Proc:0x007fa7d1e3bb08/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fcde0993850/lib/balanced/utils.rb:6 (lambda)>,
51
53
  "orders"=>
52
- #<Proc:0x007fa7d1e33980/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fcde09919d8/lib/balanced/utils.rb:6 (lambda)>,
53
55
  "refunds"=>
54
- #<Proc:0x007fa7d1e2a420/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fcde098bb28/lib/balanced/utils.rb:6 (lambda)>,
55
57
  "reversals"=>
56
- #<Proc:0x007fa7d1e0b1b0/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fcde0989cb0/lib/balanced/utils.rb:6 (lambda)>,
57
59
  "source"=>
58
- #<Proc:0x007fa7d1e0a238/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fcde0989058/lib/balanced/utils.rb:6 (lambda)>,
59
61
  "transactions"=>
60
- #<Proc:0x007fa7d1e01cf0/lib/balanced/utils.rb:6 (lambda)>}>,
61
- #<Balanced::Customer:0x007fa7d1e01c78
62
+ #<Proc:0x007fcde0982820/lib/balanced/utils.rb:6 (lambda)>}>,
63
+ #<Balanced::Customer:0x007fcde09827d0
62
64
  @attributes=
63
65
  {"address"=>
64
66
  {"city"=>nil,
@@ -68,46 +70,48 @@ customers = Balanced::Customer.all
68
70
  "postal_code"=>"48120",
69
71
  "state"=>nil},
70
72
  "business_name"=>nil,
71
- "created_at"=>"2014-05-15T00:39:20.790653Z",
73
+ "created_at"=>"2014-12-17T21:24:04.003984Z",
72
74
  "dob_month"=>7,
73
75
  "dob_year"=>1963,
74
76
  "ein"=>nil,
75
77
  "email"=>nil,
76
- "href"=>"/customers/CU2L981m9AtPY8pjpGpjnjnf",
77
- "id"=>"CU2L981m9AtPY8pjpGpjnjnf",
78
+ "href"=>"/customers/CU68iUpvvUwpRpuuBL3u9Slq",
79
+ "id"=>"CU68iUpvvUwpRpuuBL3u9Slq",
78
80
  "links"=>{"destination"=>nil, "source"=>nil},
79
81
  "merchant_status"=>"underwritten",
80
82
  "meta"=>{},
81
83
  "name"=>"Henry Ford",
82
84
  "phone"=>nil,
83
85
  "ssn_last4"=>nil,
84
- "updated_at"=>"2014-05-15T00:39:21.958148Z"},
86
+ "updated_at"=>"2014-12-17T21:24:04.245364Z"},
85
87
  @hyperlinks=
86
- {"bank_accounts"=>
87
- #<Proc:0x007fa7d1de0898/lib/balanced/utils.rb:6 (lambda)>,
88
+ {"accounts"=>
89
+ #<Proc:0x007fcde09801d8/lib/balanced/utils.rb:6 (lambda)>,
90
+ "bank_accounts"=>
91
+ #<Proc:0x007fcde09799a0/lib/balanced/utils.rb:6 (lambda)>,
88
92
  "card_holds"=>
89
- #<Proc:0x007fa7d1dc9738/lib/balanced/utils.rb:6 (lambda)>,
93
+ #<Proc:0x007fcde0973168/lib/balanced/utils.rb:6 (lambda)>,
90
94
  "cards"=>
91
- #<Proc:0x007fa7d1dc1a60/lib/balanced/utils.rb:6 (lambda)>,
95
+ #<Proc:0x007fcde09708f0/lib/balanced/utils.rb:6 (lambda)>,
92
96
  "credits"=>
93
- #<Proc:0x007fa7d1db8730/lib/balanced/utils.rb:6 (lambda)>,
97
+ #<Proc:0x007fcde0969fa0/lib/balanced/utils.rb:6 (lambda)>,
94
98
  "debits"=>
95
- #<Proc:0x007fa7d1dab350/lib/balanced/utils.rb:6 (lambda)>,
99
+ #<Proc:0x007fcde0963920/lib/balanced/utils.rb:6 (lambda)>,
96
100
  "destination"=>
97
- #<Proc:0x007fa7d1daa298/lib/balanced/utils.rb:6 (lambda)>,
101
+ #<Proc:0x007fcde0962e30/lib/balanced/utils.rb:6 (lambda)>,
98
102
  "disputes"=>
99
- #<Proc:0x007fa7d1da1530/lib/balanced/utils.rb:6 (lambda)>,
103
+ #<Proc:0x007fcde0960608/lib/balanced/utils.rb:6 (lambda)>,
100
104
  "external_accounts"=>
101
- #<Proc:0x007fa7d1d92328/lib/balanced/utils.rb:6 (lambda)>,
105
+ #<Proc:0x007fcde093e4b8/lib/balanced/utils.rb:6 (lambda)>,
102
106
  "orders"=>
103
- #<Proc:0x007fa7d1d83170/lib/balanced/utils.rb:6 (lambda)>,
107
+ #<Proc:0x007fcde093c280/lib/balanced/utils.rb:6 (lambda)>,
104
108
  "refunds"=>
105
- #<Proc:0x007fa7d1d79558/lib/balanced/utils.rb:6 (lambda)>,
109
+ #<Proc:0x007fcde0935e80/lib/balanced/utils.rb:6 (lambda)>,
106
110
  "reversals"=>
107
- #<Proc:0x007fa7d1d71d08/lib/balanced/utils.rb:6 (lambda)>,
111
+ #<Proc:0x007fcde0934030/lib/balanced/utils.rb:6 (lambda)>,
108
112
  "source"=>
109
- #<Proc:0x007fa7d1d70228/lib/balanced/utils.rb:6 (lambda)>,
113
+ #<Proc:0x007fcde092f558/lib/balanced/utils.rb:6 (lambda)>,
110
114
  "transactions"=>
111
- #<Proc:0x007fa7d1d639d8/lib/balanced/utils.rb:6 (lambda)>}>]
115
+ #<Proc:0x007fcde092d578/lib/balanced/utils.rb:6 (lambda)>}>]
112
116
 
113
117
  % endif
@@ -3,11 +3,11 @@ Balanced::Customer.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
- customer = Balanced::Customer.fetch('/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP')
8
+ customer = Balanced::Customer.fetch('/customers/CU7s0pNLu0DEtFKtoljSeCAB')
9
9
  % elif mode == 'response':
10
- #<Balanced::Customer:0x007fa7d1c78d70
10
+ #<Balanced::Customer:0x007fcde3995aa8
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -17,46 +17,48 @@ customer = Balanced::Customer.fetch('/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP')
17
17
  "postal_code"=>"48120",
18
18
  "state"=>nil},
19
19
  "business_name"=>nil,
20
- "created_at"=>"2014-05-15T00:41:24.028958Z",
20
+ "created_at"=>"2014-12-17T21:25:16.650481Z",
21
21
  "dob_month"=>7,
22
22
  "dob_year"=>1963,
23
23
  "ein"=>nil,
24
24
  "email"=>nil,
25
- "href"=>"/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP",
26
- "id"=>"CU4ZKTtaAaR7Rc5M8EP2gLlP",
25
+ "href"=>"/customers/CU7s0pNLu0DEtFKtoljSeCAB",
26
+ "id"=>"CU7s0pNLu0DEtFKtoljSeCAB",
27
27
  "links"=>{"destination"=>nil, "source"=>nil},
28
28
  "merchant_status"=>"underwritten",
29
29
  "meta"=>{},
30
30
  "name"=>"Henry Ford",
31
31
  "phone"=>nil,
32
32
  "ssn_last4"=>nil,
33
- "updated_at"=>"2014-05-15T00:41:24.914750Z"},
33
+ "updated_at"=>"2014-12-17T21:25:16.874084Z"},
34
34
  @hyperlinks=
35
- {"bank_accounts"=>
36
- #<Proc:0x007fa7d1c6aa40/lib/balanced/utils.rb:6 (lambda)>,
35
+ {"accounts"=>
36
+ #<Proc:0x007fcde398c688/lib/balanced/utils.rb:6 (lambda)>,
37
+ "bank_accounts"=>
38
+ #<Proc:0x007fcde3984b90/lib/balanced/utils.rb:6 (lambda)>,
37
39
  "card_holds"=>
38
- #<Proc:0x007fa7d1c63718/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fcde3966708/lib/balanced/utils.rb:6 (lambda)>,
39
41
  "cards"=>
40
- #<Proc:0x007fa7d1c53868/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fcde395da68/lib/balanced/utils.rb:6 (lambda)>,
41
43
  "credits"=>
42
- #<Proc:0x007fa7d1c4ac68/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fcde3955138/lib/balanced/utils.rb:6 (lambda)>,
43
45
  "debits"=>
44
- #<Proc:0x007fa7d1c33748/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fcde3947d58/lib/balanced/utils.rb:6 (lambda)>,
45
47
  "destination"=>
46
- #<Proc:0x007fa7d1c318f8/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fcde39469f8/lib/balanced/utils.rb:6 (lambda)>,
47
49
  "disputes"=>
48
- #<Proc:0x007fa7d1c21bb0/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fcde393ed48/lib/balanced/utils.rb:6 (lambda)>,
49
51
  "external_accounts"=>
50
- #<Proc:0x007fa7d1c13880/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fcde39377f0/lib/balanced/utils.rb:6 (lambda)>,
51
53
  "orders"=>
52
- #<Proc:0x007fa7d1bfad80/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fcde392f730/lib/balanced/utils.rb:6 (lambda)>,
53
55
  "refunds"=>
54
- #<Proc:0x007fa7d1c01db0/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fcde392c238/lib/balanced/utils.rb:6 (lambda)>,
55
57
  "reversals"=>
56
- #<Proc:0x007fa7d1bf03a8/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fcde3925078/lib/balanced/utils.rb:6 (lambda)>,
57
59
  "source"=>
58
- #<Proc:0x007fa7d1be6b00/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fcde39241c8/lib/balanced/utils.rb:6 (lambda)>,
59
61
  "transactions"=>
60
- #<Proc:0x007fa7d1bdacd8/lib/balanced/utils.rb:6 (lambda)>}>
62
+ #<Proc:0x007fcde391d2d8/lib/balanced/utils.rb:6 (lambda)>}>
61
63
 
62
64
  % endif
@@ -3,9 +3,9 @@ Balanced::Customer.save
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
- customer = Balanced::Customer.fetch('/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP')
8
+ customer = Balanced::Customer.fetch('/customers/CU7s0pNLu0DEtFKtoljSeCAB')
9
9
  customer.email = 'email@newdomain.com'
10
10
  customer.meta = {
11
11
  'shipping-preference' => 'ground'
@@ -13,7 +13,7 @@ customer.meta = {
13
13
  customer.save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Customer:0x007fa7d1b29fc8
16
+ #<Balanced::Customer:0x007fcde389e550
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -23,46 +23,48 @@ customer.save
23
23
  "postal_code"=>"48120",
24
24
  "state"=>nil},
25
25
  "business_name"=>nil,
26
- "created_at"=>"2014-05-15T00:41:24.028958Z",
26
+ "created_at"=>"2014-12-17T21:25:16.650481Z",
27
27
  "dob_month"=>7,
28
28
  "dob_year"=>1963,
29
29
  "ein"=>nil,
30
30
  "email"=>"email@newdomain.com",
31
- "href"=>"/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP",
32
- "id"=>"CU4ZKTtaAaR7Rc5M8EP2gLlP",
31
+ "href"=>"/customers/CU7s0pNLu0DEtFKtoljSeCAB",
32
+ "id"=>"CU7s0pNLu0DEtFKtoljSeCAB",
33
33
  "links"=>{"destination"=>nil, "source"=>nil},
34
34
  "merchant_status"=>"underwritten",
35
35
  "meta"=>{"shipping-preference"=>"ground"},
36
36
  "name"=>"Henry Ford",
37
37
  "phone"=>nil,
38
38
  "ssn_last4"=>nil,
39
- "updated_at"=>"2014-05-15T00:41:28.733238Z"},
39
+ "updated_at"=>"2014-12-17T21:25:20.761467Z"},
40
40
  @hyperlinks=
41
- {"bank_accounts"=>
42
- #<Proc:0x007fa7d1b1a410/lib/balanced/utils.rb:6 (lambda)>,
41
+ {"accounts"=>
42
+ #<Proc:0x007fcde116beb0/lib/balanced/utils.rb:6 (lambda)>,
43
+ "bank_accounts"=>
44
+ #<Proc:0x007fcde1160498/lib/balanced/utils.rb:6 (lambda)>,
43
45
  "card_holds"=>
44
- #<Proc:0x007fa7d1b09a20/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fcde1150548/lib/balanced/utils.rb:6 (lambda)>,
45
47
  "cards"=>
46
- #<Proc:0x007fa7d1af31d0/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fcde1141548/lib/balanced/utils.rb:6 (lambda)>,
47
49
  "credits"=>
48
- #<Proc:0x007fa7d1ae87f8/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fcde112e6f0/lib/balanced/utils.rb:6 (lambda)>,
49
51
  "debits"=>
50
- #<Proc:0x007fa7d1adba80/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fcde1117f68/lib/balanced/utils.rb:6 (lambda)>,
51
53
  "destination"=>
52
- #<Proc:0x007fa7d1ada4a0/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007fcde1116000/lib/balanced/utils.rb:6 (lambda)>,
53
55
  "disputes"=>
54
- #<Proc:0x007fa7d1ad1c88/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fcde110f598/lib/balanced/utils.rb:6 (lambda)>,
55
57
  "external_accounts"=>
56
- #<Proc:0x007fa7d1ac0190/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007fcde1107078/lib/balanced/utils.rb:6 (lambda)>,
57
59
  "orders"=>
58
- #<Proc:0x007fa7d1ab1028/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007fcde10e6418/lib/balanced/utils.rb:6 (lambda)>,
59
61
  "refunds"=>
60
- #<Proc:0x007fa7d1aa2870/lib/balanced/utils.rb:6 (lambda)>,
62
+ #<Proc:0x007fcde10cc6d0/lib/balanced/utils.rb:6 (lambda)>,
61
63
  "reversals"=>
62
- #<Proc:0x007fa7d1a93848/lib/balanced/utils.rb:6 (lambda)>,
64
+ #<Proc:0x007fcde10b6420/lib/balanced/utils.rb:6 (lambda)>,
63
65
  "source"=>
64
- #<Proc:0x007fa7d1a8ba80/lib/balanced/utils.rb:6 (lambda)>,
66
+ #<Proc:0x007fcde10b5048/lib/balanced/utils.rb:6 (lambda)>,
65
67
  "transactions"=>
66
- #<Proc:0x007fa7d1a812d8/lib/balanced/utils.rb:6 (lambda)>}>
68
+ #<Proc:0x007fcde10aece8/lib/balanced/utils.rb:6 (lambda)>}>
67
69
 
68
70
  % endif
@@ -2,30 +2,30 @@
2
2
  Balanced::Debit.dispute
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
5
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
6
6
 
7
- debit = Balanced::Debit.fetch('/debits/WD6mairBakAx5t8ETjMYFu7T')
7
+ debit = Balanced::Debit.fetch('/debits/WD7M75BRYlRsQTImIHFf8O9W')
8
8
  dispute = debit.dispute
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Dispute:0x007fa7d1a071e0
11
+ #<Balanced::Dispute:0x007fcde08a0718
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
- "created_at"=>"2014-05-15T00:42:52.610582Z",
14
+ "created_at"=>"2014-12-17T21:25:45.321785Z",
15
15
  "currency"=>"USD",
16
- "href"=>"/disputes/DT6BoisMcacTIu3QWX32JVtl",
17
- "id"=>"DT6BoisMcacTIu3QWX32JVtl",
18
- "initiated_at"=>"2014-05-15T00:42:41.973330Z",
19
- "links"=>{"transaction"=>"WD6mairBakAx5t8ETjMYFu7T"},
16
+ "href"=>"/disputes/DTbbQLxrNf790FmaKsgqRPa",
17
+ "id"=>"DTbbQLxrNf790FmaKsgqRPa",
18
+ "initiated_at"=>"2014-12-17T21:23:52.616968Z",
19
+ "links"=>{"transaction"=>"WD7M75BRYlRsQTImIHFf8O9W"},
20
20
  "meta"=>{},
21
21
  "reason"=>"fraud",
22
- "respond_by"=>"2014-06-14T00:42:41.973334Z",
22
+ "respond_by"=>"2015-01-16T21:23:52.616970Z",
23
23
  "status"=>"pending",
24
- "updated_at"=>"2014-05-15T00:42:52.610592Z"},
24
+ "updated_at"=>"2014-12-17T21:25:45.321787Z"},
25
25
  @hyperlinks=
26
26
  {"events"=>
27
- #<Proc:0x007fa7d19fe0b8/lib/balanced/utils.rb:6 (lambda)>,
27
+ #<Proc:0x007fcde088ab70/lib/balanced/utils.rb:6 (lambda)>,
28
28
  "transaction"=>
29
- #<Proc:0x007fa7d19f6ae8/lib/balanced/resources/resource.rb:60 (lambda)>}>
29
+ #<Proc:0x007fcde0851690/lib/balanced/resources/resource.rb:56 (lambda)>}>
30
30
 
31
31
  % endif
@@ -3,75 +3,81 @@ Balanced::Debit.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
+ Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
7
7
 
8
8
  debits = Balanced::Debit.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Debit:0x007fa7d1968d60
10
+ [#<Balanced::Debit:0x007fcde197e940
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
- "appears_on_statement_as"=>"BAL*example.com",
14
- "created_at"=>"2014-05-15T00:41:37.159166Z",
13
+ "appears_on_statement_as"=>"BAL*Statement text",
14
+ "created_at"=>"2014-12-17T21:25:24.286272Z",
15
15
  "currency"=>"USD",
16
- "description"=>"Order #12341234",
16
+ "description"=>"Some descriptive text for the debit in the dashboard",
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/debits/WD5ewolo9HEVQkv8dcyx87gd",
20
- "id"=>"WD5ewolo9HEVQkv8dcyx87gd",
19
+ "href"=>"/debits/WD7AAkAyeN6YTeHJTn1ThPYA",
20
+ "id"=>"WD7AAkAyeN6YTeHJTn1ThPYA",
21
21
  "links"=>
22
- {"customer"=>"CU2L981m9AtPY8pjpGpjnjnf",
22
+ {"card_hold"=>"HL7Az4UI0XU8rHAqmNY0Snp6",
23
+ "customer"=>nil,
23
24
  "dispute"=>nil,
24
- "order"=>"OR4R53c8wdUiVEUiegSHpwaN",
25
- "source"=>"CC4xXVOyMBDdk7FtzG9HwtBv"},
25
+ "order"=>nil,
26
+ "source"=>"CC73IyzxPUu2z89NH8GrJhLn"},
26
27
  "meta"=>{},
27
28
  "status"=>"succeeded",
28
- "transaction_number"=>"W941-130-0831",
29
- "updated_at"=>"2014-05-15T00:41:40.522871Z"},
29
+ "transaction_number"=>"WDQN-HJW-1YIP",
30
+ "updated_at"=>"2014-12-17T21:25:25.027834Z"},
30
31
  @hyperlinks=
31
- {"customer"=>
32
- #<Proc:0x007fa7d1959f90/lib/balanced/resources/resource.rb:60 (lambda)>,
32
+ {"card_hold"=>
33
+ #<Proc:0x007fcde197ce10/lib/balanced/resources/resource.rb:56 (lambda)>,
34
+ "customer"=>
35
+ #<Proc:0x007fcde197c488/lib/balanced/utils.rb:6 (lambda)>,
33
36
  "dispute"=>
34
- #<Proc:0x007fa7d1958ff0/lib/balanced/utils.rb:6 (lambda)>,
37
+ #<Proc:0x007fcde09abb08/lib/balanced/utils.rb:6 (lambda)>,
35
38
  "events"=>
36
- #<Proc:0x007fa7d1950648/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fcde09a9c40/lib/balanced/utils.rb:6 (lambda)>,
37
40
  "order"=>
38
- #<Proc:0x007fa7d1940a68/lib/balanced/resources/resource.rb:60 (lambda)>,
41
+ #<Proc:0x007fcde09a91f0/lib/balanced/utils.rb:6 (lambda)>,
39
42
  "refunds"=>
40
- #<Proc:0x007fa7d1930708/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fcde09bb3a0/lib/balanced/utils.rb:6 (lambda)>,
41
44
  "source"=>
42
- #<Proc:0x007fa7d19235f8/lib/balanced/resources/resource.rb:60 (lambda)>}>,
43
- #<Balanced::Debit:0x007fa7d1923558
45
+ #<Proc:0x007fcde09b9a28/lib/balanced/resources/resource.rb:56 (lambda)>}>,
46
+ #<Balanced::Debit:0x007fcde09b99d8
44
47
  @attributes=
45
48
  {"amount"=>5000,
46
- "appears_on_statement_as"=>"BAL*Statement text",
47
- "created_at"=>"2014-05-15T00:41:07.283881Z",
49
+ "appears_on_statement_as"=>"BAL*example.com",
50
+ "created_at"=>"2014-12-17T21:25:04.086780Z",
48
51
  "currency"=>"USD",
49
- "description"=>"Some descriptive text for the debit in the dashboard",
52
+ "description"=>"Order #12341234",
50
53
  "failure_reason"=>nil,
51
54
  "failure_reason_code"=>nil,
52
- "href"=>"/debits/WD4GV5z2pEIRZ9cBSuyuykQx",
53
- "id"=>"WD4GV5z2pEIRZ9cBSuyuykQx",
55
+ "href"=>"/debits/WD7dRwgfkmvirShpxn7JA8JL",
56
+ "id"=>"WD7dRwgfkmvirShpxn7JA8JL",
54
57
  "links"=>
55
- {"customer"=>"CU2L981m9AtPY8pjpGpjnjnf",
58
+ {"card_hold"=>"HL7dQKkSsFJpaZppKe2pB4TX",
59
+ "customer"=>nil,
56
60
  "dispute"=>nil,
57
- "order"=>nil,
58
- "source"=>"CC4xXVOyMBDdk7FtzG9HwtBv"},
61
+ "order"=>"OR6c6n11zKSFfjE6kGNKtsE8",
62
+ "source"=>"CC73IyzxPUu2z89NH8GrJhLn"},
59
63
  "meta"=>{},
60
64
  "status"=>"succeeded",
61
- "transaction_number"=>"W235-372-7348",
62
- "updated_at"=>"2014-05-15T00:41:11.755100Z"},
65
+ "transaction_number"=>"WG9L-4UP-ZQQN",
66
+ "updated_at"=>"2014-12-17T21:25:04.922248Z"},
63
67
  @hyperlinks=
64
- {"customer"=>
65
- #<Proc:0x007fa7d191b010/lib/balanced/resources/resource.rb:60 (lambda)>,
68
+ {"card_hold"=>
69
+ #<Proc:0x007fcde09cbe58/lib/balanced/resources/resource.rb:56 (lambda)>,
70
+ "customer"=>
71
+ #<Proc:0x007fcde09cb4d0/lib/balanced/utils.rb:6 (lambda)>,
66
72
  "dispute"=>
67
- #<Proc:0x007fa7d1919b70/lib/balanced/utils.rb:6 (lambda)>,
73
+ #<Proc:0x007fcde09cab48/lib/balanced/utils.rb:6 (lambda)>,
68
74
  "events"=>
69
- #<Proc:0x007fa7d1910e58/lib/balanced/utils.rb:6 (lambda)>,
75
+ #<Proc:0x007fcde09c8d20/lib/balanced/utils.rb:6 (lambda)>,
70
76
  "order"=>
71
- #<Proc:0x007fa7d18ed6b0/lib/balanced/utils.rb:6 (lambda)>,
77
+ #<Proc:0x007fcde09d3310/lib/balanced/resources/resource.rb:56 (lambda)>,
72
78
  "refunds"=>
73
- #<Proc:0x007fa7d18d5fb0/lib/balanced/utils.rb:6 (lambda)>,
79
+ #<Proc:0x007fcde09d14e8/lib/balanced/utils.rb:6 (lambda)>,
74
80
  "source"=>
75
- #<Proc:0x007fa7d18cddd8/lib/balanced/resources/resource.rb:60 (lambda)>}>]
81
+ #<Proc:0x007fcde09dbb28/lib/balanced/resources/resource.rb:56 (lambda)>}>]
76
82
 
77
83
  % endif