patch_ruby 1.15.0 → 1.16.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +3 -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 -10
- 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 +37 -7
- 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 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +26 -49
- 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
|
|
|
@@ -30,7 +30,7 @@ module Patch
|
|
|
30
30
|
# The current state of the order.
|
|
31
31
|
attr_accessor :state
|
|
32
32
|
|
|
33
|
-
#
|
|
33
|
+
# DEPRECATED. Indicates if the order has been fully allocated to projects.
|
|
34
34
|
attr_accessor :allocation_state
|
|
35
35
|
|
|
36
36
|
# The total price in cents USD of the carbon offsets purchased through this order.
|
|
@@ -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
|
|
@@ -239,14 +239,14 @@ module Patch
|
|
|
239
239
|
def valid?
|
|
240
240
|
return false if @id.nil?
|
|
241
241
|
return false if @mass_g.nil?
|
|
242
|
-
return false if @mass_g >
|
|
242
|
+
return false if @mass_g > 100000000000
|
|
243
243
|
return false if @mass_g < 0
|
|
244
244
|
return false if @production.nil?
|
|
245
245
|
return false if @state.nil?
|
|
246
246
|
state_validator = EnumAttributeValidator.new('String', ["draft", "placed", "processing", "complete", "cancelled"])
|
|
247
247
|
return false unless state_validator.valid?(@state)
|
|
248
248
|
return false if @allocation_state.nil?
|
|
249
|
-
allocation_state_validator = EnumAttributeValidator.new('String', ["pending", "
|
|
249
|
+
allocation_state_validator = EnumAttributeValidator.new('String', ["pending", "allocated"])
|
|
250
250
|
return false unless allocation_state_validator.valid?(@allocation_state)
|
|
251
251
|
return false if @allocations.nil?
|
|
252
252
|
return false if @metadata.nil?
|
|
@@ -260,8 +260,8 @@ module Patch
|
|
|
260
260
|
fail ArgumentError, 'mass_g cannot be nil'
|
|
261
261
|
end
|
|
262
262
|
|
|
263
|
-
if mass_g >
|
|
264
|
-
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to
|
|
263
|
+
if mass_g > 100000000000
|
|
264
|
+
fail ArgumentError, 'invalid value for "mass_g", must be smaller than or equal to 100000000000.'
|
|
265
265
|
end
|
|
266
266
|
|
|
267
267
|
if mass_g < 0
|
|
@@ -284,7 +284,7 @@ module Patch
|
|
|
284
284
|
# Custom attribute writer method checking allowed values (enum).
|
|
285
285
|
# @param [Object] allocation_state Object to be assigned
|
|
286
286
|
def allocation_state=(allocation_state)
|
|
287
|
-
validator = EnumAttributeValidator.new('String', ["pending", "
|
|
287
|
+
validator = EnumAttributeValidator.new('String', ["pending", "allocated"])
|
|
288
288
|
unless validator.valid?(allocation_state)
|
|
289
289
|
fail ArgumentError, "invalid value for \"allocation_state\", must be one of #{validator.allowable_values}."
|
|
290
290
|
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
|
|
|
@@ -57,7 +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
|
-
#
|
|
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
|
+
attr_accessor :verifier
|
|
62
|
+
|
|
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.
|
|
61
64
|
attr_accessor :standard
|
|
62
65
|
|
|
63
66
|
# An array returning the UN Sustainable Development Goals associated with this project.
|
|
@@ -68,6 +71,9 @@ module Patch
|
|
|
68
71
|
|
|
69
72
|
attr_accessor :technology_type
|
|
70
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
|
+
|
|
71
77
|
class EnumAttributeValidator
|
|
72
78
|
attr_reader :datatype
|
|
73
79
|
attr_reader :allowable_values
|
|
@@ -107,10 +113,12 @@ module Patch
|
|
|
107
113
|
:'photos' => :'photos',
|
|
108
114
|
:'average_price_per_tonne_cents_usd' => :'average_price_per_tonne_cents_usd',
|
|
109
115
|
:'remaining_mass_g' => :'remaining_mass_g',
|
|
116
|
+
:'verifier' => :'verifier',
|
|
110
117
|
:'standard' => :'standard',
|
|
111
118
|
:'sdgs' => :'sdgs',
|
|
112
119
|
:'tagline' => :'tagline',
|
|
113
|
-
:'technology_type' => :'technology_type'
|
|
120
|
+
:'technology_type' => :'technology_type',
|
|
121
|
+
:'highlights' => :'highlights'
|
|
114
122
|
}
|
|
115
123
|
end
|
|
116
124
|
|
|
@@ -136,10 +144,12 @@ module Patch
|
|
|
136
144
|
:'photos' => :'Array<Photo>',
|
|
137
145
|
:'average_price_per_tonne_cents_usd' => :'Integer',
|
|
138
146
|
:'remaining_mass_g' => :'Integer',
|
|
147
|
+
:'verifier' => :'String',
|
|
139
148
|
:'standard' => :'Standard',
|
|
140
149
|
:'sdgs' => :'Array<Sdg>',
|
|
141
150
|
:'tagline' => :'String',
|
|
142
|
-
:'technology_type' => :'TechnologyType'
|
|
151
|
+
:'technology_type' => :'TechnologyType',
|
|
152
|
+
:'highlights' => :'Array<Highlight>'
|
|
143
153
|
}
|
|
144
154
|
end
|
|
145
155
|
|
|
@@ -240,7 +250,14 @@ module Patch
|
|
|
240
250
|
self.remaining_mass_g = attributes[:'remaining_mass_g']
|
|
241
251
|
end
|
|
242
252
|
|
|
253
|
+
if attributes.key?(:'verifier')
|
|
254
|
+
self.verifier = attributes[:'verifier']
|
|
255
|
+
end
|
|
256
|
+
|
|
243
257
|
if attributes.key?(:'standard')
|
|
258
|
+
if (value = attributes[:'standard']).is_a?(Hash)
|
|
259
|
+
self.standard = value
|
|
260
|
+
end
|
|
244
261
|
self.standard = attributes[:'standard']
|
|
245
262
|
end
|
|
246
263
|
|
|
@@ -257,6 +274,12 @@ module Patch
|
|
|
257
274
|
if attributes.key?(:'technology_type')
|
|
258
275
|
self.technology_type = attributes[:'technology_type']
|
|
259
276
|
end
|
|
277
|
+
|
|
278
|
+
if attributes.key?(:'highlights')
|
|
279
|
+
if (value = attributes[:'highlights']).is_a?(Array)
|
|
280
|
+
self.highlights = value
|
|
281
|
+
end
|
|
282
|
+
end
|
|
260
283
|
end
|
|
261
284
|
|
|
262
285
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -299,6 +322,10 @@ module Patch
|
|
|
299
322
|
invalid_properties.push('invalid value for "technology_type", technology_type cannot be nil.')
|
|
300
323
|
end
|
|
301
324
|
|
|
325
|
+
if @highlights.nil?
|
|
326
|
+
invalid_properties.push('invalid value for "highlights", highlights cannot be nil.')
|
|
327
|
+
end
|
|
328
|
+
|
|
302
329
|
invalid_properties
|
|
303
330
|
end
|
|
304
331
|
|
|
@@ -316,6 +343,7 @@ module Patch
|
|
|
316
343
|
return false if @average_price_per_tonne_cents_usd.nil?
|
|
317
344
|
return false if @remaining_mass_g.nil?
|
|
318
345
|
return false if @technology_type.nil?
|
|
346
|
+
return false if @highlights.nil?
|
|
319
347
|
true
|
|
320
348
|
end
|
|
321
349
|
|
|
@@ -348,10 +376,12 @@ module Patch
|
|
|
348
376
|
photos == o.photos &&
|
|
349
377
|
average_price_per_tonne_cents_usd == o.average_price_per_tonne_cents_usd &&
|
|
350
378
|
remaining_mass_g == o.remaining_mass_g &&
|
|
379
|
+
verifier == o.verifier &&
|
|
351
380
|
standard == o.standard &&
|
|
352
381
|
sdgs == o.sdgs &&
|
|
353
382
|
tagline == o.tagline &&
|
|
354
|
-
technology_type == o.technology_type
|
|
383
|
+
technology_type == o.technology_type &&
|
|
384
|
+
highlights == o.highlights
|
|
355
385
|
end
|
|
356
386
|
|
|
357
387
|
# @see the `==` method
|
|
@@ -363,7 +393,7 @@ module Patch
|
|
|
363
393
|
# Calculates hash code according to all attributes.
|
|
364
394
|
# @return [Integer] Hash code
|
|
365
395
|
def hash
|
|
366
|
-
[id, production, name, description, type, mechanism, country, state, latitude, longitude, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, 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
|
|
367
397
|
end
|
|
368
398
|
|
|
369
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.16.1'
|
|
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
|
|