-
Notifications
You must be signed in to change notification settings - Fork 2
API version 2.1.0 See https://docs.patch.io/#/changelog for changes #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,10 @@ class CreateOrderLineItemRequest | |
|
|
||
| attr_accessor :vintage_year | ||
|
|
||
| attr_accessor :vintage_start_year | ||
|
|
||
| attr_accessor :vintage_end_year | ||
|
|
||
| attr_accessor :price | ||
|
|
||
| attr_accessor :currency | ||
|
|
@@ -54,6 +58,8 @@ def self.attribute_map | |
| { | ||
| :'project_id' => :'project_id', | ||
| :'vintage_year' => :'vintage_year', | ||
| :'vintage_start_year' => :'vintage_start_year', | ||
| :'vintage_end_year' => :'vintage_end_year', | ||
| :'price' => :'price', | ||
| :'currency' => :'currency', | ||
| :'amount' => :'amount', | ||
|
|
@@ -71,6 +77,8 @@ def self.openapi_types | |
| { | ||
| :'project_id' => :'String', | ||
| :'vintage_year' => :'Integer', | ||
| :'vintage_start_year' => :'Integer', | ||
| :'vintage_end_year' => :'Integer', | ||
| :'price' => :'Integer', | ||
| :'currency' => :'String', | ||
| :'amount' => :'Integer', | ||
|
|
@@ -82,6 +90,8 @@ def self.openapi_types | |
| def self.openapi_nullable | ||
| Set.new([ | ||
| :'vintage_year', | ||
| :'vintage_start_year', | ||
| :'vintage_end_year', | ||
| :'price', | ||
| :'currency', | ||
| :'amount', | ||
|
|
@@ -124,6 +134,14 @@ def initialize(attributes = {}) | |
| self.vintage_year = attributes[:'vintage_year'] | ||
| end | ||
|
|
||
| if attributes.key?(:'vintage_start_year') | ||
| self.vintage_start_year = attributes[:'vintage_start_year'] | ||
| end | ||
|
|
||
| if attributes.key?(:'vintage_end_year') | ||
| self.vintage_end_year = attributes[:'vintage_end_year'] | ||
| end | ||
|
|
||
| if attributes.key?(:'price') | ||
| self.price = attributes[:'price'] | ||
| end | ||
|
|
@@ -153,12 +171,28 @@ def list_invalid_properties | |
| invalid_properties.push('invalid value for "vintage_year", must be greater than or equal to 1900.') | ||
| end | ||
|
|
||
| if !@vintage_start_year.nil? && @vintage_start_year > 2100 | ||
| invalid_properties.push('invalid value for "vintage_start_year", must be smaller than or equal to 2100.') | ||
| end | ||
|
|
||
| if !@vintage_start_year.nil? && @vintage_start_year < 1900 | ||
| invalid_properties.push('invalid value for "vintage_start_year", must be greater than or equal to 1900.') | ||
| end | ||
|
|
||
| if !@vintage_end_year.nil? && @vintage_end_year > 2100 | ||
| invalid_properties.push('invalid value for "vintage_end_year", must be smaller than or equal to 2100.') | ||
| end | ||
|
|
||
| if !@vintage_end_year.nil? && @vintage_end_year < 1900 | ||
| invalid_properties.push('invalid value for "vintage_end_year", must be greater than or equal to 1900.') | ||
| end | ||
|
|
||
| if [email protected]? && @price < 2 | ||
| invalid_properties.push('invalid value for "price", must be greater than or equal to 2.') | ||
| end | ||
|
|
||
| if [email protected]? && @amount > 100000000000 | ||
| invalid_properties.push('invalid value for "amount", must be smaller than or equal to 100000000000.') | ||
| if [email protected]? && @amount > 100000000000000 | ||
| invalid_properties.push('invalid value for "amount", must be smaller than or equal to 100000000000000.') | ||
| end | ||
|
|
||
| if [email protected]? && @amount < 0 | ||
|
|
@@ -173,8 +207,12 @@ def list_invalid_properties | |
| def valid? | ||
| return false if !@vintage_year.nil? && @vintage_year > 2100 | ||
| return false if !@vintage_year.nil? && @vintage_year < 1900 | ||
| return false if !@vintage_start_year.nil? && @vintage_start_year > 2100 | ||
| return false if !@vintage_start_year.nil? && @vintage_start_year < 1900 | ||
| return false if !@vintage_end_year.nil? && @vintage_end_year > 2100 | ||
| return false if !@vintage_end_year.nil? && @vintage_end_year < 1900 | ||
| return false if [email protected]? && @price < 2 | ||
| return false if [email protected]? && @amount > 100000000000 | ||
| return false if [email protected]? && @amount > 100000000000000 | ||
| return false if [email protected]? && @amount < 0 | ||
| unit_validator = EnumAttributeValidator.new('String', ["g", "Wh"]) | ||
| return false unless unit_validator.valid?(@unit) | ||
|
|
@@ -195,6 +233,34 @@ def vintage_year=(vintage_year) | |
| @vintage_year = vintage_year | ||
| end | ||
|
|
||
| # Custom attribute writer method with validation | ||
| # @param [Object] vintage_start_year Value to be assigned | ||
| def vintage_start_year=(vintage_start_year) | ||
| if !vintage_start_year.nil? && vintage_start_year > 2100 | ||
| fail ArgumentError, 'invalid value for "vintage_start_year", must be smaller than or equal to 2100.' | ||
| end | ||
|
|
||
| if !vintage_start_year.nil? && vintage_start_year < 1900 | ||
| fail ArgumentError, 'invalid value for "vintage_start_year", must be greater than or equal to 1900.' | ||
| end | ||
|
|
||
| @vintage_start_year = vintage_start_year | ||
| end | ||
|
|
||
| # Custom attribute writer method with validation | ||
| # @param [Object] vintage_end_year Value to be assigned | ||
| def vintage_end_year=(vintage_end_year) | ||
| if !vintage_end_year.nil? && vintage_end_year > 2100 | ||
| fail ArgumentError, 'invalid value for "vintage_end_year", must be smaller than or equal to 2100.' | ||
| end | ||
|
|
||
| if !vintage_end_year.nil? && vintage_end_year < 1900 | ||
| fail ArgumentError, 'invalid value for "vintage_end_year", must be greater than or equal to 1900.' | ||
| end | ||
|
|
||
| @vintage_end_year = vintage_end_year | ||
| end | ||
|
|
||
| # Custom attribute writer method with validation | ||
| # @param [Object] price Value to be assigned | ||
| def price=(price) | ||
|
|
@@ -208,8 +274,8 @@ def price=(price) | |
| # Custom attribute writer method with validation | ||
| # @param [Object] amount Value to be assigned | ||
| def amount=(amount) | ||
| if !amount.nil? && amount > 100000000000 | ||
| fail ArgumentError, 'invalid value for "amount", must be smaller than or equal to 100000000000.' | ||
| if !amount.nil? && amount > 100000000000000 | ||
| fail ArgumentError, 'invalid value for "amount", must be smaller than or equal to 100000000000000.' | ||
| end | ||
|
|
||
| if !amount.nil? && amount < 0 | ||
|
|
@@ -236,6 +302,8 @@ def ==(o) | |
| self.class == o.class && | ||
| project_id == o.project_id && | ||
| vintage_year == o.vintage_year && | ||
| vintage_start_year == o.vintage_start_year && | ||
| vintage_end_year == o.vintage_end_year && | ||
| price == o.price && | ||
| currency == o.currency && | ||
| amount == o.amount && | ||
|
|
@@ -251,7 +319,7 @@ def eql?(o) | |
| # Calculates hash code according to all attributes. | ||
| # @return [Integer] Hash code | ||
| def hash | ||
| [project_id, vintage_year, price, currency, amount, unit].hash | ||
| [project_id, vintage_year, vintage_start_year, vintage_end_year, price, currency, amount, unit].hash | ||
| end | ||
|
|
||
| # Builds the object from hash | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that there doesn't seem to be a related change in the code. Is it just behind the scenes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's in relation to https://github.com/patch-technology/patch/pull/5588. @holtbp merged his change that fixes the integration tests and we spoke offline on updating the docs