Class: IronBank::Describe::ExcludedFields
- Inherits:
-
Object
- Object
- IronBank::Describe::ExcludedFields
- Extended by:
- Forwardable
- Defined in:
- lib/iron_bank/describe/excluded_fields.rb
Overview
Returns an array of non-queryable fields for the given object in the current Zuora tenant, despites Zuora clearly marking these fields as ‘<selectable>true</true>` in their Describe API… /rant
Constant Summary collapse
- FAULT_FIELD_MESSAGES =
Regexp.union( # Generic fault field /invalid field for query: \w+\.(\w+)/, # Invoice Bill Run is not selectable in ZOQL /Cannot use the (BillRunId) field in the select clause/, # Invoice Body, implemented as a separate call /Can only query one invoice (body) at a time/, # Catalog tier should only query the price field /use Price or (DiscountAmount) or (DiscountPercentage)/, # Catalog plan currencies, implemented as a separate call /When querying for (active currencies)/, # Catalog charge rollover balance /You can only query (RolloverBalance) in particular/, # (Subscription) charge should only query the price field %r{ (OveragePrice), \ Price, \ (IncludedUnits), \ (DiscountAmount) \ or\ (DiscountPercentage) }x ).freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(object_name:) ⇒ Object
37 38 39 |
# File 'lib/iron_bank/describe/excluded_fields.rb', line 37 def self.call(object_name:) new(object_name).call end |
Instance Method Details
#call ⇒ Object
41 42 43 44 45 |
# File 'lib/iron_bank/describe/excluded_fields.rb', line 41 def call remove_last_failure_fields until valid_query? (excluded_fields - single_resource_query_fields).sort end |