lib/patch_ruby/models/project.rb in patch_ruby-1.24.2 vs lib/patch_ruby/models/project.rb in patch_ruby-2.0.0
- old
+ new
@@ -1,11 +1,11 @@
=begin
-#Patch API V1
+#Patch API V2
#The core API used to integrate with Patch's service
-The version of the OpenAPI document: v1
+The version of the OpenAPI document: 2
Contact: engineering@usepatch.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.3.1
=end
@@ -25,13 +25,10 @@
attr_accessor :name
# The description of the project.
attr_accessor :description
- # DEPRECATED. Favor the technology_type field instead.
- attr_accessor :type
-
# The mechanism of the project. One of: removal, avoidance, avoidance_and_removal.
attr_accessor :mechanism
# The country of origin of the project.
attr_accessor :country
@@ -43,22 +40,16 @@
attr_accessor :latitude
# The longitude at which this project is located.
attr_accessor :longitude
- # The name of the project developer.
- attr_accessor :developer
+ # The name of the project project partner.
+ attr_accessor :project_partner
# An array of URLs for photos of the project.
attr_accessor :photos
- # DEPRECATED. The average price per tonne in USD cents for carbon offsets supplied by this project.
- attr_accessor :average_price_per_tonne_cents_usd
-
- # DEPRECATED. The remaining mass in grams available for purchase for this project.
- attr_accessor :remaining_mass_g
-
# 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.
attr_accessor :verifier
# 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.
attr_accessor :standard
@@ -82,20 +73,17 @@
{
:'id' => :'id',
:'production' => :'production',
:'name' => :'name',
:'description' => :'description',
- :'type' => :'type',
:'mechanism' => :'mechanism',
:'country' => :'country',
:'state' => :'state',
:'latitude' => :'latitude',
:'longitude' => :'longitude',
- :'developer' => :'developer',
+ :'project_partner' => :'project_partner',
:'photos' => :'photos',
- :'average_price_per_tonne_cents_usd' => :'average_price_per_tonne_cents_usd',
- :'remaining_mass_g' => :'remaining_mass_g',
:'verifier' => :'verifier',
:'standard' => :'standard',
:'sdgs' => :'sdgs',
:'tagline' => :'tagline',
:'technology_type' => :'technology_type',
@@ -114,20 +102,17 @@
{
:'id' => :'String',
:'production' => :'Boolean',
:'name' => :'String',
:'description' => :'String',
- :'type' => :'String',
:'mechanism' => :'String',
:'country' => :'String',
:'state' => :'String',
:'latitude' => :'Float',
:'longitude' => :'Float',
- :'developer' => :'String',
+ :'project_partner' => :'String',
:'photos' => :'Array<Photo>',
- :'average_price_per_tonne_cents_usd' => :'Integer',
- :'remaining_mass_g' => :'Integer',
:'verifier' => :'String',
:'standard' => :'Standard',
:'sdgs' => :'Array<Sdg>',
:'tagline' => :'String',
:'technology_type' => :'TechnologyType',
@@ -189,14 +174,10 @@
if attributes.key?(:'description')
self.description = attributes[:'description']
end
- if attributes.key?(:'type')
- self.type = attributes[:'type']
- end
-
if attributes.key?(:'mechanism')
self.mechanism = attributes[:'mechanism']
end
if attributes.key?(:'country')
@@ -213,28 +194,20 @@
if attributes.key?(:'longitude')
self.longitude = attributes[:'longitude']
end
- if attributes.key?(:'developer')
- self.developer = attributes[:'developer']
+ if attributes.key?(:'project_partner')
+ self.project_partner = attributes[:'project_partner']
end
if attributes.key?(:'photos')
if (value = attributes[:'photos']).is_a?(Array)
self.photos = value
end
end
- if attributes.key?(:'average_price_per_tonne_cents_usd')
- self.average_price_per_tonne_cents_usd = attributes[:'average_price_per_tonne_cents_usd']
- end
-
- if attributes.key?(:'remaining_mass_g')
- self.remaining_mass_g = attributes[:'remaining_mass_g']
- end
-
if attributes.key?(:'verifier')
self.verifier = attributes[:'verifier']
end
if attributes.key?(:'standard')
@@ -293,22 +266,14 @@
if @country.nil?
invalid_properties.push('invalid value for "country", country cannot be nil.')
end
- if @developer.nil?
- invalid_properties.push('invalid value for "developer", developer cannot be nil.')
+ if @project_partner.nil?
+ invalid_properties.push('invalid value for "project_partner", project_partner cannot be nil.')
end
- if @average_price_per_tonne_cents_usd.nil?
- invalid_properties.push('invalid value for "average_price_per_tonne_cents_usd", average_price_per_tonne_cents_usd cannot be nil.')
- end
-
- if @remaining_mass_g.nil?
- invalid_properties.push('invalid value for "remaining_mass_g", remaining_mass_g cannot be nil.')
- end
-
if @technology_type.nil?
invalid_properties.push('invalid value for "technology_type", technology_type cannot be nil.')
end
if @highlights.nil?
@@ -328,13 +293,11 @@
return false if @id.nil?
return false if @production.nil?
return false if @name.nil?
return false if @description.nil?
return false if @country.nil?
- return false if @developer.nil?
- return false if @average_price_per_tonne_cents_usd.nil?
- return false if @remaining_mass_g.nil?
+ return false if @project_partner.nil?
return false if @technology_type.nil?
return false if @highlights.nil?
return false if @inventory.nil?
true
end
@@ -346,20 +309,17 @@
self.class == o.class &&
id == o.id &&
production == o.production &&
name == o.name &&
description == o.description &&
- type == o.type &&
mechanism == o.mechanism &&
country == o.country &&
state == o.state &&
latitude == o.latitude &&
longitude == o.longitude &&
- developer == o.developer &&
+ project_partner == o.project_partner &&
photos == o.photos &&
- average_price_per_tonne_cents_usd == o.average_price_per_tonne_cents_usd &&
- remaining_mass_g == o.remaining_mass_g &&
verifier == o.verifier &&
standard == o.standard &&
sdgs == o.sdgs &&
tagline == o.tagline &&
technology_type == o.technology_type &&
@@ -374,10 +334,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [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, inventory].hash
+ [id, production, name, description, mechanism, country, state, latitude, longitude, project_partner, photos, verifier, standard, sdgs, tagline, technology_type, highlights, inventory].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself