espago 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +15 -8
  3. data/Gemfile +2 -0
  4. data/Gemfile.lock +259 -130
  5. data/README.md +13 -15
  6. data/app/views/espago_secure_web_page/_form.html.haml +3 -2
  7. data/espago.gemspec +13 -12
  8. data/lib/espago/api_connection/charges_complete_post.rb +1 -1
  9. data/lib/espago/api_connection/refunds_post.rb +9 -0
  10. data/lib/espago/api_connection/secure_web_page_register_post.rb +9 -0
  11. data/lib/espago/api_connection/tokens_post.rb +1 -1
  12. data/lib/espago/api_connection/visacheckout_post.rb +9 -0
  13. data/lib/espago/api_connection.rb +4 -2
  14. data/lib/espago/client.rb +5 -6
  15. data/lib/espago/secure_web_page.rb +13 -10
  16. data/lib/espago/version.rb +1 -1
  17. data/spec/espago/api_connection_spec.rb +1 -1
  18. data/spec/espago/back_request_spec.rb +11 -11
  19. data/spec/espago/client_spec.rb +8 -8
  20. data/spec/espago/error_spec.rb +4 -3
  21. data/spec/espago/response_spec.rb +10 -10
  22. data/spec/espago/router_spec.rb +5 -6
  23. data/spec/features/apis_spec.rb +2 -2
  24. data/spec/features/charges_spec.rb +19 -19
  25. data/spec/features/charges_spec_with_params_spec.rb +22 -22
  26. data/spec/features/clients_spec.rb +28 -28
  27. data/spec/features/dcc_decision_spec.rb +7 -7
  28. data/spec/features/invoice_items_spec.rb +9 -9
  29. data/spec/features/invoices_spec.rb +6 -6
  30. data/spec/features/line_items_spec.rb +5 -5
  31. data/spec/features/plans_spec.rb +14 -14
  32. data/spec/features/secure_web_page_register_spec.rb +23 -0
  33. data/spec/features/subscriptions_spec.rb +13 -13
  34. data/spec/features/tokens_spec.rb +15 -16
  35. data/spec/fixtures/cassettes/api_2.yml +1 -1
  36. data/spec/fixtures/cassettes/api_3.yml +1 -1
  37. data/spec/fixtures/cassettes/charges_complete.yml +1 -1
  38. data/spec/fixtures/cassettes/charges_complete_deprecation.yml +1 -1
  39. data/spec/fixtures/cassettes/charges_destroy.yml +1 -1
  40. data/spec/fixtures/cassettes/charges_get.yml +1 -1
  41. data/spec/fixtures/cassettes/charges_get_pay_mTOngouLTJWZ0w.yml +3 -1
  42. data/spec/fixtures/cassettes/charges_post.yml +3 -1
  43. data/spec/fixtures/cassettes/charges_refund.yml +3 -1
  44. data/spec/fixtures/cassettes/clients_authorize.yml +3 -1
  45. data/spec/fixtures/cassettes/clients_delete.yml +3 -1
  46. data/spec/fixtures/cassettes/clients_get.yml +3 -1
  47. data/spec/fixtures/cassettes/clients_get_cli_w0Se2smYwyQ0Uw.yml +3 -1
  48. data/spec/fixtures/cassettes/clients_invoices.yml +3 -1
  49. data/spec/fixtures/cassettes/clients_post.yml +3 -1
  50. data/spec/fixtures/cassettes/clients_put.yml +3 -1
  51. data/spec/fixtures/cassettes/clients_subscriptions.yml +3 -1
  52. data/spec/fixtures/cassettes/dcc_decision_post.yml +3 -1
  53. data/spec/fixtures/cassettes/error_400.yml +3 -1
  54. data/spec/fixtures/cassettes/error_401.yml +3 -1
  55. data/spec/fixtures/cassettes/error_500.yml +3 -1
  56. data/spec/fixtures/cassettes/invoice_items_delete_ii_WDzszvhTshe78Xd.yml +3 -1
  57. data/spec/fixtures/cassettes/invoice_items_get_ii_5LS-YR7S1QaJBl3.yml +3 -1
  58. data/spec/fixtures/cassettes/invoice_items_post_ii_5LS-YR7S1QaJBl3.yml +3 -1
  59. data/spec/fixtures/cassettes/invoices_get.yml +3 -1
  60. data/spec/fixtures/cassettes/invoices_get_in_tUCMhwlg2nkvAaL.yml +3 -1
  61. data/spec/fixtures/cassettes/line_items_get.yml +1 -1
  62. data/spec/fixtures/cassettes/plans_delete.yml +1 -1
  63. data/spec/fixtures/cassettes/plans_get.yml +1 -1
  64. data/spec/fixtures/cassettes/plans_get_pl_12345.yml +1 -1
  65. data/spec/fixtures/cassettes/plans_post.yml +3 -1
  66. data/spec/fixtures/cassettes/plans_put.yml +3 -1
  67. data/spec/fixtures/cassettes/secure_web_page_register_post.yml +56 -0
  68. data/spec/fixtures/cassettes/subscriptions_delete_sub_8yYuCBKdywr7e2.yml +3 -1
  69. data/spec/fixtures/cassettes/subscriptions_get.yml +1 -1
  70. data/spec/fixtures/cassettes/subscriptions_get_sub_8yYuCBKdywr7e2.yml +1 -1
  71. data/spec/fixtures/cassettes/subscriptions_post.yml +3 -1
  72. data/spec/fixtures/cassettes/tokens_get.yml +3 -1
  73. data/spec/fixtures/cassettes/tokens_post.yml +3 -1
  74. data/spec/spec_helper.rb +4 -7
  75. metadata +58 -23
