patch_ruby 1.15.1 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +4 -2
- data/README.md +11 -12
- data/lib/patch_ruby/api/estimates_api.rb +28 -10
- data/lib/patch_ruby/api/orders_api.rb +10 -7
- data/lib/patch_ruby/api/projects_api.rb +4 -4
- data/lib/patch_ruby/api/technology_types_api.rb +3 -3
- data/lib/patch_ruby/api_client.rb +6 -6
- data/lib/patch_ruby/api_error.rb +2 -2
- data/lib/patch_ruby/configuration.rb +6 -6
- data/lib/patch_ruby/models/allocation.rb +2 -2
- data/lib/patch_ruby/models/create_bitcoin_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_ethereum_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_flight_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_mass_estimate_request.rb +7 -7
- data/lib/patch_ruby/models/create_order_request.rb +7 -7
- data/lib/patch_ruby/models/create_shipping_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/create_success_response.rb +3 -7
- data/lib/patch_ruby/models/create_vehicle_estimate_request.rb +2 -2
- data/lib/patch_ruby/models/error_response.rb +3 -7
- data/lib/patch_ruby/models/estimate.rb +5 -2
- data/lib/patch_ruby/models/estimate_list_response.rb +2 -2
- data/lib/patch_ruby/models/estimate_response.rb +2 -2
- data/lib/patch_ruby/models/{preference_response.rb → highlight.rb} +40 -33
- data/lib/patch_ruby/models/meta_index_object.rb +2 -2
- data/lib/patch_ruby/models/order.rb +10 -15
- data/lib/patch_ruby/models/order_list_response.rb +2 -2
- data/lib/patch_ruby/models/order_response.rb +2 -2
- data/lib/patch_ruby/models/parent_technology_type.rb +2 -2
- data/lib/patch_ruby/models/photo.rb +2 -2
- data/lib/patch_ruby/models/project.rb +29 -9
- data/lib/patch_ruby/models/project_list_response.rb +2 -2
- data/lib/patch_ruby/models/project_response.rb +2 -2
- data/lib/patch_ruby/models/sdg.rb +2 -2
- data/lib/patch_ruby/models/standard.rb +2 -2
- data/lib/patch_ruby/models/technology_type.rb +2 -2
- data/lib/patch_ruby/models/technology_type_list_response.rb +2 -2
- data/lib/patch_ruby/version.rb +3 -3
- data/lib/patch_ruby.rb +3 -7
- data/patch_ruby.gemspec +2 -2
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +2 -2
- data/spec/integration/orders_spec.rb +1 -3
- data/spec/integration/projects_spec.rb +2 -0
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +25 -48
- data/lib/patch_ruby/models/create_preference_request.rb +0 -233
- data/lib/patch_ruby/models/preference.rb +0 -264
- data/lib/patch_ruby/models/preference_list_response.rb +0 -273
- data/spec/api/preferences_api_spec.rb +0 -82
- data/spec/factories/create_preference_requests.rb +0 -5
- data/spec/factories/preference_list_responses.rb +0 -8
- data/spec/factories/preference_responses.rb +0 -7
- data/spec/factories/preferences.rb +0 -7
- data/spec/integration/preferences_spec.rb +0 -32
- data/spec/models/create_preference_request_spec.rb +0 -47
- data/spec/models/preference_list_response_spec.rb +0 -64
- data/spec/models/preference_response_spec.rb +0 -58
- data/spec/models/preference_spec.rb +0 -58
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -108,6 +108,9 @@ module Patch
|
|
108
108
|
end
|
109
109
|
|
110
110
|
if attributes.key?(:'order')
|
111
|
+
if (value = attributes[:'order']).is_a?(Hash)
|
112
|
+
self.order = value
|
113
|
+
end
|
111
114
|
self.order = attributes[:'order']
|
112
115
|
end
|
113
116
|
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,19 +14,22 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Patch
|
17
|
-
class
|
18
|
-
|
17
|
+
class Highlight
|
18
|
+
# A unique identifier for each highlight.
|
19
|
+
attr_accessor :slug
|
19
20
|
|
20
|
-
|
21
|
+
# A short string that spotlights a characteristic about the project.
|
22
|
+
attr_accessor :title
|
21
23
|
|
22
|
-
|
24
|
+
# A URL for the corresponding icon.
|
25
|
+
attr_accessor :icon_url
|
23
26
|
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
|
-
:'
|
28
|
-
:'
|
29
|
-
:'
|
30
|
+
:'slug' => :'slug',
|
31
|
+
:'title' => :'title',
|
32
|
+
:'icon_url' => :'icon_url'
|
30
33
|
}
|
31
34
|
end
|
32
35
|
|
@@ -38,16 +41,15 @@ module Patch
|
|
38
41
|
# Attribute type mapping.
|
39
42
|
def self.openapi_types
|
40
43
|
{
|
41
|
-
:'
|
42
|
-
:'
|
43
|
-
:'
|
44
|
+
:'slug' => :'String',
|
45
|
+
:'title' => :'String',
|
46
|
+
:'icon_url' => :'String'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
47
50
|
# List of attributes with nullable: true
|
48
51
|
def self.openapi_nullable
|
49
52
|
Set.new([
|
50
|
-
:'error',
|
51
53
|
])
|
52
54
|
end
|
53
55
|
|
@@ -56,8 +58,8 @@ module Patch
|
|
56
58
|
# Exposes Model.operation_id which delegates to ModelsApi.new.operation_id
|
57
59
|
# Eg. Order.create_order delegates to OrdersApi.new.create_order
|
58
60
|
def self.method_missing(message, *args, &block)
|
59
|
-
if Object.const_defined?('Patch::
|
60
|
-
Patch::
|
61
|
+
if Object.const_defined?('Patch::HighlightsApi::OPERATIONS') && Patch::HighlightsApi::OPERATIONS.include?(message)
|
62
|
+
Patch::HighlightsApi.new.send(message, *args)
|
61
63
|
else
|
62
64
|
super
|
63
65
|
end
|
@@ -67,27 +69,27 @@ module Patch
|
|
67
69
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
70
|
def initialize(attributes = {})
|
69
71
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Patch::
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Patch::Highlight` initialize method"
|
71
73
|
end
|
72
74
|
|
73
75
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
76
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
77
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Patch::
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Patch::Highlight`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
79
|
end
|
78
80
|
h[k.to_sym] = v
|
79
81
|
}
|
80
82
|
|
81
|
-
if attributes.key?(:'
|
82
|
-
self.
|
83
|
+
if attributes.key?(:'slug')
|
84
|
+
self.slug = attributes[:'slug']
|
83
85
|
end
|
84
86
|
|
85
|
-
if attributes.key?(:'
|
86
|
-
self.
|
87
|
+
if attributes.key?(:'title')
|
88
|
+
self.title = attributes[:'title']
|
87
89
|
end
|
88
90
|
|
89
|
-
if attributes.key?(:'
|
90
|
-
self.
|
91
|
+
if attributes.key?(:'icon_url')
|
92
|
+
self.icon_url = attributes[:'icon_url']
|
91
93
|
end
|
92
94
|
end
|
93
95
|
|
@@ -95,12 +97,16 @@ module Patch
|
|
95
97
|
# @return Array for valid properties with the reasons
|
96
98
|
def list_invalid_properties
|
97
99
|
invalid_properties = Array.new
|
98
|
-
if @
|
99
|
-
invalid_properties.push('invalid value for "
|
100
|
+
if @slug.nil?
|
101
|
+
invalid_properties.push('invalid value for "slug", slug cannot be nil.')
|
100
102
|
end
|
101
103
|
|
102
|
-
if @
|
103
|
-
invalid_properties.push('invalid value for "
|
104
|
+
if @title.nil?
|
105
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
if @icon_url.nil?
|
109
|
+
invalid_properties.push('invalid value for "icon_url", icon_url cannot be nil.')
|
104
110
|
end
|
105
111
|
|
106
112
|
invalid_properties
|
@@ -109,8 +115,9 @@ module Patch
|
|
109
115
|
# Check to see if the all the properties in the model are valid
|
110
116
|
# @return true if the model is valid
|
111
117
|
def valid?
|
112
|
-
return false if @
|
113
|
-
return false if @
|
118
|
+
return false if @slug.nil?
|
119
|
+
return false if @title.nil?
|
120
|
+
return false if @icon_url.nil?
|
114
121
|
true
|
115
122
|
end
|
116
123
|
|
@@ -119,9 +126,9 @@ module Patch
|
|
119
126
|
def ==(o)
|
120
127
|
return true if self.equal?(o)
|
121
128
|
self.class == o.class &&
|
122
|
-
|
123
|
-
|
124
|
-
|
129
|
+
slug == o.slug &&
|
130
|
+
title == o.title &&
|
131
|
+
icon_url == o.icon_url
|
125
132
|
end
|
126
133
|
|
127
134
|
# @see the `==` method
|
@@ -133,7 +140,7 @@ module Patch
|
|
133
140
|
# Calculates hash code according to all attributes.
|
134
141
|
# @return [Integer] Hash code
|
135
142
|
def hash
|
136
|
-
[
|
143
|
+
[slug, title, icon_url].hash
|
137
144
|
end
|
138
145
|
|
139
146
|
# Builds the object from hash
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ module Patch
|
|
39
39
|
# The Patch Fee in cents USD for this order.
|
40
40
|
attr_accessor :patch_fee_cents_usd
|
41
41
|
|
42
|
-
# An array containing the inventory allocations for this order.
|
42
|
+
# DEPRECATED. An array containing the inventory allocations for this order.
|
43
43
|
attr_accessor :allocations
|
44
44
|
|
45
45
|
# The url of this order in the public registry.
|
@@ -203,8 +203,8 @@ module Patch
|
|
203
203
|
invalid_properties.push('invalid value for "mass_g", mass_g cannot be nil.')
|
204
204
|
end
|
205
205
|
|
206
|
-
if @mass_g >
|
207
|
-
invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to
|
206
|
+
if @mass_g > 100000000000
|
207
|
+
invalid_properties.push('invalid value for "mass_g", must be smaller than or equal to 100000000000.')
|
208
208
|
end
|
209
209
|
|
210
210
|
if @mass_g < 0
|
@@ -223,10 +223,6 @@ module Patch
|
|
223
223
|
invalid_properties.push('invalid value for "allocation_state", allocation_state cannot be nil.')
|
224
224
|
end
|
225
225
|
|
226
|
-
if @allocations.nil?
|
227
|
-
invalid_properties.push('invalid value for "allocations", allocations cannot be nil.')
|
228
|
-
end
|
229
|
-
|
230
226
|
if @metadata.nil?
|
231
227
|
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
232
228
|
end
|
@@ -239,16 +235,15 @@ module Patch
|
|
239
235
|
def valid?
|
240
236
|
return false if @id.nil?
|
241
237
|
return false if @mass_g.nil?
|
242
|
-
return false if @mass_g >
|
238
|
+
return false if @mass_g > 100000000000
|
243
239
|
return false if @mass_g < 0
|
244
240
|
return false if @production.nil?
|
245
241
|
return false if @state.nil?
|
246
242
|
state_validator = EnumAttributeValidator.new('String', ["draft", "placed", "processing", "complete", "cancelled"])
|
247
243
|
return false unless state_validator.valid?(@state)
|
248
244
|
return false if @allocation_state.nil?
|
249
|
-
allocation_state_validator = EnumAttributeValidator.new('String', ["pending", "
|
245
|
+
allocation_state_validator = EnumAttributeValidator.new('String', ["pending", "allocated"])
|
250
246
|
return false unless allocation_state_validator.valid?(@allocation_state)
|
251
|
-
return false if @allocations.nil?
|
252
247
|
return false if @metadata.nil?
|
253
248
|
true
|
254
249
|
end
|
@@ -260,8 +255,8 @@ module Patch
|
|
260
255
|
fail ArgumentError, 'mass_g cannot be nil'
|
261
256
|
end
|
262
257
|
|
263
|
-
if mass_g >
|
264
|
-
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to
|
258
|
+
if mass_g > 100000000000
|
259
|
+
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to 100000000000.'
|
265
260
|
end
|
266
261
|
|
267
262
|
if mass_g < 0
|
@@ -284,7 +279,7 @@ module Patch
|
|
284
279
|
# Custom attribute writer method checking allowed values (enum).
|
285
280
|
# @param [Object] allocation_state Object to be assigned
|
286
281
|
def allocation_state=(allocation_state)
|
287
|
-
validator = EnumAttributeValidator.new('String', ["pending", "
|
282
|
+
validator = EnumAttributeValidator.new('String', ["pending", "allocated"])
|
288
283
|
unless validator.valid?(allocation_state)
|
289
284
|
fail ArgumentError, "invalid value for \"allocation_state\", must be one of #{validator.allowable_values}."
|
290
285
|
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -27,7 +27,7 @@ module Patch
|
|
27
27
|
# The description of the project.
|
28
28
|
attr_accessor :description
|
29
29
|
|
30
|
-
#
|
30
|
+
# DEPRECATED. Favor the technology_type field instead.
|
31
31
|
attr_accessor :type
|
32
32
|
|
33
33
|
# The mechanism of the project. Either removal or avoidance.
|
@@ -57,10 +57,10 @@ module Patch
|
|
57
57
|
# The remaining mass in grams available for purchase for this project.
|
58
58
|
attr_accessor :remaining_mass_g
|
59
59
|
|
60
|
-
# The name of the project verifier. A verifier is the organization that verifies the calculations of the actual amount of greenhouse gas emissions that have been avoided or sequestered through implementation of the project.
|
60
|
+
# The name of the project verifier, when applicable. A verifier is the organization that verifies the calculations of the actual amount of greenhouse gas emissions that have been avoided or sequestered through implementation of the project.
|
61
61
|
attr_accessor :verifier
|
62
62
|
|
63
|
-
# An object returning the Standard associated with this project. Standards provide guidance on GHG quantification, monitoring, and reporting. Standards can include protocols/methodologies and guidance documents.
|
63
|
+
# An object returning the Standard associated with this project, when applicable. Standards provide guidance on GHG quantification, monitoring, and reporting. Standards can include protocols/methodologies and guidance documents.
|
64
64
|
attr_accessor :standard
|
65
65
|
|
66
66
|
# An array returning the UN Sustainable Development Goals associated with this project.
|
@@ -71,6 +71,9 @@ module Patch
|
|
71
71
|
|
72
72
|
attr_accessor :technology_type
|
73
73
|
|
74
|
+
# An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project.
|
75
|
+
attr_accessor :highlights
|
76
|
+
|
74
77
|
class EnumAttributeValidator
|
75
78
|
attr_reader :datatype
|
76
79
|
attr_reader :allowable_values
|
@@ -114,7 +117,8 @@ module Patch
|
|
114
117
|
:'standard' => :'standard',
|
115
118
|
:'sdgs' => :'sdgs',
|
116
119
|
:'tagline' => :'tagline',
|
117
|
-
:'technology_type' => :'technology_type'
|
120
|
+
:'technology_type' => :'technology_type',
|
121
|
+
:'highlights' => :'highlights'
|
118
122
|
}
|
119
123
|
end
|
120
124
|
|
@@ -144,7 +148,8 @@ module Patch
|
|
144
148
|
:'standard' => :'Standard',
|
145
149
|
:'sdgs' => :'Array<Sdg>',
|
146
150
|
:'tagline' => :'String',
|
147
|
-
:'technology_type' => :'TechnologyType'
|
151
|
+
:'technology_type' => :'TechnologyType',
|
152
|
+
:'highlights' => :'Array<Highlight>'
|
148
153
|
}
|
149
154
|
end
|
150
155
|
|
@@ -250,6 +255,9 @@ module Patch
|
|
250
255
|
end
|
251
256
|
|
252
257
|
if attributes.key?(:'standard')
|
258
|
+
if (value = attributes[:'standard']).is_a?(Hash)
|
259
|
+
self.standard = value
|
260
|
+
end
|
253
261
|
self.standard = attributes[:'standard']
|
254
262
|
end
|
255
263
|
|
@@ -266,6 +274,12 @@ module Patch
|
|
266
274
|
if attributes.key?(:'technology_type')
|
267
275
|
self.technology_type = attributes[:'technology_type']
|
268
276
|
end
|
277
|
+
|
278
|
+
if attributes.key?(:'highlights')
|
279
|
+
if (value = attributes[:'highlights']).is_a?(Array)
|
280
|
+
self.highlights = value
|
281
|
+
end
|
282
|
+
end
|
269
283
|
end
|
270
284
|
|
271
285
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -308,6 +322,10 @@ module Patch
|
|
308
322
|
invalid_properties.push('invalid value for "technology_type", technology_type cannot be nil.')
|
309
323
|
end
|
310
324
|
|
325
|
+
if @highlights.nil?
|
326
|
+
invalid_properties.push('invalid value for "highlights", highlights cannot be nil.')
|
327
|
+
end
|
328
|
+
|
311
329
|
invalid_properties
|
312
330
|
end
|
313
331
|
|
@@ -325,6 +343,7 @@ module Patch
|
|
325
343
|
return false if @average_price_per_tonne_cents_usd.nil?
|
326
344
|
return false if @remaining_mass_g.nil?
|
327
345
|
return false if @technology_type.nil?
|
346
|
+
return false if @highlights.nil?
|
328
347
|
true
|
329
348
|
end
|
330
349
|
|
@@ -361,7 +380,8 @@ module Patch
|
|
361
380
|
standard == o.standard &&
|
362
381
|
sdgs == o.sdgs &&
|
363
382
|
tagline == o.tagline &&
|
364
|
-
technology_type == o.technology_type
|
383
|
+
technology_type == o.technology_type &&
|
384
|
+
highlights == o.highlights
|
365
385
|
end
|
366
386
|
|
367
387
|
# @see the `==` method
|
@@ -373,7 +393,7 @@ module Patch
|
|
373
393
|
# Calculates hash code according to all attributes.
|
374
394
|
# @return [Integer] Hash code
|
375
395
|
def hash
|
376
|
-
[id, production, name, description, type, mechanism, country, state, latitude, longitude, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, verifier, standard, sdgs, tagline, technology_type].hash
|
396
|
+
[id, production, name, description, type, mechanism, country, state, latitude, longitude, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, verifier, standard, sdgs, tagline, technology_type, highlights].hash
|
377
397
|
end
|
378
398
|
|
379
399
|
# Builds the object from hash
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/lib/patch_ruby/version.rb
CHANGED
@@ -4,12 +4,12 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module Patch
|
14
|
-
VERSION = '1.
|
14
|
+
VERSION = '1.17.0'
|
15
15
|
end
|
data/lib/patch_ruby.rb
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -23,7 +23,6 @@ require 'patch_ruby/models/create_ethereum_estimate_request'
|
|
23
23
|
require 'patch_ruby/models/create_flight_estimate_request'
|
24
24
|
require 'patch_ruby/models/create_mass_estimate_request'
|
25
25
|
require 'patch_ruby/models/create_order_request'
|
26
|
-
require 'patch_ruby/models/create_preference_request'
|
27
26
|
require 'patch_ruby/models/create_shipping_estimate_request'
|
28
27
|
require 'patch_ruby/models/create_success_response'
|
29
28
|
require 'patch_ruby/models/create_vehicle_estimate_request'
|
@@ -31,15 +30,13 @@ require 'patch_ruby/models/error_response'
|
|
31
30
|
require 'patch_ruby/models/estimate'
|
32
31
|
require 'patch_ruby/models/estimate_list_response'
|
33
32
|
require 'patch_ruby/models/estimate_response'
|
33
|
+
require 'patch_ruby/models/highlight'
|
34
34
|
require 'patch_ruby/models/meta_index_object'
|
35
35
|
require 'patch_ruby/models/order'
|
36
36
|
require 'patch_ruby/models/order_list_response'
|
37
37
|
require 'patch_ruby/models/order_response'
|
38
38
|
require 'patch_ruby/models/parent_technology_type'
|
39
39
|
require 'patch_ruby/models/photo'
|
40
|
-
require 'patch_ruby/models/preference'
|
41
|
-
require 'patch_ruby/models/preference_list_response'
|
42
|
-
require 'patch_ruby/models/preference_response'
|
43
40
|
require 'patch_ruby/models/project'
|
44
41
|
require 'patch_ruby/models/project_list_response'
|
45
42
|
require 'patch_ruby/models/project_response'
|
@@ -51,7 +48,6 @@ require 'patch_ruby/models/technology_type_list_response'
|
|
51
48
|
# APIs
|
52
49
|
require 'patch_ruby/api/estimates_api'
|
53
50
|
require 'patch_ruby/api/orders_api'
|
54
|
-
require 'patch_ruby/api/preferences_api'
|
55
51
|
require 'patch_ruby/api/projects_api'
|
56
52
|
require 'patch_ruby/api/technology_types_api'
|
57
53
|
|
data/patch_ruby.gemspec
CHANGED
@@ -6,9 +6,9 @@
|
|
6
6
|
#The core API used to integrate with Patch's service
|
7
7
|
|
8
8
|
The version of the OpenAPI document: v1
|
9
|
-
Contact:
|
9
|
+
Contact: engineering@usepatch.com
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version: 5.
|
11
|
+
OpenAPI Generator version: 5.3.1
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
data/spec/api_client_spec.rb
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -197,8 +197,8 @@ describe Patch::ApiClient do
|
|
197
197
|
let(:api_client) { Patch::ApiClient.new }
|
198
198
|
|
199
199
|
it 'works' do
|
200
|
-
expect(api_client.select_header_content_type(nil)).to
|
201
|
-
expect(api_client.select_header_content_type([])).to
|
200
|
+
expect(api_client.select_header_content_type(nil)).to be_nil
|
201
|
+
expect(api_client.select_header_content_type([])).to be_nil
|
202
202
|
|
203
203
|
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
204
204
|
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
data/spec/configuration_spec.rb
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
#The core API used to integrate with Patch's service
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
|
-
Contact:
|
7
|
+
Contact: engineering@usepatch.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|