balanced 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -0
- data/balanced.gemspec +1 -1
- data/lib/balanced/client.rb +1 -2
- data/lib/balanced/error.rb +3 -3
- data/lib/balanced/resources/card.rb +15 -1
- data/lib/balanced/version.rb +1 -1
- 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 +14 -14
- data/scenarios/bank_account_create/ruby.mako +11 -11
- data/scenarios/bank_account_credit/ruby.mako +15 -15
- data/scenarios/bank_account_debit/ruby.mako +15 -15
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +22 -22
- data/scenarios/bank_account_show/ruby.mako +12 -12
- data/scenarios/bank_account_update/ruby.mako +12 -12
- data/scenarios/bank_account_verification_create/definition.rb +1 -1
- data/scenarios/bank_account_verification_create/ruby.mako +10 -10
- data/scenarios/bank_account_verification_show/definition.rb +1 -1
- data/scenarios/bank_account_verification_show/request.rb +1 -1
- data/scenarios/bank_account_verification_show/ruby.mako +10 -10
- data/scenarios/bank_account_verification_update/definition.rb +1 -1
- data/scenarios/bank_account_verification_update/request.rb +1 -1
- data/scenarios/bank_account_verification_update/ruby.mako +10 -10
- 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 +21 -12
- data/scenarios/card_create/ruby.mako +18 -9
- data/scenarios/card_create_creditable/definition.rb +1 -0
- data/scenarios/card_create_creditable/request.rb +4 -0
- data/scenarios/card_create_creditable/ruby.mako +62 -0
- data/scenarios/card_create_dispute/ruby.mako +18 -9
- data/scenarios/card_credit/definition.rb +1 -0
- data/scenarios/card_credit/request.rb +5 -0
- data/scenarios/card_credit/ruby.mako +43 -0
- data/scenarios/card_debit/ruby.mako +16 -16
- data/scenarios/card_debit_dispute/ruby.mako +15 -15
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +16 -16
- data/scenarios/card_hold_create/ruby.mako +14 -14
- data/scenarios/card_hold_list/ruby.mako +25 -25
- data/scenarios/card_hold_show/ruby.mako +14 -14
- data/scenarios/card_hold_update/ruby.mako +14 -14
- data/scenarios/card_hold_void/ruby.mako +15 -15
- data/scenarios/card_list/ruby.mako +36 -18
- data/scenarios/card_show/ruby.mako +19 -10
- data/scenarios/card_update/ruby.mako +19 -10
- data/scenarios/credit_list/ruby.mako +14 -14
- data/scenarios/credit_list_bank_account/ruby.mako +2 -2
- data/scenarios/credit_order/definition.rb +1 -0
- data/scenarios/credit_order/request.rb +7 -0
- data/scenarios/credit_order/ruby.mako +26 -0
- data/scenarios/credit_show/ruby.mako +15 -15
- data/scenarios/credit_update/ruby.mako +15 -15
- data/scenarios/customer_create/ruby.mako +20 -18
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +39 -35
- data/scenarios/customer_show/ruby.mako +21 -19
- data/scenarios/customer_update/ruby.mako +21 -19
- data/scenarios/debit_dispute_show/ruby.mako +12 -12
- data/scenarios/debit_list/ruby.mako +34 -34
- data/scenarios/debit_order/definition.rb +1 -0
- data/scenarios/debit_order/request.rb +7 -0
- data/scenarios/debit_order/ruby.mako +49 -0
- data/scenarios/debit_show/ruby.mako +16 -16
- data/scenarios/debit_update/ruby.mako +16 -16
- data/scenarios/dispute_list/ruby.mako +11 -11
- data/scenarios/dispute_show/ruby.mako +12 -12
- data/scenarios/event_list/ruby.mako +56 -55
- data/scenarios/event_show/ruby.mako +41 -35
- data/scenarios/order_create/ruby.mako +14 -14
- data/scenarios/order_list/ruby.mako +45 -13
- data/scenarios/order_show/ruby.mako +14 -14
- data/scenarios/order_update/ruby.mako +14 -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/render_mako.rb +1 -1
- data/scenarios/reversal_create/ruby.mako +12 -12
- data/scenarios/reversal_list/ruby.mako +11 -11
- data/scenarios/reversal_show/ruby.mako +12 -12
- data/scenarios/reversal_update/ruby.mako +12 -12
- data/spec/balanced/resources/card_spec.rb +73 -11
- data/spec/balanced/resources/credit_spec.rb +155 -26
- data/spec/balanced/response/balanced_exception_middleware_spec.rb +1 -2
- data/spec/spec_helper.rb +3 -1
- 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-
|
5
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
6
6
|
|
7
7
|
disputes = Balanced::Dispute.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Dispute:
|
9
|
+
[#<Balanced::Dispute:0x007fa7d30e1230
|
10
10
|
@attributes=
|
11
11
|
{"amount"=>5000,
|
12
|
-
"created_at"=>"2014-
|
12
|
+
"created_at"=>"2014-05-15T00:42:52.610582Z",
|
13
13
|
"currency"=>"USD",
|
14
|
-
"href"=>"/disputes/
|
15
|
-
"id"=>"
|
16
|
-
"initiated_at"=>"2014-
|
17
|
-
"links"=>{"transaction"=>"
|
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-
|
20
|
+
"respond_by"=>"2014-06-14T00:42:41.973334Z",
|
21
21
|
"status"=>"pending",
|
22
|
-
"updated_at"=>"2014-
|
22
|
+
"updated_at"=>"2014-05-15T00:42:52.610592Z"},
|
23
23
|
@hyperlinks=
|
24
24
|
{"events"=>
|
25
|
-
#<Proc:
|
25
|
+
#<Proc:0x007fa7d30daef8/lib/balanced/utils.rb:6 (lambda)>,
|
26
26
|
"transaction"=>
|
27
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
dispute = Balanced::Dispute.fetch('/disputes/
|
8
|
+
dispute = Balanced::Dispute.fetch('/disputes/DT6BoisMcacTIu3QWX32JVtl')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Dispute:
|
11
|
+
#<Balanced::Dispute:0x007fa7d30c2740
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-05-15T00:42:52.610582Z",
|
15
15
|
"currency"=>"USD",
|
16
|
-
"href"=>"/disputes/
|
17
|
-
"id"=>"
|
18
|
-
"initiated_at"=>"2014-
|
19
|
-
"links"=>{"transaction"=>"
|
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-
|
22
|
+
"respond_by"=>"2014-06-14T00:42:41.973334Z",
|
23
23
|
"status"=>"pending",
|
24
|
-
"updated_at"=>"2014-
|
24
|
+
"updated_at"=>"2014-05-15T00:42:52.610592Z"},
|
25
25
|
@hyperlinks=
|
26
26
|
{"events"=>
|
27
|
-
#<Proc:
|
27
|
+
#<Proc:0x007fa7d30c0558/lib/balanced/utils.rb:6 (lambda)>,
|
28
28
|
"transaction"=>
|
29
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
8
|
events = Balanced::Event.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Event:
|
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-
|
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/
|
75
|
-
"id"=>"
|
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-
|
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/
|
98
|
-
"id"=>"
|
53
|
+
"href"=>"/events/EV2cc035eedbc911e38d4f061e5f402045",
|
54
|
+
"id"=>"EV2cc035eedbc911e38d4f061e5f402045",
|
99
55
|
"links"=>{},
|
100
|
-
"occurred_at"=>"2014-
|
56
|
+
"occurred_at"=>"2014-05-15T00:38:03.766000Z",
|
101
57
|
"type"=>"account.created"},
|
102
58
|
@hyperlinks=
|
103
59
|
{"callbacks"=>
|
104
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
event = Balanced::Event.fetch('/events/
|
8
|
+
event = Balanced::Event.fetch('/events/EV2cc035eedbc911e38d4f061e5f402045')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Event:
|
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
|
-
{"
|
17
|
-
[{"
|
18
|
-
|
19
|
-
|
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"=>
|
22
|
+
"postal_code"=>"90210",
|
25
23
|
"state"=>nil},
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
|
35
|
-
|
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"=>"
|
38
|
-
"
|
39
|
-
"
|
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.
|
42
|
-
|
43
|
-
"
|
44
|
-
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
|
49
|
-
|
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-
|
52
|
-
"type"=>"
|
57
|
+
"occurred_at"=>"2014-05-15T00:38:03.766000Z",
|
58
|
+
"type"=>"account.created"},
|
53
59
|
@hyperlinks=
|
54
60
|
{"callbacks"=>
|
55
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
merchant_customer = Balanced::Customer.fetch('/customers/
|
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:
|
13
|
+
#<Balanced::Order:0x007fa7d32081e0
|
14
14
|
@attributes=
|
15
15
|
{"amount"=>0,
|
16
16
|
"amount_escrowed"=>0,
|
17
|
-
"created_at"=>"2014-
|
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/
|
28
|
-
"id"=>"
|
29
|
-
"links"=>{"merchant"=>"
|
27
|
+
"href"=>"/orders/OR6Zx317bzTVRgDxt3JqnZIx",
|
28
|
+
"id"=>"OR6Zx317bzTVRgDxt3JqnZIx",
|
29
|
+
"links"=>{"merchant"=>"CU56PvhKAwSiV6LahZCcBMJ7"},
|
30
30
|
"meta"=>{},
|
31
|
-
"updated_at"=>"2014-
|
31
|
+
"updated_at"=>"2014-05-15T00:43:14.079632Z"},
|
32
32
|
@hyperlinks=
|
33
33
|
{"buyers"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa7d3204e00/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"credits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa7d3202588/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"debits"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa7d31fb8a0/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"merchant"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa7d31f97f8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
41
41
|
"refunds"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa7d31f30d8/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"reversals"=>
|
44
|
-
#<Proc:
|
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-
|
5
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
6
6
|
|
7
7
|
orders = Balanced::Order.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Order:
|
9
|
+
[#<Balanced::Order:0x007fa7d33a99b8
|
10
10
|
@attributes=
|
11
11
|
{"amount"=>0,
|
12
12
|
"amount_escrowed"=>0,
|
13
|
-
"created_at"=>"2014-
|
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/
|
24
|
-
"id"=>"
|
25
|
-
"links"=>{"merchant"=>"
|
23
|
+
"href"=>"/orders/OR6Zx317bzTVRgDxt3JqnZIx",
|
24
|
+
"id"=>"OR6Zx317bzTVRgDxt3JqnZIx",
|
25
|
+
"links"=>{"merchant"=>"CU56PvhKAwSiV6LahZCcBMJ7"},
|
26
26
|
"meta"=>{},
|
27
|
-
"updated_at"=>"2014-
|
27
|
+
"updated_at"=>"2014-05-15T00:43:14.079632Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"buyers"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa7d33a28c0/lib/balanced/utils.rb:6 (lambda)>,
|
31
31
|
"credits"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa7d339be08/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa7d3399360/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"merchant"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa7d3392f10/lib/balanced/resources/resource.rb:60 (lambda)>,
|
37
37
|
"refunds"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa7d3390620/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"reversals"=>
|
40
|
-
#<Proc:
|
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
|