@@ -5,18 +5,18 @@ describe 'Espago.invoices' do
5
5
  it "should get list of invoices" do
6
6
  VCR.use_cassette('invoices get') do
7
7
  response = Espago.invoices :get
8
- response.count.should eq(1)
9
- response.invoices.size.should eq(1)
8
+ expect(response.count).to eq(1)
9
+ expect(response.invoices.size).to eq(1)
10
10
  end
11
11
  end
12
12
 
13
13
  it "should get info abount invoices" do
14
14
  VCR.use_cassette('invoices get in_tUCMhwlg2nkvAaL') do
15
15
  response = Espago.invoices :get,{invoice_id:'in_tUCMhwlg2nkvAaL'}
16
- response.paid.should eq(true)
17
- response.client.should eq('cli_90Pi6Jf0ndl_PP')
18
- response.amount.should eq('123.45')
19
- response.created_at.should eq Time.at(1417030497)
16
+ expect(response.paid).to eq(true)
17
+ expect(response.client).to eq('cli_90Pi6Jf0ndl_PP')
18
+ expect(response.amount).to eq('123.45')
19
+ expect(response.created_at).to eq Time.at(1417030497)
20
20
  end
21
21
  end
22
22
 
@@ -5,11 +5,11 @@ describe 'Espago.line_items' do
5
5
  it "should get info abount line_items" do
6
6
  VCR.use_cassette('line_items get') do
7
7
  response = Espago.line_items :get,{invoice_id:'in_tUCMhwlg2nkvAaL'}
8
- response.count.should eq(1)
9
- response.invoice_items[0]['client'].should eq('cli_90Pi6Jf0ndl_PP')
10
- response.invoice_items[0]['amount'].should eq('123.45')
11
- response.invoice_items[0]['description'].should eq('Golden plan')
12
- response.invoice_items[0]['created_at'].should eq(1417030496)
8
+ expect(response.count).to eq(1)
9
+ expect(response.invoice_items[0]['client']).to eq('cli_90Pi6Jf0ndl_PP')
10
+ expect(response.invoice_items[0]['amount']).to eq('123.45')
11
+ expect(response.invoice_items[0]['description']).to eq('Golden plan')
12
+ expect(response.invoice_items[0]['created_at']).to eq(1417030496)
13
13
  end
