Skip to content

Commit

Permalink
Merge pull request #287 from XeroAPI/xero-ruby-9.0.0
Browse files Browse the repository at this point in the history
add ultimate subplans
  • Loading branch information
manishT72 authored Jul 15, 2024
2 parents bcdff41 + d580ca4 commit f7d606d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4077,7 +4077,7 @@
"Class" : {
"type" : "string",
"description" : "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)",
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "IGNITE", "GROW", "COMPREHENSIVE" ]
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE" ]
},
"Edition" : {
"type" : "string",
Expand Down
8 changes: 6 additions & 2 deletions lib/xero-ruby/models/accounting/organisation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ class Organisation
NON_GST_CASHBOOK ||= "NON_GST_CASHBOOK".freeze
ULTIMATE ||= "ULTIMATE".freeze
LITE ||= "LITE".freeze
ULTIMATE_10 ||= "ULTIMATE_10".freeze
ULTIMATE_20 ||= "ULTIMATE_20".freeze
ULTIMATE_50 ||= "ULTIMATE_50".freeze
ULTIMATE_100 ||= "ULTIMATE_100".freeze
IGNITE ||= "IGNITE".freeze
GROW ||= "GROW".freeze
COMPREHENSIVE ||= "COMPREHENSIVE".freeze
Expand Down Expand Up @@ -466,7 +470,7 @@ def valid?
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
organisation_entity_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "IGNITE", "GROW", "COMPREHENSIVE"])
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE"])
return false unless _class_validator.valid?(@_class)
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
return false unless edition_validator.valid?(@edition)
Expand Down Expand Up @@ -526,7 +530,7 @@ def organisation_entity_type=(organisation_entity_type)
# Custom attribute writer method checking allowed values (enum).
# @param [Object] _class Object to be assigned
def _class=(_class)
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "IGNITE", "GROW", "COMPREHENSIVE"])
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE"])
unless validator.valid?(_class)
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
end
Expand Down

0 comments on commit f7d606d

Please sign in to comment.