agrid-client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +65 -0
  4. data/README.md +15 -0
  5. data/agrid_client.gemspec +32 -0
  6. data/lib/agrid_client.rb +69 -0
  7. data/lib/agrid_client/api/cities_api.rb +80 -0
  8. data/lib/agrid_client/api/companies_api.rb +265 -0
  9. data/lib/agrid_client/api/filters_api.rb +91 -0
  10. data/lib/agrid_client/api/leads_api.rb +87 -0
  11. data/lib/agrid_client/api/quotes_api.rb +162 -0
  12. data/lib/agrid_client/api/services_api.rb +83 -0
  13. data/lib/agrid_client/api_client.rb +365 -0
  14. data/lib/agrid_client/api_error.rb +36 -0
  15. data/lib/agrid_client/configuration.rb +167 -0
  16. data/lib/agrid_client/models/address.rb +121 -0
  17. data/lib/agrid_client/models/category.rb +75 -0
  18. data/lib/agrid_client/models/city_company.rb +67 -0
  19. data/lib/agrid_client/models/city_with_full_state.rb +73 -0
  20. data/lib/agrid_client/models/city_with_state_name.rb +67 -0
  21. data/lib/agrid_client/models/company.rb +108 -0
  22. data/lib/agrid_client/models/company_ranking.rb +45 -0
  23. data/lib/agrid_client/models/concerns/swagger_model.rb +106 -0
  24. data/lib/agrid_client/models/customer.rb +90 -0
  25. data/lib/agrid_client/models/customer_input.rb +73 -0
  26. data/lib/agrid_client/models/data_check.rb +45 -0
  27. data/lib/agrid_client/models/filter.rb +75 -0
  28. data/lib/agrid_client/models/filter_category.rb +73 -0
  29. data/lib/agrid_client/models/image.rb +37 -0
  30. data/lib/agrid_client/models/inline_response_200.rb +67 -0
  31. data/lib/agrid_client/models/inline_response_200_1.rb +78 -0
  32. data/lib/agrid_client/models/item.rb +90 -0
  33. data/lib/agrid_client/models/lead.rb +77 -0
  34. data/lib/agrid_client/models/lead_input.rb +90 -0
  35. data/lib/agrid_client/models/location.rb +66 -0
  36. data/lib/agrid_client/models/phone.rb +58 -0
  37. data/lib/agrid_client/models/price_range.rb +73 -0
  38. data/lib/agrid_client/models/quote.rb +124 -0
  39. data/lib/agrid_client/models/sale.rb +28 -0
  40. data/lib/agrid_client/models/service.rb +90 -0
  41. data/lib/agrid_client/models/state.rb +67 -0
  42. data/lib/agrid_client/version.rb +3 -0
  43. data/spec/api/cities_api_spec.rb +49 -0
  44. data/spec/api/companies_api_spec.rb +69 -0
  45. data/spec/api/filters_api_spec.rb +54 -0
  46. data/spec/api/leads_api_spec.rb +52 -0
  47. data/spec/api/quotes_api_spec.rb +74 -0
  48. data/spec/api/services_api_spec.rb +52 -0
  49. data/spec/models/address_spec.rb +116 -0
  50. data/spec/models/category_spec.rb +66 -0
  51. data/spec/models/city_with_full_state_spec.rb +66 -0
  52. data/spec/models/city_with_state_name_spec.rb +56 -0
  53. data/spec/models/company_spec.rb +116 -0
  54. data/spec/models/customer_input_spec.rb +66 -0
  55. data/spec/models/customer_spec.rb +86 -0
  56. data/spec/models/filter_category_spec.rb +66 -0
  57. data/spec/models/filter_spec.rb +66 -0
  58. data/spec/models/inline_response_200_1_spec.rb +66 -0
  59. data/spec/models/inline_response_200_spec.rb +46 -0
  60. data/spec/models/item_spec.rb +86 -0
  61. data/spec/models/lead_input_spec.rb +86 -0
  62. data/spec/models/lead_spec.rb +76 -0
  63. data/spec/models/location_spec.rb +56 -0
  64. data/spec/models/phone_spec.rb +46 -0
  65. data/spec/models/price_range_spec.rb +56 -0
  66. data/spec/models/quote_spec.rb +116 -0
  67. data/spec/models/service_spec.rb +76 -0
  68. data/spec/models/state_spec.rb +56 -0
  69. data/spec/spec_helper.rb +23 -0
  70. metadata +319 -0
