-
Notifications
You must be signed in to change notification settings - Fork 8
Update attribute ranges (#95) #150
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
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,16 +20,14 @@ class DocumentRow < Fortnox::API::Types::Model | |
| attribute :cost_center, Types::Nullable::String | ||
|
|
||
| # DeliveredQuantity Delivered quantity. 14 digits | ||
| attribute :delivered_quantity, Types::Sized::Float[-9_999_999_999_999.9, 9_999_999_999_999.9] | ||
| attribute :delivered_quantity, Types::Sized::Float[-999_999.9, 999_999.9] | ||
|
|
||
| # Description Description Row description. 50 characters | ||
| attribute :description, Types::Sized::String[50] | ||
|
|
||
| # Discount amount. 12 digits (for amount) / 5 digits (for percent) | ||
| # TODO(hannes): Verify that we can send in more than 5 digits through | ||
| # the actual API for DiscountType PERCENT. This cannot be done until | ||
| # we fix issue #62... | ||
| attribute :discount, Types::Sized::Float[0.0, 99_999_999_999.9] | ||
| # TODO: Should be [-100.0, 100.0] for DiscountType PERCENT. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for updating the TODO 😄 |
||
| attribute :discount, Types::Sized::Float[-9_999_999_999.9, 9_999_999_999.9] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure about this as well? The maximum value is one digit less than before. |
||
|
|
||
| # DiscountType The type of discount used for the row. | ||
| attribute :discount_type, Types::DiscountType | ||
|
|
@@ -45,7 +43,7 @@ class DocumentRow < Fortnox::API::Types::Model | |
| attribute :housework_type, Types::HouseworkType | ||
|
|
||
| # Price Price per unit. 12 digits | ||
| attribute :price, Types::Sized::Float[0.0, 99_999_999_999.9] | ||
| attribute :price, Types::Sized::Float[-9_999_999_999.9, 9_999_999_999.9] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure about this as well? The maximum value is one digit less than before. |
||
|
|
||
| # Project Code of the project for the row. | ||
| attribute :project, Types::Nullable::String | ||
|
|
||
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.
Are you sure about this? The documentation says
float, 14 digits...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.
This is what I got when posting data to the API:
I tried the old value at first, but that was too big:
So the limit should apparently be
999_999_999_999.0999_999_999_999.1is not allowed:About the lower limit:
and
So the lower limit should be
-999_999_999_999.0