patch_ruby 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +72 -0
  4. data/README.md +54 -0
  5. data/Rakefile +10 -0
  6. data/lib/patch_ruby.rb +61 -0
  7. data/lib/patch_ruby/api/estimates_api.rb +213 -0
  8. data/lib/patch_ruby/api/orders_api.rb +339 -0
  9. data/lib/patch_ruby/api/preferences_api.rb +276 -0
  10. data/lib/patch_ruby/api/projects_api.rb +148 -0
  11. data/lib/patch_ruby/api_client.rb +388 -0
  12. data/lib/patch_ruby/api_error.rb +57 -0
  13. data/lib/patch_ruby/configuration.rb +254 -0
  14. data/lib/patch_ruby/models/allocation.rb +229 -0
  15. data/lib/patch_ruby/models/create_mass_estimate_request.rb +216 -0
  16. data/lib/patch_ruby/models/create_order_request.rb +216 -0
  17. data/lib/patch_ruby/models/create_preference_request.rb +216 -0
  18. data/lib/patch_ruby/models/error_response.rb +239 -0
  19. data/lib/patch_ruby/models/estimate.rb +238 -0
  20. data/lib/patch_ruby/models/estimate_list_response.rb +255 -0
  21. data/lib/patch_ruby/models/estimate_response.rb +239 -0
  22. data/lib/patch_ruby/models/meta_index_object.rb +220 -0
  23. data/lib/patch_ruby/models/order.rb +313 -0
  24. data/lib/patch_ruby/models/order_list_response.rb +255 -0
  25. data/lib/patch_ruby/models/order_response.rb +239 -0
  26. data/lib/patch_ruby/models/preference.rb +229 -0
  27. data/lib/patch_ruby/models/preference_list_response.rb +255 -0
  28. data/lib/patch_ruby/models/preference_response.rb +239 -0
  29. data/lib/patch_ruby/models/project.rb +283 -0
  30. data/lib/patch_ruby/models/project_list_response.rb +255 -0
  31. data/lib/patch_ruby/models/project_response.rb +239 -0
  32. data/lib/patch_ruby/version.rb +15 -0
  33. data/patch_ruby.gemspec +39 -0
  34. data/spec/api/estimates_api_spec.rb +71 -0
  35. data/spec/api/orders_api_spec.rb +95 -0
  36. data/spec/api/preferences_api_spec.rb +83 -0
  37. data/spec/api/projects_api_spec.rb +59 -0
  38. data/spec/api_client_spec.rb +226 -0
  39. data/spec/configuration_spec.rb +42 -0
  40. data/spec/fixtures/vcr_cassettes/estimate_orders.yml +276 -0
  41. data/spec/fixtures/vcr_cassettes/estimates.yml +211 -0
  42. data/spec/fixtures/vcr_cassettes/orders.yml +229 -0
  43. data/spec/fixtures/vcr_cassettes/preferences.yml +352 -0
  44. data/spec/fixtures/vcr_cassettes/projects.yml +143 -0
  45. data/spec/integration/estimates_spec.rb +31 -0
  46. data/spec/integration/orders_spec.rb +53 -0
  47. data/spec/integration/preferences_spec.rb +40 -0
  48. data/spec/integration/projects_spec.rb +31 -0
  49. data/spec/models/allocation_spec.rb +53 -0
  50. data/spec/models/create_mass_estimate_request_spec.rb +41 -0
  51. data/spec/models/create_order_request_spec.rb +41 -0
  52. data/spec/models/create_preference_request_spec.rb +41 -0
  53. data/spec/models/error_response_spec.rb +53 -0
  54. data/spec/models/estimate_list_response_spec.rb +59 -0
  55. data/spec/models/estimate_response_spec.rb +53 -0
  56. data/spec/models/estimate_spec.rb +59 -0
  57. data/spec/models/meta_index_object_spec.rb +47 -0
  58. data/spec/models/order_list_response_spec.rb +59 -0
  59. data/spec/models/order_response_spec.rb +53 -0
  60. data/spec/models/order_spec.rb +85 -0
  61. data/spec/models/preference_list_response_spec.rb +59 -0
  62. data/spec/models/preference_response_spec.rb +53 -0
  63. data/spec/models/preference_spec.rb +53 -0
  64. data/spec/models/project_list_response_spec.rb +59 -0
  65. data/spec/models/project_response_spec.rb +53 -0
  66. data/spec/models/project_spec.rb +89 -0
  67. data/spec/spec_helper.rb +122 -0
  68. metadata +203 -0
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::ErrorResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'ErrorResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::ErrorResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of ErrorResponse' do
31
+ it 'should create an instance of ErrorResponse' do
32
+ expect(@instance).to be_instance_of(Patch::ErrorResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "success"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "error"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,59 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::EstimateListResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'EstimateListResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::EstimateListResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of EstimateListResponse' do
31
+ it 'should create an instance of EstimateListResponse' do
32
+ expect(@instance).to be_instance_of(Patch::EstimateListResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "success"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "error"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "meta"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ end
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::EstimateResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'EstimateResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::EstimateResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of EstimateResponse' do
31
+ it 'should create an instance of EstimateResponse' do
32
+ expect(@instance).to be_instance_of(Patch::EstimateResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "success"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "error"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,59 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::Estimate
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Estimate' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::Estimate.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Estimate' do
31
+ it 'should create an instance of Estimate' do
32
+ expect(@instance).to be_instance_of(Patch::Estimate)
33
+ end
34
+ end
35
+ describe 'test attribute "id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "production"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "type"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "order"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ end
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::MetaIndexObject
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'MetaIndexObject' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::MetaIndexObject.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of MetaIndexObject' do
31
+ it 'should create an instance of MetaIndexObject' do
32
+ expect(@instance).to be_instance_of(Patch::MetaIndexObject)
33
+ end
34
+ end
35
+ describe 'test attribute "prev_page"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "next_page"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
@@ -0,0 +1,59 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::OrderListResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'OrderListResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::OrderListResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of OrderListResponse' do
31
+ it 'should create an instance of OrderListResponse' do
32
+ expect(@instance).to be_instance_of(Patch::OrderListResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "success"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "error"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "meta"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ end
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::OrderResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'OrderResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::OrderResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of OrderResponse' do
31
+ it 'should create an instance of OrderResponse' do
32
+ expect(@instance).to be_instance_of(Patch::OrderResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "success"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "error"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,85 @@
1
+ =begin
2
+ #Patch API V1
3
+
4
+ #The core API used to integrate with Patch's service
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: developers@usepatch.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Patch::Order
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Order' do
21
+ before do
22
+ # run before each test
23
+ @instance = Patch::Order.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Order' do
31
+ it 'should create an instance of Order' do
32
+ expect(@instance).to be_instance_of(Patch::Order)
33
+ end
34
+ end
35
+ describe 'test attribute "id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "mass_g"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "production"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "state"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["draft", "placed", "complete", "cancelled"])
57
+ # validator.allowable_values.each do |value|
58
+ # expect { @instance.state = value }.not_to raise_error
59
+ # end
60
+ end
61
+ end
62
+
63
+ describe 'test attribute "allocation_state"' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "partially_allocated", "allocated"])
67
+ # validator.allowable_values.each do |value|
68
+ # expect { @instance.allocation_state = value }.not_to raise_error
69
+ # end
70
+ end
71
+ end
72
+
73
+ describe 'test attribute "price_cents_usd"' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ describe 'test attribute "allocations"' do
80
+ it 'should work' do
81
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ end
83
+ end
84
+
85
+ end