Class: SfCli::Sf::Sobject::Schema::Field
- Inherits:
-
Object
- Object
- SfCli::Sf::Sobject::Schema::Field
- Defined in:
- lib/sf_cli/sf/sobject/schema.rb
Constant Summary collapse
- PicklistValue =
Data.define(:active, :default_value, :label, :valid_for, :value)
Instance Method Summary collapse
- #aggregatable? ⇒ Boolean
- #ai_prediction_field? ⇒ Boolean
- #autoNumber? ⇒ Boolean
- #byteLength ⇒ Object
- #calculated? ⇒ Boolean
- #calculated_formula ⇒ Object
- #cascade_delete? ⇒ Boolean
- #case_sensitive ⇒ Object
- #compound_field_name ⇒ Object
- #controller_name ⇒ Object
- #createable? ⇒ Boolean
- #custom? ⇒ Boolean
- #default_value ⇒ Object
- #default_value_formula ⇒ Object
- #defaulted_on_create? ⇒ Boolean
- #dependent_picklist? ⇒ Boolean
- #deprecated_and_hidden? ⇒ Boolean
- #digits ⇒ Object
- #display_location_in_decimal? ⇒ Boolean
- #encrypted? ⇒ Boolean
- #external_id? ⇒ Boolean
- #extra_type_info ⇒ Object
- #filterable? ⇒ Boolean
- #filtered_lookup_info ⇒ Object
- #formula_treat_null_number_as_zero? ⇒ Boolean
- #groupable? ⇒ Boolean
- #high_scale_number? ⇒ Boolean
- #html_formatted? ⇒ Boolean
- #id_lookup? ⇒ Boolean
-
#initialize(field) ⇒ Field
constructor
A new instance of Field.
- #inline_help_text ⇒ Object
- #label ⇒ Object
- #length ⇒ Object
- #mask ⇒ Object
- #mask_type ⇒ Object
- #name ⇒ Object
- #name_field? ⇒ Boolean
- #name_pointing? ⇒ Boolean
- #nillable? ⇒ Boolean
- #permissionable? ⇒ Boolean
- #picklist_values ⇒ Object
- #polymorphic_foreign_key? ⇒ Boolean
- #precision ⇒ Object
- #query_by_distance? ⇒ Boolean
- #reference_target_field ⇒ Object
- #reference_to ⇒ Object
- #relationship_name ⇒ Object
- #relationship_order ⇒ Object
- #restricted_delete ⇒ Object
- #restricted_picklist? ⇒ Boolean
- #scale ⇒ Object
- #search_prefilterable? ⇒ Boolean
- #soapType ⇒ Object
- #sortable? ⇒ Boolean
- #to_h ⇒ Object
- #type ⇒ Object
- #unique? ⇒ Boolean
- #updateable? ⇒ Boolean
- #write_Requires_Master_Read? ⇒ Boolean
Constructor Details
#initialize(field) ⇒ Field
Returns a new instance of Field.
289 290 291 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 289 def initialize(field) @field = field end |
Instance Method Details
#aggregatable? ⇒ Boolean
293 294 295 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 293 def aggregatable? field["aggregatable"] end |
#ai_prediction_field? ⇒ Boolean
297 298 299 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 297 def ai_prediction_field? field["aiPredictionField"] end |
#autoNumber? ⇒ Boolean
301 302 303 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 301 def autoNumber? field["autoNumber"] end |
#byteLength ⇒ Object
305 306 307 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 305 def byteLength field["byteLength"] end |
#calculated? ⇒ Boolean
309 310 311 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 309 def calculated? field["calculated"] end |
#calculated_formula ⇒ Object
313 314 315 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 313 def calculated_formula field["calculatedFormula"] end |
#cascade_delete? ⇒ Boolean
317 318 319 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 317 def cascade_delete? field["cascadeDelete"] end |
#case_sensitive ⇒ Object
321 322 323 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 321 def case_sensitive field["caseSensitive"] end |
#compound_field_name ⇒ Object
325 326 327 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 325 def compound_field_name field["compoundFieldName"] end |
#controller_name ⇒ Object
329 330 331 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 329 def controller_name field["controllerName"] end |
#createable? ⇒ Boolean
333 334 335 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 333 def createable? field["createable"] end |
#custom? ⇒ Boolean
337 338 339 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 337 def custom? field["custom"] end |
#default_value ⇒ Object
341 342 343 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 341 def default_value field["defaultValue"] end |
#default_value_formula ⇒ Object
345 346 347 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 345 def default_value_formula field["defaultValueFormula"] end |
#defaulted_on_create? ⇒ Boolean
349 350 351 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 349 def defaulted_on_create? field["defaultedOnCreate"] end |
#dependent_picklist? ⇒ Boolean
353 354 355 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 353 def dependent_picklist? field["dependentPicklist"] end |
#deprecated_and_hidden? ⇒ Boolean
357 358 359 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 357 def deprecated_and_hidden? field["deprecatedAndHidden"] end |
#digits ⇒ Object
361 362 363 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 361 def digits field["digits"] end |
#display_location_in_decimal? ⇒ Boolean
365 366 367 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 365 def display_location_in_decimal? field["displayLocationInDecimal"] end |
#encrypted? ⇒ Boolean
369 370 371 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 369 def encrypted? field["encrypted"] end |
#external_id? ⇒ Boolean
373 374 375 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 373 def external_id? field["externalId"] end |
#extra_type_info ⇒ Object
377 378 379 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 377 def extra_type_info field["extraTypeInfo"] end |
#filterable? ⇒ Boolean
381 382 383 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 381 def filterable? field["filterable"] end |
#filtered_lookup_info ⇒ Object
385 386 387 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 385 def filtered_lookup_info field["filteredLookupInfo"] end |
#formula_treat_null_number_as_zero? ⇒ Boolean
389 390 391 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 389 def formula_treat_null_number_as_zero? field["formulaTreatNullNumberAsZero"] end |
#groupable? ⇒ Boolean
393 394 395 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 393 def groupable? field["groupable"] end |
#high_scale_number? ⇒ Boolean
397 398 399 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 397 def high_scale_number? field["highScaleNumber"] end |
#html_formatted? ⇒ Boolean
401 402 403 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 401 def html_formatted? field["htmlFormatted"] end |
#id_lookup? ⇒ Boolean
405 406 407 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 405 def id_lookup? field["idLookup"] end |
#inline_help_text ⇒ Object
409 410 411 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 409 def inline_help_text field["inlineHelpText"] end |
#label ⇒ Object
413 414 415 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 413 def label field["label"] end |
#length ⇒ Object
417 418 419 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 417 def length field["length"] end |
#mask ⇒ Object
421 422 423 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 421 def mask field["mask"] end |
#mask_type ⇒ Object
425 426 427 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 425 def mask_type field["maskType"] end |
#name ⇒ Object
429 430 431 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 429 def name field["name"] end |
#name_field? ⇒ Boolean
433 434 435 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 433 def name_field? field["nameField"] end |
#name_pointing? ⇒ Boolean
437 438 439 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 437 def name_pointing? field["namePointing"] end |
#nillable? ⇒ Boolean
441 442 443 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 441 def nillable? field["nillable"] end |
#permissionable? ⇒ Boolean
445 446 447 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 445 def field["permissionable"] end |
#picklist_values ⇒ Object
451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 451 def picklist_values field["picklistValues"].map do |value| PicklistValue.new( active: value['active'], default_value: value['defaultValue'], label: value['label'], valid_for: value['validFor'], value: value['value'], ) end end |
#polymorphic_foreign_key? ⇒ Boolean
463 464 465 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 463 def polymorphic_foreign_key? field["polymorphicForeignKey"] end |
#precision ⇒ Object
467 468 469 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 467 def precision field["precision"] end |
#query_by_distance? ⇒ Boolean
471 472 473 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 471 def query_by_distance? field["queryByDistance"] end |
#reference_target_field ⇒ Object
475 476 477 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 475 def reference_target_field field["referenceTargetField"] end |
#reference_to ⇒ Object
479 480 481 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 479 def reference_to field["referenceTo"] end |
#relationship_name ⇒ Object
483 484 485 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 483 def relationship_name field["relationshipName"] end |
#relationship_order ⇒ Object
487 488 489 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 487 def relationship_order field["relationshipOrder"] end |
#restricted_delete ⇒ Object
491 492 493 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 491 def restricted_delete field["restrictedDelete"] end |
#restricted_picklist? ⇒ Boolean
495 496 497 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 495 def restricted_picklist? field["restrictedPicklist"] end |
#scale ⇒ Object
499 500 501 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 499 def scale field["scale"] end |
#search_prefilterable? ⇒ Boolean
503 504 505 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 503 def search_prefilterable? field["searchPrefilterable"] end |
#soapType ⇒ Object
507 508 509 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 507 def soapType field["soapType"] end |
#sortable? ⇒ Boolean
511 512 513 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 511 def sortable? field["sortable"] end |
#to_h ⇒ Object
531 532 533 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 531 def to_h field end |
#type ⇒ Object
515 516 517 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 515 def type field["type"] end |
#unique? ⇒ Boolean
519 520 521 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 519 def unique? field["unique"] end |
#updateable? ⇒ Boolean
523 524 525 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 523 def updateable? field["updateable"] end |
#write_Requires_Master_Read? ⇒ Boolean
527 528 529 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 527 def write_Requires_Master_Read? field["writeRequiresMasterRead"] end |