14
14
  end
15
15
 
@@ -5,19 +5,19 @@ describe 'Espago.plans' do
5
5
  it "should get list of plans" do
6
6
  VCR.use_cassette('plans get') do
7
7
  response = Espago.plans :get
8
- response.count.should eq(1)
9
- response.plans.size.should eq(1)
8
+ expect(response.count).to eq(1)
9
+ expect(response.plans.size).to eq(1)
10
10
  end
11
11
  end
12
12
 
13
13
  it "should get info abount plans" do
14
14
  VCR.use_cassette('plans get pl_12345') do
15
15
  response = Espago.plans :get,{plan_id:'pl_12345'}
16
- response.description.should eq('Golden plan')
17
- response.period.should eq(5)
18
- response.period_unit.should eq('days')
19
- response.amount.should eq(123.45)
20
- response.created_at.should eq Time.at(1413807490)
16
+ expect(response.description).to eq('Golden plan')
17
+ expect(response.period).to eq(5)
18
+ expect(response.period_unit).to eq('days')
19
+ expect(response.amount).to eq(123.45)
20
+ expect(response.created_at).to eq Time.at(1413807490)
21
21
  end
22
22
  end
23
23
 
@@ -29,11 +29,11 @@ describe 'Espago.plans' do
29
29
  currency: 'pln',
30
30
  description: 'Test Plan'
31
31
  }
32
- response.status.should eq(201)
33
- response.description.should eq('Test Plan')
34
- response.period.should eq(14)
35
- response.period_unit.should eq('day')
36
- response.amount.should eq('49.99')
32
+ expect(response.status).to eq(201)
33
+ expect(response.description).to eq('Test Plan')
34
+ expect(response.period).to eq(14)
35
+ expect(response.period_unit).to eq('day')
36
+ expect(response.amount).to eq('49.99')
37
37
  end
38
38
  end
39
39
 
@@ -47,14 +47,14 @@ describe 'Espago.plans' do
47
47
  currency: 'pln',
48
48
  description: 'Test Plan'
49
49
  }
50
- response.status.should eq(204)
50
+ expect(response.status).to eq(204)
51
51
  end
52
52
  end
53
53
 
54
54
  it "should get 204 after deleted plan" do
55
55
  VCR.use_cassette('plans delete') do
56
56
  response = Espago.plans :delete, { plan_id: 'pl_XczKHr_42CRiKXZ'}
57
- response.status.should eq(204)
57
+ expect(response.status).to eq(204)
58
58
  end
59
59
  end
60
60
 
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Espago.secure_web_page_register' do
4
+ it 'should get params from new charge' do
5
+ VCR.use_cassette('secure_web_page_register post') do
6
+ Espago.app_id = 'app12345'
7
+ Espago.app_password = 'Api12345'
8
+ Espago.api_version = '3'
9
+ response = Espago.secure_web_page_register :post,
10
+ amount: '49.99',
11
+ currency: 'PLN',
12
+ description: 'Test12345',
13
+ client_description: 'Jan Kowalski',
14
+ kind: 'sale'
15
+ expect(response.status).to eq(201)
16
+ expect(response.state).to eq('new')
17
+ expect(response.currency).to eq('PLN')
18
+ expect(response.description).to eq('Test12345')
19
+ expect(response.id).to eq('pay_770swCpLvm5dzrqk')
20
+ expect(response.created_at).to eq Time.at(1_555_344_189)
21
+ end
22
+ end
23
+ end
@@ -5,37 +5,37 @@ describe 'Espago.subscriptions' do
5
5
  it "should get list of subscriptions" do
6
6
  VCR.use_cassette('subscriptions get') do
7
7
  response = Espago.subscriptions :get
