balanced 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +10 -6
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/balanced/resources.rb +2 -0
- data/lib/balanced/resources/account.rb +33 -0
- data/lib/balanced/resources/card.rb +1 -1
- data/lib/balanced/resources/customer.rb +8 -0
- data/lib/balanced/resources/resource.rb +4 -6
- data/lib/balanced/resources/settlement.rb +12 -0
- data/lib/balanced/response/balanced_exception_middleware.rb +1 -1
- data/lib/balanced/utils.rb +1 -1
- data/lib/balanced/version.rb +1 -1
- data/scenarios/account_credit/definition.rb +1 -0
- data/scenarios/account_credit/request.rb +5 -0
- data/scenarios/account_credit/ruby.mako +49 -0
- data/scenarios/account_list/definition.rb +1 -0
- data/scenarios/account_list/request.rb +2 -0
- data/scenarios/account_list/ruby.mako +64 -0
- data/scenarios/account_list_customer/definition.rb +1 -0
- data/scenarios/account_list_customer/request.rb +3 -0
- data/scenarios/account_list_customer/ruby.mako +38 -0
- data/scenarios/account_show/definition.rb +1 -0
- data/scenarios/account_show/request.rb +2 -0
- data/scenarios/account_show/ruby.mako +37 -0
- data/scenarios/api_key_create/ruby.mako +6 -6
- data/scenarios/api_key_delete/ruby.mako +2 -2
- data/scenarios/api_key_list/ruby.mako +10 -10
- data/scenarios/api_key_show/ruby.mako +6 -6
- data/scenarios/bank_account_associate_to_customer/ruby.mako +16 -14
- data/scenarios/bank_account_create/ruby.mako +13 -11
- data/scenarios/bank_account_credit/ruby.mako +16 -16
- data/scenarios/bank_account_debit/ruby.mako +21 -18
- data/scenarios/bank_account_debit_order/definition.rb +1 -0
- data/scenarios/bank_account_debit_order/request.rb +7 -0
- data/scenarios/bank_account_debit_order/ruby.mako +52 -0
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +26 -22
- data/scenarios/bank_account_show/ruby.mako +14 -12
- data/scenarios/bank_account_update/ruby.mako +14 -12
- data/scenarios/bank_account_verification_create/ruby.mako +10 -10
- data/scenarios/bank_account_verification_show/ruby.mako +10 -10
- data/scenarios/bank_account_verification_update/ruby.mako +9 -9
- data/scenarios/callback_create/ruby.mako +4 -4
- data/scenarios/callback_delete/ruby.mako +2 -2
- data/scenarios/callback_list/ruby.mako +4 -4
- data/scenarios/callback_show/ruby.mako +5 -5
- data/scenarios/card_associate_to_customer/ruby.mako +26 -26
- data/scenarios/card_create/ruby.mako +13 -15
- data/scenarios/card_create_creditable/ruby.mako +11 -11
- data/scenarios/card_create_dispute/ruby.mako +13 -13
- data/scenarios/card_credit/ruby.mako +16 -14
- data/scenarios/card_credit_order/definition.rb +1 -0
- data/scenarios/card_credit_order/request.rb +7 -0
- data/scenarios/card_credit_order/ruby.mako +45 -0
- data/scenarios/card_debit/ruby.mako +20 -17
- data/scenarios/card_debit_dispute/ruby.mako +20 -17
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +20 -17
- data/scenarios/card_hold_create/ruby.mako +16 -14
- data/scenarios/card_hold_list/ruby.mako +33 -27
- data/scenarios/card_hold_order/definition.rb +1 -0
- data/scenarios/card_hold_order/request.rb +6 -0
- data/scenarios/card_hold_order/ruby.mako +45 -0
- data/scenarios/card_hold_show/ruby.mako +16 -14
- data/scenarios/card_hold_update/ruby.mako +16 -14
- data/scenarios/card_hold_void/ruby.mako +17 -15
- data/scenarios/card_list/ruby.mako +25 -29
- data/scenarios/card_show/ruby.mako +14 -16
- data/scenarios/card_update/ruby.mako +14 -16
- data/scenarios/credit_list/ruby.mako +44 -14
- data/scenarios/credit_list_bank_account/ruby.mako +3 -3
- data/scenarios/credit_order/request.rb +2 -2
- data/scenarios/credit_order/ruby.mako +35 -14
- data/scenarios/credit_show/ruby.mako +16 -16
- data/scenarios/credit_update/ruby.mako +16 -16
- data/scenarios/customer_create/ruby.mako +22 -20
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +43 -39
- data/scenarios/customer_show/ruby.mako +23 -21
- data/scenarios/customer_update/ruby.mako +23 -21
- data/scenarios/debit_dispute_show/ruby.mako +12 -12
- data/scenarios/debit_list/ruby.mako +43 -37
- data/scenarios/debit_order/ruby.mako +22 -19
- data/scenarios/debit_show/ruby.mako +20 -17
- data/scenarios/debit_update/ruby.mako +20 -17
- data/scenarios/dispute_list/ruby.mako +11 -11
- data/scenarios/dispute_show/ruby.mako +12 -12
- data/scenarios/event_list/ruby.mako +55 -81
- data/scenarios/event_show/ruby.mako +35 -45
- data/scenarios/order_create/ruby.mako +16 -14
- data/scenarios/order_list/ruby.mako +33 -29
- data/scenarios/order_show/ruby.mako +16 -14
- data/scenarios/order_update/ruby.mako +16 -14
- data/scenarios/refund_create/ruby.mako +13 -13
- data/scenarios/refund_list/ruby.mako +12 -12
- data/scenarios/refund_show/ruby.mako +13 -13
- data/scenarios/refund_update/ruby.mako +13 -13
- data/scenarios/reversal_create/ruby.mako +13 -13
- data/scenarios/reversal_list/ruby.mako +12 -12
- data/scenarios/reversal_show/ruby.mako +13 -13
- data/scenarios/reversal_update/ruby.mako +13 -13
- data/scenarios/settlement_create/definition.rb +1 -0
- data/scenarios/settlement_create/request.rb +5 -0
- data/scenarios/settlement_create/ruby.mako +48 -0
- data/scenarios/settlement_list/definition.rb +1 -0
- data/scenarios/settlement_list/request.rb +2 -0
- data/scenarios/settlement_list/ruby.mako +40 -0
- data/scenarios/settlement_list_account/definition.rb +1 -0
- data/scenarios/settlement_list_account/request.rb +3 -0
- data/scenarios/settlement_list_account/ruby.mako +41 -0
- data/scenarios/settlement_show/definition.rb +1 -0
- data/scenarios/settlement_show/request.rb +2 -0
- data/scenarios/settlement_show/ruby.mako +40 -0
- data/snippets/account-balance.rb +1 -0
- data/snippets/bank-account-create.rb +6 -0
- data/snippets/bank-account-debit.rb +9 -0
- data/snippets/bank-account-verification-confirm.rb +5 -0
- data/snippets/bank-account-verification-create.rb +1 -0
- data/snippets/callback-create.rb +4 -0
- data/snippets/card-associate-to-customer.rb +2 -0
- data/snippets/card-create-dispute.rb +6 -0
- data/snippets/card-create.rb +7 -0
- data/snippets/card-credit.rb +9 -0
- data/snippets/card-debit.rb +9 -0
- data/snippets/card-hold-capture.rb +6 -0
- data/snippets/card-hold-create.rb +6 -0
- data/snippets/card-hold-void.rb +3 -0
- data/snippets/create-buyer-and-card.rb +13 -0
- data/snippets/credit-create.rb +8 -0
- data/snippets/credit-fetch.rb +1 -0
- data/snippets/credit-marketplace-escrow.rb +4 -0
- data/snippets/credit-reverse.rb +1 -0
- data/snippets/credit-soft-descriptor.rb +9 -0
- data/snippets/credit-split.rb +13 -0
- data/snippets/customer-create.rb +8 -0
- data/snippets/debit-dispute-show.rb +3 -0
- data/snippets/debit-fetch.rb +1 -0
- data/snippets/debit-marketplace-escrow.rb +4 -0
- data/snippets/debit-refund.rb +1 -0
- data/snippets/dispute-list.rb +1 -0
- data/snippets/dispute-show.rb +2 -0
- data/snippets/examine-order-after-refund.rb +3 -0
- data/snippets/examine-order-after-reversal.rb +3 -0
- data/snippets/example.rb +1 -0
- data/snippets/marketplace-in-escrow.rb +1 -0
- data/snippets/merchant-payable-account-fetch.rb +2 -0
- data/snippets/order-amount-escrowed.rb +3 -0
- data/snippets/order-bank-account-create.rb +8 -0
- data/snippets/order-create.rb +1 -0
- data/snippets/order-credit-marketplace.rb +5 -0
- data/snippets/order-credit-merchant-payable-account.rb +4 -0
- data/snippets/order-credit.rb +4 -0
- data/snippets/order-credits-fetch.rb +1 -0
- data/snippets/order-debit.rb +4 -0
- data/snippets/order-debits-fetch.rb +1 -0
- data/snippets/order-fetch.rb +1 -0
- data/snippets/order-update.rb +5 -0
- data/snippets/refund-create.rb +13 -0
- data/snippets/reversal-create.rb +13 -0
- data/snippets/settlement-create.rb +5 -0
- data/spec/balanced/resources/account_spec.rb +265 -0
- data/spec/balanced/resources/card_spec.rb +6 -6
- metadata +86 -2
@@ -64,7 +64,7 @@ describe Balanced::Card, :vcr do
|
|
64
64
|
its(:can_debit) { should eql true }
|
65
65
|
its(:bank_name) { should eql 'WELLS FARGO BANK, N.A.' }
|
66
66
|
its(:category) { should eql 'other' }
|
67
|
-
its(:
|
67
|
+
its(:class) { should eql Balanced::Card }
|
68
68
|
end
|
69
69
|
|
70
70
|
describe '#credit' do
|
@@ -80,13 +80,13 @@ describe Balanced::Card, :vcr do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
describe 'attributes', :vcr do
|
83
|
-
let(:
|
83
|
+
let(:the_credit) { @credit }
|
84
84
|
|
85
85
|
it 'should have valid attributes' do
|
86
|
-
expect(
|
87
|
-
expect(
|
88
|
-
expect(
|
89
|
-
expect(
|
86
|
+
expect(the_credit.href).to eq("/credits/#{@credit.id}")
|
87
|
+
expect(the_credit.amount).to eq(1234)
|
88
|
+
expect(the_credit.meta).to eq(@meta)
|
89
|
+
expect(the_credit.status).to eq('succeeded')
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: balanced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Balanced
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- lib/balanced/error.rb
|
94
94
|
- lib/balanced/pager.rb
|
95
95
|
- lib/balanced/resources.rb
|
96
|
+
- lib/balanced/resources/account.rb
|
96
97
|
- lib/balanced/resources/api_key.rb
|
97
98
|
- lib/balanced/resources/bank_account.rb
|
98
99
|
- lib/balanced/resources/callback.rb
|
@@ -110,10 +111,23 @@ files:
|
|
110
111
|
- lib/balanced/resources/refund.rb
|
111
112
|
- lib/balanced/resources/resource.rb
|
112
113
|
- lib/balanced/resources/reversal.rb
|
114
|
+
- lib/balanced/resources/settlement.rb
|
113
115
|
- lib/balanced/resources/transfer.rb
|
114
116
|
- lib/balanced/response/balanced_exception_middleware.rb
|
115
117
|
- lib/balanced/utils.rb
|
116
118
|
- lib/balanced/version.rb
|
119
|
+
- scenarios/account_credit/definition.rb
|
120
|
+
- scenarios/account_credit/request.rb
|
121
|
+
- scenarios/account_credit/ruby.mako
|
122
|
+
- scenarios/account_list/definition.rb
|
123
|
+
- scenarios/account_list/request.rb
|
124
|
+
- scenarios/account_list/ruby.mako
|
125
|
+
- scenarios/account_list_customer/definition.rb
|
126
|
+
- scenarios/account_list_customer/request.rb
|
127
|
+
- scenarios/account_list_customer/ruby.mako
|
128
|
+
- scenarios/account_show/definition.rb
|
129
|
+
- scenarios/account_show/request.rb
|
130
|
+
- scenarios/account_show/ruby.mako
|
117
131
|
- scenarios/api_key_create/definition.rb
|
118
132
|
- scenarios/api_key_create/request.rb
|
119
133
|
- scenarios/api_key_create/ruby.mako
|
@@ -138,6 +152,9 @@ files:
|
|
138
152
|
- scenarios/bank_account_debit/definition.rb
|
139
153
|
- scenarios/bank_account_debit/request.rb
|
140
154
|
- scenarios/bank_account_debit/ruby.mako
|
155
|
+
- scenarios/bank_account_debit_order/definition.rb
|
156
|
+
- scenarios/bank_account_debit_order/request.rb
|
157
|
+
- scenarios/bank_account_debit_order/ruby.mako
|
141
158
|
- scenarios/bank_account_delete/definition.rb
|
142
159
|
- scenarios/bank_account_delete/request.rb
|
143
160
|
- scenarios/bank_account_delete/ruby.mako
|
@@ -186,6 +203,9 @@ files:
|
|
186
203
|
- scenarios/card_credit/definition.rb
|
187
204
|
- scenarios/card_credit/request.rb
|
188
205
|
- scenarios/card_credit/ruby.mako
|
206
|
+
- scenarios/card_credit_order/definition.rb
|
207
|
+
- scenarios/card_credit_order/request.rb
|
208
|
+
- scenarios/card_credit_order/ruby.mako
|
189
209
|
- scenarios/card_debit/definition.rb
|
190
210
|
- scenarios/card_debit/request.rb
|
191
211
|
- scenarios/card_debit/ruby.mako
|
@@ -204,6 +224,9 @@ files:
|
|
204
224
|
- scenarios/card_hold_list/definition.rb
|
205
225
|
- scenarios/card_hold_list/request.rb
|
206
226
|
- scenarios/card_hold_list/ruby.mako
|
227
|
+
- scenarios/card_hold_order/definition.rb
|
228
|
+
- scenarios/card_hold_order/request.rb
|
229
|
+
- scenarios/card_hold_order/ruby.mako
|
207
230
|
- scenarios/card_hold_show/definition.rb
|
208
231
|
- scenarios/card_hold_show/request.rb
|
209
232
|
- scenarios/card_hold_show/ruby.mako
|
@@ -317,8 +340,68 @@ files:
|
|
317
340
|
- scenarios/reversal_update/definition.rb
|
318
341
|
- scenarios/reversal_update/request.rb
|
319
342
|
- scenarios/reversal_update/ruby.mako
|
343
|
+
- scenarios/settlement_create/definition.rb
|
344
|
+
- scenarios/settlement_create/request.rb
|
345
|
+
- scenarios/settlement_create/ruby.mako
|
346
|
+
- scenarios/settlement_list/definition.rb
|
347
|
+
- scenarios/settlement_list/request.rb
|
348
|
+
- scenarios/settlement_list/ruby.mako
|
349
|
+
- scenarios/settlement_list_account/definition.rb
|
350
|
+
- scenarios/settlement_list_account/request.rb
|
351
|
+
- scenarios/settlement_list_account/ruby.mako
|
352
|
+
- scenarios/settlement_show/definition.rb
|
353
|
+
- scenarios/settlement_show/request.rb
|
354
|
+
- scenarios/settlement_show/ruby.mako
|
355
|
+
- snippets/account-balance.rb
|
356
|
+
- snippets/bank-account-create.rb
|
357
|
+
- snippets/bank-account-debit.rb
|
358
|
+
- snippets/bank-account-verification-confirm.rb
|
359
|
+
- snippets/bank-account-verification-create.rb
|
360
|
+
- snippets/callback-create.rb
|
361
|
+
- snippets/card-associate-to-customer.rb
|
362
|
+
- snippets/card-create-dispute.rb
|
363
|
+
- snippets/card-create.rb
|
364
|
+
- snippets/card-credit.rb
|
365
|
+
- snippets/card-debit.rb
|
366
|
+
- snippets/card-hold-capture.rb
|
367
|
+
- snippets/card-hold-create.rb
|
368
|
+
- snippets/card-hold-void.rb
|
369
|
+
- snippets/create-buyer-and-card.rb
|
370
|
+
- snippets/credit-create.rb
|
371
|
+
- snippets/credit-fetch.rb
|
372
|
+
- snippets/credit-marketplace-escrow.rb
|
373
|
+
- snippets/credit-reverse.rb
|
374
|
+
- snippets/credit-soft-descriptor.rb
|
375
|
+
- snippets/credit-split.rb
|
376
|
+
- snippets/customer-create.rb
|
377
|
+
- snippets/debit-dispute-show.rb
|
378
|
+
- snippets/debit-fetch.rb
|
379
|
+
- snippets/debit-marketplace-escrow.rb
|
380
|
+
- snippets/debit-refund.rb
|
381
|
+
- snippets/dispute-list.rb
|
382
|
+
- snippets/dispute-show.rb
|
383
|
+
- snippets/examine-order-after-refund.rb
|
384
|
+
- snippets/examine-order-after-reversal.rb
|
385
|
+
- snippets/example.rb
|
386
|
+
- snippets/marketplace-in-escrow.rb
|
387
|
+
- snippets/merchant-payable-account-fetch.rb
|
388
|
+
- snippets/order-amount-escrowed.rb
|
389
|
+
- snippets/order-bank-account-create.rb
|
390
|
+
- snippets/order-create.rb
|
391
|
+
- snippets/order-credit-marketplace.rb
|
392
|
+
- snippets/order-credit-merchant-payable-account.rb
|
393
|
+
- snippets/order-credit.rb
|
394
|
+
- snippets/order-credits-fetch.rb
|
395
|
+
- snippets/order-debit.rb
|
396
|
+
- snippets/order-debits-fetch.rb
|
397
|
+
- snippets/order-fetch.rb
|
398
|
+
- snippets/order-update.rb
|
399
|
+
- snippets/refund-create.rb
|
400
|
+
- snippets/reversal-create.rb
|
401
|
+
- snippets/settlement-create.rb
|
320
402
|
- spec/balanced/error_spec.rb
|
321
403
|
- spec/balanced/pager_spec.rb
|
404
|
+
- spec/balanced/resources/account_spec.rb
|
322
405
|
- spec/balanced/resources/api_key_spec.rb
|
323
406
|
- spec/balanced/resources/bank_account_spec.rb
|
324
407
|
- spec/balanced/resources/callback_spec.rb
|
@@ -363,6 +446,7 @@ summary: https://docs.balancedpayments.com/
|
|
363
446
|
test_files:
|
364
447
|
- spec/balanced/error_spec.rb
|
365
448
|
- spec/balanced/pager_spec.rb
|
449
|
+
- spec/balanced/resources/account_spec.rb
|
366
450
|
- spec/balanced/resources/api_key_spec.rb
|
367
451
|
- spec/balanced/resources/bank_account_spec.rb
|
368
452
|
- spec/balanced/resources/callback_spec.rb
|