diff --git a/.github/workflows/health_check.yml b/.github/workflows/health_check.yml index 8fc0a00..1b71cf5 100644 --- a/.github/workflows/health_check.yml +++ b/.github/workflows/health_check.yml @@ -30,7 +30,7 @@ jobs: - name: Notify slack uses: kpritam/slack-job-status-action@v1 with: - if: failure() + if: ${{ failure() }} job-status: ${{ job.status }} slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} channel: eng-notifications diff --git a/CHANGELOG.md b/CHANGELOG.md index 323ad25..f8552d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.15.1] - 2021-11-04 + +### Added + +- Adds verifier to project responses + ## [1.15.0] - 2021-10-04 ### Added diff --git a/Gemfile.lock b/Gemfile.lock index ed3f77d..9913816 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - patch_ruby (1.15.0) + patch_ruby (1.15.1) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -18,7 +18,7 @@ GEM coderay (1.1.3) concurrent-ruby (1.1.9) diff-lcs (1.4.4) - ethon (0.14.0) + ethon (0.15.0) ffi (>= 1.15.0) factory_bot (6.2.0) activesupport (>= 5.0.0) diff --git a/lib/patch_ruby/api_client.rb b/lib/patch_ruby/api_client.rb index 59ef1e2..605dbf3 100644 --- a/lib/patch_ruby/api_client.rb +++ b/lib/patch_ruby/api_client.rb @@ -31,7 +31,7 @@ class ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "patch-ruby/1.15.0" + @user_agent = "patch-ruby/1.15.1" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent diff --git a/lib/patch_ruby/models/order.rb b/lib/patch_ruby/models/order.rb index d746ac5..95c76cd 100644 --- a/lib/patch_ruby/models/order.rb +++ b/lib/patch_ruby/models/order.rb @@ -30,7 +30,7 @@ class Order # The current state of the order. attr_accessor :state - # The current state of the allocated carbon offsets of the order. + # DEPRECATED. Indicates if the order has been fully allocated to projects. attr_accessor :allocation_state # The total price in cents USD of the carbon offsets purchased through this order. diff --git a/lib/patch_ruby/models/project.rb b/lib/patch_ruby/models/project.rb index 127eecf..89e56b7 100644 --- a/lib/patch_ruby/models/project.rb +++ b/lib/patch_ruby/models/project.rb @@ -57,7 +57,10 @@ class Project # The remaining mass in grams available for purchase for this project. attr_accessor :remaining_mass_g - # An object returning the Standard associated with this project. + # 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. + attr_accessor :verifier + + # 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. attr_accessor :standard # An array returning the UN Sustainable Development Goals associated with this project. @@ -107,6 +110,7 @@ def self.attribute_map :'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', @@ -136,6 +140,7 @@ def self.openapi_types :'photos' => :'Array', :'average_price_per_tonne_cents_usd' => :'Integer', :'remaining_mass_g' => :'Integer', + :'verifier' => :'String', :'standard' => :'Standard', :'sdgs' => :'Array', :'tagline' => :'String', @@ -240,6 +245,10 @@ def initialize(attributes = {}) self.remaining_mass_g = attributes[:'remaining_mass_g'] end + if attributes.key?(:'verifier') + self.verifier = attributes[:'verifier'] + end + if attributes.key?(:'standard') self.standard = attributes[:'standard'] end @@ -348,6 +357,7 @@ def ==(o) 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 && @@ -363,7 +373,7 @@ def eql?(o) # 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, standard, sdgs, tagline, technology_type].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].hash end # Builds the object from hash diff --git a/lib/patch_ruby/version.rb b/lib/patch_ruby/version.rb index bd1ccef..2336129 100644 --- a/lib/patch_ruby/version.rb +++ b/lib/patch_ruby/version.rb @@ -11,5 +11,5 @@ =end module Patch - VERSION = '1.15.0' + VERSION = '1.15.1' end diff --git a/spec/integration/projects_spec.rb b/spec/integration/projects_spec.rb index 8729140..d43f85e 100644 --- a/spec/integration/projects_spec.rb +++ b/spec/integration/projects_spec.rb @@ -49,7 +49,6 @@ expect(project.average_price_per_tonne_cents_usd) .to be_an_instance_of(Integer) expect(project.remaining_mass_g).to be_an_instance_of(Integer) - expect(project.state).to be_an_instance_of(String) expect(project.longitude).to be_an_instance_of(Float) expect(project.latitude).to be_an_instance_of(Float)