agrid-client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/agrid_client/models/company_ranking.rb +3 -3
- data/lib/agrid_client/version.rb +1 -1
- data/spec/api_client_spec.rb +8 -3
- metadata +1 -53
- data/spec/api/cities_api_spec.rb +0 -49
- data/spec/api/companies_api_spec.rb +0 -69
- data/spec/api/filters_api_spec.rb +0 -54
- data/spec/api/leads_api_spec.rb +0 -52
- data/spec/api/quotes_api_spec.rb +0 -74
- data/spec/api/services_api_spec.rb +0 -52
- data/spec/models/address_spec.rb +0 -116
- data/spec/models/category_spec.rb +0 -66
- data/spec/models/city_with_full_state_spec.rb +0 -66
- data/spec/models/city_with_state_name_spec.rb +0 -56
- data/spec/models/company_spec.rb +0 -116
- data/spec/models/customer_input_spec.rb +0 -66
- data/spec/models/customer_spec.rb +0 -86
- data/spec/models/filter_category_spec.rb +0 -66
- data/spec/models/filter_spec.rb +0 -66
- data/spec/models/inline_response_200_1_spec.rb +0 -66
- data/spec/models/inline_response_200_spec.rb +0 -46
- data/spec/models/item_spec.rb +0 -86
- data/spec/models/lead_input_spec.rb +0 -86
- data/spec/models/lead_spec.rb +0 -76
- data/spec/models/location_spec.rb +0 -56
- data/spec/models/phone_spec.rb +0 -46
- data/spec/models/price_range_spec.rb +0 -56
- data/spec/models/quote_spec.rb +0 -116
- data/spec/models/service_spec.rb +0 -76
- data/spec/models/state_spec.rb +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2be1247d51b423a27003b881ebf222ae5259a55
|
4
|
+
data.tar.gz: 2e3f9e6837bc6063c8ac4e688e0ad2ec67ce28b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d4b218d0161c89cb442f42c2641a26e64ea3e03e65480a1553a3ed7343bd6dfe1716c41bc3c977dcbd2599f98f4473d6ce2df830cda7bc0810df1ed482187fc
|
7
|
+
data.tar.gz: 6b3d4a317a20391d105d2dfbdbb5ace7cdb91f2ec5ae827158202c835466ebd98228e1afc88048c0631f034712af1b639d6b8110582a717a4b6539b38c550274
|
data/Gemfile.lock
CHANGED
@@ -4,12 +4,12 @@ module AgridClient
|
|
4
4
|
class CompanyRanking
|
5
5
|
include SwaggerModel
|
6
6
|
|
7
|
-
attr_accessor :service, :
|
7
|
+
attr_accessor :service, :rank
|
8
8
|
|
9
9
|
def self.attribute_map
|
10
10
|
{
|
11
11
|
:'service' => :'service',
|
12
|
-
:'
|
12
|
+
:'rank' => :'rank'
|
13
13
|
}
|
14
14
|
end
|
15
15
|
|
@@ -17,7 +17,7 @@ module AgridClient
|
|
17
17
|
def self.swagger_types
|
18
18
|
{
|
19
19
|
:'service' => :'Service',
|
20
|
-
:'
|
20
|
+
:'rank' => :'Float'
|
21
21
|
}
|
22
22
|
end
|
23
23
|
|
data/lib/agrid_client/version.rb
CHANGED
data/spec/api_client_spec.rb
CHANGED
@@ -8,11 +8,16 @@ describe 'ApiClient' do
|
|
8
8
|
it "initialize with default configuration" do
|
9
9
|
version = AgridClient::VERSION
|
10
10
|
expect(subject.default_headers).to eq({
|
11
|
-
'Content-Type'
|
12
|
-
'User-Agent'
|
11
|
+
'Content-Type' => 'application/json',
|
12
|
+
'User-Agent' => "agrid_client/#{version}/ruby"
|
13
13
|
})
|
14
14
|
end
|
15
15
|
end
|
16
|
-
end
|
17
16
|
|
17
|
+
context "with configuration argument" do
|
18
|
+
it "initialize with configuration received" do
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
18
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agrid-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme B. Moretti
|
@@ -100,33 +100,7 @@ files:
|
|
100
100
|
- lib/agrid_client/models/service.rb
|
101
101
|
- lib/agrid_client/models/state.rb
|
102
102
|
- lib/agrid_client/version.rb
|
103
|
-
- spec/api/cities_api_spec.rb
|
104
|
-
- spec/api/companies_api_spec.rb
|
105
|
-
- spec/api/filters_api_spec.rb
|
106
|
-
- spec/api/leads_api_spec.rb
|
107
|
-
- spec/api/quotes_api_spec.rb
|
108
|
-
- spec/api/services_api_spec.rb
|
109
103
|
- spec/api_client_spec.rb
|
110
|
-
- spec/models/address_spec.rb
|
111
|
-
- spec/models/category_spec.rb
|
112
|
-
- spec/models/city_with_full_state_spec.rb
|
113
|
-
- spec/models/city_with_state_name_spec.rb
|
114
|
-
- spec/models/company_spec.rb
|
115
|
-
- spec/models/customer_input_spec.rb
|
116
|
-
- spec/models/customer_spec.rb
|
117
|
-
- spec/models/filter_category_spec.rb
|
118
|
-
- spec/models/filter_spec.rb
|
119
|
-
- spec/models/inline_response_200_1_spec.rb
|
120
|
-
- spec/models/inline_response_200_spec.rb
|
121
|
-
- spec/models/item_spec.rb
|
122
|
-
- spec/models/lead_input_spec.rb
|
123
|
-
- spec/models/lead_spec.rb
|
124
|
-
- spec/models/location_spec.rb
|
125
|
-
- spec/models/phone_spec.rb
|
126
|
-
- spec/models/price_range_spec.rb
|
127
|
-
- spec/models/quote_spec.rb
|
128
|
-
- spec/models/service_spec.rb
|
129
|
-
- spec/models/state_spec.rb
|
130
104
|
- spec/spec_helper.rb
|
131
105
|
homepage: http://agrid.com.br
|
132
106
|
licenses:
|
@@ -153,31 +127,5 @@ signing_key:
|
|
153
127
|
specification_version: 4
|
154
128
|
summary: Ruby client for Agrid's prices API
|
155
129
|
test_files:
|
156
|
-
- spec/api/leads_api_spec.rb
|
157
|
-
- spec/api/quotes_api_spec.rb
|
158
|
-
- spec/api/companies_api_spec.rb
|
159
|
-
- spec/api/services_api_spec.rb
|
160
|
-
- spec/api/cities_api_spec.rb
|
161
|
-
- spec/api/filters_api_spec.rb
|
162
130
|
- spec/api_client_spec.rb
|
163
|
-
- spec/models/address_spec.rb
|
164
|
-
- spec/models/lead_spec.rb
|
165
|
-
- spec/models/price_range_spec.rb
|
166
|
-
- spec/models/city_with_state_name_spec.rb
|
167
|
-
- spec/models/lead_input_spec.rb
|
168
|
-
- spec/models/customer_input_spec.rb
|
169
|
-
- spec/models/state_spec.rb
|
170
|
-
- spec/models/phone_spec.rb
|
171
|
-
- spec/models/inline_response_200_1_spec.rb
|
172
|
-
- spec/models/quote_spec.rb
|
173
|
-
- spec/models/company_spec.rb
|
174
|
-
- spec/models/item_spec.rb
|
175
|
-
- spec/models/city_with_full_state_spec.rb
|
176
|
-
- spec/models/category_spec.rb
|
177
|
-
- spec/models/filter_spec.rb
|
178
|
-
- spec/models/inline_response_200_spec.rb
|
179
|
-
- spec/models/location_spec.rb
|
180
|
-
- spec/models/service_spec.rb
|
181
|
-
- spec/models/customer_spec.rb
|
182
|
-
- spec/models/filter_category_spec.rb
|
183
131
|
- spec/spec_helper.rb
|
data/spec/api/cities_api_spec.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Agrid Quotes API
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for AgridClient::CitiesApi
|
17
|
-
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'CitiesApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@instance = AgridClient::CitiesApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of CitiesApi' do
|
30
|
-
it 'should create an instact of CitiesApi' do
|
31
|
-
@instance.should be_a(AgridClient::CitiesApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for cities_get
|
36
|
-
#
|
37
|
-
# Returns all cities supported by at least one company
|
38
|
-
# @param [Hash] opts the optional parameters
|
39
|
-
# @option opts [String] :state State acronym to filter cities by state
|
40
|
-
# @return [Array<CityWithFullState>]
|
41
|
-
describe 'cities_get test' do
|
42
|
-
it "should work" do
|
43
|
-
VCR.use_cassette('cities') do
|
44
|
-
expect(@instance.cities_get).to be_a(Array)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
@@ -1,69 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Agrid Quotes API
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for AgridClient::CompaniesApi
|
17
|
-
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'CompaniesApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@instance = AgridClient::CompaniesApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of CompaniesApi' do
|
30
|
-
it 'should create an instact of CompaniesApi' do
|
31
|
-
@instance.should be_a(AgridClient::CompaniesApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for get_companies
|
36
|
-
#
|
37
|
-
# Return a set of companies.
|
38
|
-
# @param service_id Service ID
|
39
|
-
# @param [Hash] opts the optional parameters
|
40
|
-
# @option opts [Integer] :offset Number to skip rows before beginning to return companies
|
41
|
-
# @option opts [Integer] :limit Limit number of companies on response(default is 12)
|
42
|
-
# @return [InlineResponse200]
|
43
|
-
describe 'get_companies test' do
|
44
|
-
it "should work" do
|
45
|
-
# assertion here
|
46
|
-
# should be_a()
|
47
|
-
# should be_nil
|
48
|
-
# should ==
|
49
|
-
# should_not ==
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
# unit tests for get_company
|
54
|
-
#
|
55
|
-
# Return data of a specific company
|
56
|
-
# @param id Company ID
|
57
|
-
# @param [Hash] opts the optional parameters
|
58
|
-
# @return [Company]
|
59
|
-
describe 'get_company test' do
|
60
|
-
it "should work" do
|
61
|
-
# assertion here
|
62
|
-
# should be_a()
|
63
|
-
# should be_nil
|
64
|
-
# should ==
|
65
|
-
# should_not ==
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Agrid Quotes API
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for AgridClient::FiltersApi
|
17
|
-
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'FiltersApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@instance = AgridClient::FiltersApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of FiltersApi' do
|
30
|
-
it 'should create an instact of FiltersApi' do
|
31
|
-
@instance.should be_a(AgridClient::FiltersApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for services_service_id_filters_get
|
36
|
-
#
|
37
|
-
# Returns all filters of a service.\n You can some of the query parameters in /v1/services/:service_id/quotes\n to fetch all filters and filter_categories of the set of that quotes.
|
38
|
-
# @param service_id param to filter quotes by service
|
39
|
-
# @param [Hash] opts the optional parameters
|
40
|
-
# @option opts [String] :city_id the city id
|
41
|
-
# @option opts [Float] :min_price the minimium price for a quote
|
42
|
-
# @option opts [Float] :max_price the maximum price for a quote
|
43
|
-
# @return [Filter]
|
44
|
-
describe 'services_service_id_filters_get test' do
|
45
|
-
it "should work" do
|
46
|
-
# assertion here
|
47
|
-
# should be_a()
|
48
|
-
# should be_nil
|
49
|
-
# should ==
|
50
|
-
# should_not ==
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
data/spec/api/leads_api_spec.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Agrid Quotes API
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for AgridClient::LeadsApi
|
17
|
-
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'LeadsApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@instance = AgridClient::LeadsApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of LeadsApi' do
|
30
|
-
it 'should create an instact of LeadsApi' do
|
31
|
-
@instance.should be_a(AgridClient::LeadsApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for services_service_id_leads_post
|
36
|
-
#
|
37
|
-
# Create a new lead
|
38
|
-
# @param service_id Service Id
|
39
|
-
# @param lead Lead Id
|
40
|
-
# @param [Hash] opts the optional parameters
|
41
|
-
# @return [Lead]
|
42
|
-
describe 'services_service_id_leads_post test' do
|
43
|
-
it "should work" do
|
44
|
-
# assertion here
|
45
|
-
# should be_a()
|
46
|
-
# should be_nil
|
47
|
-
# should ==
|
48
|
-
# should_not ==
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
data/spec/api/quotes_api_spec.rb
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Agrid Quotes API
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for AgridClient::QuotesApi
|
17
|
-
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'QuotesApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@instance = AgridClient::QuotesApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of QuotesApi' do
|
30
|
-
it 'should create an instact of QuotesApi' do
|
31
|
-
@instance.should be_a(AgridClient::QuotesApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for quotes_id_get
|
36
|
-
#
|
37
|
-
# Returns a specific quote
|
38
|
-
# @param id Param to filter company using id
|
39
|
-
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [Quote]
|
41
|
-
describe 'quotes_id_get test' do
|
42
|
-
it "should work" do
|
43
|
-
# assertion here
|
44
|
-
# should be_a()
|
45
|
-
# should be_nil
|
46
|
-
# should ==
|
47
|
-
# should_not ==
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# unit tests for services_service_id_quotes_get
|
52
|
-
#
|
53
|
-
# Returns a set of quotes.
|
54
|
-
# @param service_id Param to filter quotes by service
|
55
|
-
# @param [Hash] opts the optional parameters
|
56
|
-
# @option opts [String] :company_id Param to filter quotes by company
|
57
|
-
# @option opts [String] :city_id Param to filter quotes by city
|
58
|
-
# @option opts [Integer] :limit Limit number of quotes on response(default is 12)
|
59
|
-
# @option opts [Integer] :offset Number to skip rows before beginning to return quotes
|
60
|
-
# @option opts [Array<String>] :filter_categories Example: <br> filter_categories[:filter_id][]=:filter_category_id&filter_categories[:filter_id][]=:filter_category_id <br><br> :filter_id is the id of filter<br> :filter_category_id is the id of filter category
|
61
|
-
# @option opts [Float] :min_price Param to filter quotes with price is at least equal to :min_price
|
62
|
-
# @option opts [Float] :max_price Param to filter quotes with price is at most equal to :max_price
|
63
|
-
# @return [InlineResponse2001]
|
64
|
-
describe 'services_service_id_quotes_get test' do
|
65
|
-
it "should work" do
|
66
|
-
# assertion here
|
67
|
-
# should be_a()
|
68
|
-
# should be_nil
|
69
|
-
# should ==
|
70
|
-
# should_not ==
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|