@@ -0,0 +1,73 @@
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 'date'
14
+ require_relative 'concerns/swagger_model'
15
+
16
+ module AgridClient
17
+ class CustomerInput
18
+ include SwaggerModel
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :phone
23
+
24
+ attr_accessor :name
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'email' => :'email',
30
+ :'phone' => :'phone',
31
+ :'name' => :'name'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'email' => :'String',
39
+ :'phone' => :'String',
40
+ :'name' => :'String'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+
52
+ if attributes[:'email']
53
+ self.email = attributes[:'email']
54
+ end
55
+ if attributes[:'phone']
56
+ self.phone = attributes[:'phone']
57
+ end
58
+ if attributes[:'name']
59
+ self.name = attributes[:'name']
60
+ end
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ email == o.email &&
69
+ phone == o.phone &&
70
+ name == o.name
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,45 @@
1
+ require_relative 'concerns/swagger_model'
2
+
3
+ module AgridClient
4
+ class DataCheck
5
+ include SwaggerModel
6
+
7
+ attr_accessor :type, :status
8
+
9
+ def self.attribute_map
10
+ {
11
+ :'type' => :'type',
12
+ :'status' => :'status'
13
+ }
14
+ end
15
+
16
+ # Attribute type mapping.
17
+ def self.swagger_types
18
+ {
19
+ :'type' => :'String',
20
+ :'status' => 'String'
21
+ }
22
+ end
23
+
24
+ # Initializes the object
25
+ # @param [Hash] attributes Model attributes in the form of hash
26
+ def initialize(attributes = {})
27
+ return unless attributes.is_a?(Hash)
28
+
29
+ # convert string to symbol for hash key
30
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
31
+
32
+ self.type = attributes[:'type'] if attributes[:'type']
33
+ self.status = attributes[:'status'] if attributes[:'status']
34
+ end
35
+
36
+ # Checks equality by comparing each attribute.
37
+ # @param [Object] Object to be compared
38
+ def ==(o)
39
+ return true if self.equal?(o)
40
+ self.class == o.class &&
41
+ type == o.type &&
42
+ status == o.status
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,75 @@
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 'date'
14
+ require_relative 'concerns/swagger_model'
15
+
16
+ module AgridClient
17
+ class Filter
18
+ include SwaggerModel
19
+
20
+ # Unique Id
21
+ attr_accessor :id
22
+
23
+ # Filter title
24
+ attr_accessor :title
25
+
26
+ attr_accessor :filter_categories
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'id' => :'id',
32
+ :'title' => :'title',
33
+ :'filter_categories' => :'filter_categories'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'id' => :'String',
41
+ :'title' => :'String',
42
+ :'filter_categories' => :'Array<FilterCategory>'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
53
+
54
+ if attributes[:'id']
55
+ self.id = attributes[:'id']
56
+ end
57
+ if attributes[:'title']
58
+ self.title = attributes[:'title']
59
+ end
60
+ if attributes[:'filter_categories']
61
+ if (value = attributes[:'filter_categories']).is_a?(Array)
62
+ self.filter_categories = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ id == o.id
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,73 @@
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 'date'
14
+ require_relative 'concerns/swagger_model'
15
+
16
+ module AgridClient
17
+ class FilterCategory
18
+ include SwaggerModel
19
+
20
+ # Unique Id
21
+ attr_accessor :id
22
+
23
+ # FilterCategory title
24
+ attr_accessor :title
25
+
26
+ attr_accessor :basic
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'id' => :'id',
32
+ :'title' => :'title',
33
+ :'basic' => :'basic'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'id' => :'String',
41
+ :'title' => :'String',
42
+ :'basic' => :'BOOLEAN'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
53
+
54
+ if attributes[:'id']
55
+ self.id = attributes[:'id']
56
+ end
57
+ if attributes[:'title']
58
+ self.title = attributes[:'title']
59
+ end
60
+ if attributes[:'basic']
61
+ self.basic = attributes[:'basic']
62
+ end
63
+ end
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] Object to be compared
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ id == o.id
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,37 @@
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_relative 'concerns/swagger_model'
14
+
15
+ module AgridClient
16
+ class Image
17
+ include SwaggerModel
18
+
19
+ attr_accessor :id, :type, :url
20
+
21
+ def self.attribute_map
22
+ {
23
+ :'id' => :'id',
24
+ :'type' => :'type',
25
+ :'url' => :'url'
26
+ }
27
+ end
28
+
29
+ def self.swagger_types
30
+ {
31
+ :'id' => :'String',
32
+ :'type' => :'String',
33
+ :'url' => :'String'
34
+ }
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,67 @@
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 'date'
14
+ require_relative 'concerns/swagger_model'
15
+
16
+ module AgridClient
17
+ class InlineResponse200
18
+ include SwaggerModel
19
+
20
+ # Total of companies that attend the request
21
+ attr_accessor :count, :companies
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'count' => :'count',
27
+ :'companies' => :'companies'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'count' => :'Integer',
35
+ :'companies' => :'Array<Company>'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+
47
+ if attributes[:'count']
48
+ self.count = attributes[:'count']
49
+ end
50
+
51
+ if attributes[:'companies']
52
+ if (value = attributes[:'companies']).is_a?(Array)
53
+ self.companies = value
54
+ end
55
+ end
56
+ end
57
+
58
+ # Checks equality by comparing each attribute.
59
+ # @param [Object] Object to be compared
60
+ def ==(o)
61
+ return true if self.equal?(o)
62
+ self.class == o.class &&
63
+ count == o.count
64
+ companies == o.companies
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,78 @@
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 'date'
14
+ require_relative 'concerns/swagger_model'
15
+
16
+ module AgridClient
17
+ class InlineResponse2001
18
+ include SwaggerModel
19
+
20
+ # Quotes filtered using parameters
21
+ attr_accessor :quotes
22
+
23
+ # Number of quotes that match with parameters
24
+ attr_accessor :count
25
+
26
+ # PriceRanges are the three points that divide the data set into four equal groups, each group comprising a quarter of the data
27
+ attr_accessor :price_ranges
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'quotes' => :'quotes',
33
+ :'count' => :'count',
34
+ :'price_ranges' => :'price_ranges'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'quotes' => :'Array<Quote>',
42
+ :'count' => :'Integer',
43
+ :'price_ranges' => :'Array<PriceRange>'
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ # convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
+
55
+ if attributes[:'quotes']
56
+ self.quotes = attributes[:'quotes']
57
+ end
58
+ if attributes[:'count']
59
+ self.count = attributes[:'count']
60
+ end
61
+ if attributes[:'price_ranges']
62
+ if (value = attributes[:'price_ranges']).is_a?(Array)
63
+ self.price_ranges = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Checks equality by comparing each attribute.
69
+ # @param [Object] Object to be compared
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ quotes == o.quotes &&
74
+ count == o.count &&
75
+ price_ranges == o.price_ranges
76
+ end
77
+ end
78
+ end