agrid-client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,90 @@
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 Item
18
+ include SwaggerModel
19
+
20
+ # Unique Id
21
+ attr_accessor :id
22
+
23
+ # Item title
24
+ attr_accessor :title
25
+
26
+ # Inform if item is included on price
27
+ attr_accessor :basic
28
+
29
+ # Inform the value of an extra item(not included on quote)
30
+ attr_accessor :price
31
+
32
+ # Description of Item
33
+ attr_accessor :note
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'id' => :'id',
39
+ :'title' => :'title',
40
+ :'basic' => :'basic',
41
+ :'price' => :'price',
42
+ :'note' => :'note'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.swagger_types
48
+ {
49
+ :'id' => :'String',
50
+ :'title' => :'String',
51
+ :'basic' => :'BOOLEAN',
52
+ :'price' => :'Float',
53
+ :'note' => :'String'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
64
+
65
+ if attributes[:'id']
66
+ self.id = attributes[:'id']
67
+ end
68
+ if attributes[:'title']
69
+ self.title = attributes[:'title']
70
+ end
71
+ if attributes[:'basic']
72
+ self.basic = attributes[:'basic']
73
+ end
74
+ if attributes[:'price']
75
+ self.price = attributes[:'price']
76
+ end
77
+ if attributes[:'note']
78
+ self.note = attributes[:'note']
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ id == o.id
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,77 @@
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 Lead
18
+ include SwaggerModel
19
+ attr_accessor :id
20
+
21
+ attr_accessor :message
22
+
23
+ attr_accessor :customer
24
+
25
+ attr_accessor :quote_id
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'id' => :'id',
31
+ :'message' => :'message',
32
+ :'customer' => :'customer',
33
+ :'quote_id' => :'quote_id'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'id' => :'String',
41
+ :'message' => :'String',
42
+ :'customer' => :'Customer',
43
+ :'quote_id' => :'String'
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[:'id']
56
+ self.id = attributes[:'id']
57
+ end
58
+ if attributes[:'message']
59
+ self.message = attributes[:'message']
60
+ end
61
+ if attributes[:'customer']
62
+ self.customer = attributes[:'customer']
63
+ end
64
+ if attributes[:'quote_id']
65
+ self.quote_id = attributes[:'quote_id']
66
+ end
67
+ end
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] Object to be compared
71
+ def ==(o)
72
+ return true if self.equal?(o)
73
+ self.class == o.class &&
74
+ id == o.id
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,90 @@
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 LeadInput
18
+ include SwaggerModel
19
+
20
+ attr_accessor :message
21
+
22
+ # The id which will identify your leads
23
+ attr_accessor :partner_id
24
+
25
+ attr_accessor :quote_id
26
+
27
+ attr_accessor :company_id
28
+
29
+ attr_accessor :customer
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'message' => :'message',
35
+ :'partner_id' => :'partner_id',
36
+ :'quote_id' => :'quote_id',
37
+ :'company_id' => :'company_id',
38
+ :'customer' => :'customer'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.swagger_types
44
+ {
45
+ :'message' => :'String',
46
+ :'partner_id' => :'String',
47
+ :'quote_id' => :'String',
48
+ :'company_id' => :'String',
49
+ :'customer' => :'CustomerInput'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ return unless attributes.is_a?(Hash)
57
+
58
+ # convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
60
+
61
+ if attributes[:'message']
62
+ self.message = attributes[:'message']
63
+ end
64
+ if attributes[:'partner_id']
65
+ self.partner_id = attributes[:'partner_id']
66
+ end
67
+ if attributes[:'quote_id']
68
+ self.quote_id = attributes[:'quote_id']
69
+ end
70
+ if attributes[:'company_id']
71
+ self.company_id = attributes[:'company_id']
72
+ end
73
+ if attributes[:'customer']
74
+ self.customer = attributes[:'customer']
75
+ end
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ message == o.message &&
84
+ partner_id == o.partner_id &&
85
+ quote_id == o.quote_id &&
86
+ company_id == o.company_id &&
87
+ customer == o.customer
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,66 @@
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 Location
18
+ include SwaggerModel
19
+ # Latitude of company address
20
+ attr_accessor :lat
21
+
22
+ # Longitude of company address
23
+ attr_accessor :lon
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'lat' => :'lat',
29
+ :'lon' => :'lon'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'lat' => :'String',
37
+ :'lon' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes[:'lat']
50
+ self.lat = attributes[:'lat']
51
+ end
52
+ if attributes[:'lon']
53
+ self.lon = attributes[:'lon']
54
+ end
55
+ end
56
+
57
+ # Checks equality by comparing each attribute.
58
+ # @param [Object] Object to be compared
59
+ def ==(o)
60
+ return true if self.equal?(o)
61
+ self.class == o.class &&
62
+ lat == o.lat &&
63
+ lon == o.lon
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,58 @@
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 Phone
18
+ include SwaggerModel
19
+
20
+ # Company phone number
21
+ attr_accessor :number
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'number' => :'number'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.swagger_types
32
+ {
33
+ :'number' => :'String'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
44
+
45
+ if attributes[:'number']
46
+ self.number = attributes[:'number']
47
+ end
48
+ end
49
+
50
+ # Checks equality by comparing each attribute.
51
+ # @param [Object] Object to be compared
52
+ def ==(o)
53
+ return true if self.equal?(o)
54
+ self.class == o.class &&
55
+ number == o.number
56
+ end
57
+ end
58
+ 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 PriceRange
18
+ include SwaggerModel
19
+
20
+ # Minimium price
21
+ attr_accessor :min
22
+
23
+ # Maximum price
24
+ attr_accessor :max
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'min' => :'min',
30
+ :'max' => :'max'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'min' => :'Float',
38
+ :'max' => :'Float'
39
+ }
40
+ end
41
+
42
+ # Initializes the object
43
+ # @param [Hash] attributes Model attributes in the form of hash
44
+ def initialize(attributes = {})
45
+ return unless attributes.is_a?(Hash)
46
+
47
+ # convert string to symbol for hash key
48
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
49
+
50
+ if attributes[:'min']
51
+ self.min = attributes[:'min']
52
+ end
53
+ if attributes[:'max']
54
+ self.max = attributes[:'max']
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
+ min == o.min &&
64
+ max == o.max
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] Object to be compared
69
+ def eql?(o)
70
+ self == o
71
+ end
72
+ end
73
+ end