8
- response.count.should eq(1)
9
- response.subscriptions.size.should eq(1)
8
+ expect(response.count).to eq(1)
9
+ expect(response.subscriptions.size).to eq(1)
10
10
  end
11
11
  end
12
12
 
13
13
  it "should get info abount subscriptions" do
14
14
  VCR.use_cassette('subscriptions get sub_8yYuCBKdywr7e2') do
15
15
  response = Espago.subscriptions :get,{subscription_id:'sub_8yYuCBKdywr7e2'}
16
- response.status.should eq(200)
17
- response.state.should eq('active')
18
- response.client.should eq('cli_90Pi6Jf0ndl_PP')
19
- response.plan.should eq('pl_12345')
20
- response.last_invoice.should be_kind_of(Hash)
16
+ expect(response.status).to eq(200)
17
+ expect(response.state).to eq('active')
18
+ expect(response.client).to eq('cli_90Pi6Jf0ndl_PP')
19
+ expect(response.plan).to eq('pl_12345')
20
+ expect(response.last_invoice).to be_kind_of(Hash)
21
21
  end
22
22
  end
23
23
 
24
24
  it "should get params from new plan" do
25
25
  VCR.use_cassette('subscriptions post') do
26
26
  response = Espago.subscriptions :post,{ plan:'pl_12345',client:'cli_90Pi6Jf0ndl_PP'}
27
- response.status.should eq(201)
28
- response.state.should eq('active')
29
- response.client.should eq('cli_90Pi6Jf0ndl_PP')
30
- response.plan.should eq('pl_12345')
31
- response.last_invoice.should be_kind_of(Hash)
27
+ expect(response.status).to eq(201)
28
+ expect(response.state).to eq('active')
29
+ expect(response.client).to eq('cli_90Pi6Jf0ndl_PP')
30
+ expect(response.plan).to eq('pl_12345')
31
+ expect(response.last_invoice).to be_kind_of(Hash)
32
32
  end
33
33
  end
34
34
 
35
35
  it "should get info after deleted subscription" do
36
36
  VCR.use_cassette('subscriptions delete sub_8yYuCBKdywr7e2') do
37
37
  response = Espago.subscriptions :delete,{subscription_id:'sub_8yYuCBKdywr7e2'}
38
- response.status.should eq(204)
38
+ expect(response.status).to eq(204)
39
39
  end
40
40
  end
41
41
 
@@ -1,4 +1,4 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
3
  describe 'Espago.tokens' do
4
4
 
@@ -14,27 +14,26 @@ describe 'Espago.tokens' do
14
14
  month:'2'
15
15
  },
16
16
  }
17
- response.status.should eq(201)
18
- response.id.should_not eq(nil)
19
- response.used.should eq(false)
20
- response.created_at.should eq Time.at(1417029320)
21
- response.card['company'].should eq('VI')
22
- response.card['last4'].should eq('4242')
23
- response.card['authorized'].should eq(nil)
17
+ expect(response.status).to eq(201)
18
+ expect(response.id).to_not eq(nil)
19
+ expect(response.used).to eq(false)
20
+ expect(response.created_at).to eq Time.at(1417029320)
21
+ expect(response.card['company']).to eq('VI')
22
+ expect(response.card['last4']).to eq('4242')
23
+ expect(response.card['authorized']).to eq(nil)
24
24
  end
25
25
  end
26
26
 
27
27
  it "should get token params" do
28
28
  VCR.use_cassette('tokens get') do
29
29
  response = Espago.tokens :get, {token_id: 'cc_166YDMhrVcemFb3'}
30
- response.status.should eq(200)
31
- response.id.should eq('cc_166YDMhrVcemFb3')
32
- response.used.should eq(false)
33
- response.created_at.should eq Time.at(1417029320)
34
- response.card['company'].should eq('VI')
35
- response.card['last4'].should eq('4242')
36
- response.card['authorized'].should eq(nil)
30
+ expect(response.status).to eq(200)
31
+ expect(response.id).to eq('cc_166YDMhrVcemFb3')
32
+ expect(response.used).to eq(false)
33
+ expect(response.created_at).to eq Time.at(1417029320)
34
+ expect(response.card['company']).to eq('VI')
35
+ expect(response.card['last4']).to eq('4242')
36
+ expect(response.card['authorized']).to eq(nil)
37
37
  end
38
38
  end
39
-
40
39
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
5
+ uri: https://sandbox.espago.com/api/charges
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
5
+ uri: https://sandbox.espago.com/api/charges
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_kQmS_3RTfm4eix/complete
5
+ uri: https://sandbox.espago.com/api/charges/pay_kQmS_3RTfm4eix/complete
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_Wmu3hmXJIG4jsg/complete
5
+ uri: https://sandbox.espago.com/api/charges/pay_Wmu3hmXJIG4jsg/complete
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_kQmS_3RTfm4eix
5
+ uri: https://sandbox.espago.com/api/charges/pay_kQmS_3RTfm4eix
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
5
+ uri: https://sandbox.espago.com/api/charges
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w
5
+ uri: https://sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
5
+ uri: https://sandbox.espago.com/api/charges
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: amount=49.99&currency=PLN&description=Test12345&card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Type:
13
15
  - application/x-www-form-urlencoded
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_lQGyIon5qG59O5/refund
5
+ uri: https://sandbox.espago.com/api/charges/pay_lQGyIon5qG59O5/refund
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: charge_id=pay_lQGyIon5qG59O5
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Type:
13
15
  - application/x-www-form-urlencoded
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/authorize
5
+ uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/authorize
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Length:
13
15
  - '0'
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_5rDoJyvKDM4RbM
5
+ uri: https://sandbox.espago.com/api/clients/cli_5rDoJyvKDM4RbM
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients
5
+ uri: https://sandbox.espago.com/api/clients
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw
5
+ uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/invoices
5
+ uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/invoices
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients
5
+ uri: https://sandbox.espago.com/api/clients
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Type:
13
15
  - application/x-www-form-urlencoded
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw
5
+ uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: client_id=cli_w0Se2smYwyQ0Uw&card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Type:
13
15
  - application/x-www-form-urlencoded
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/subscriptions
5
+ uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/subscriptions
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w/dcc_decision
5
+ uri: https://sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w/dcc_decision
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: decision=Y
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Type:
13
15
  - application/x-www-form-urlencoded
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/plans
5
+ uri: https://sandbox.espago.com/api/plans
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/plans
5
+ uri: https://sandbox.espago.com/api/plans
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/plans
5
+ uri: https://sandbox.espago.com/api/plans
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/invoice_items/ii_WDzszvhTshe78Xd
5
+ uri: https://sandbox.espago.com/api/invoice_items/ii_WDzszvhTshe78Xd
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/invoice_items/ii_5LS-YR7S1QaJBl3
5
+ uri: https://sandbox.espago.com/api/invoice_items/ii_5LS-YR7S1QaJBl3
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/invoice_items
5
+ uri: https://sandbox.espago.com/api/invoice_items
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: amount=49.99&currency=pln&date=1417126942&description=Test+invoice+items&client=cli_90Pi6Jf0ndl_PP
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Content-Type:
13
15
  - application/x-www-form-urlencoded
14
16
  Accept-Encoding:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/invoices
5
+ uri: https://sandbox.espago.com/api/invoices
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent:
@@ -2,13 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://app_id_test:app_password_test@sandbox.espago.com/api/invoices/in_tUCMhwlg2nkvAaL
5
+ uri: https://sandbox.espago.com/api/invoices/in_tUCMhwlg2nkvAaL
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/vnd.espago.v2+json
12
+ Authorization:
13
+ - Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
12
14
  Accept-Encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  User-Agent: