CatalogObject

April 22, 2020 · View on GitHub

Description

The wrapper object for object types in the Catalog data model. The type of a particular CatalogObject is determined by the value of type and only the corresponding data field may be set. - if type = ITEM, only item_data will be populated and it will contain a valid CatalogItem object. - if type = ITEM_VARIATION, only item_variation_data will be populated and it will contain a valid CatalogItemVariation object. - if type = MODIFIER, only modifier_data will be populated and it will contain a valid CatalogModifier object. - if type = MODIFIER_LIST, only modifier_list_data will be populated and it will contain a valid CatalogModifierList object. - if type = CATEGORY, only category_data will be populated and it will contain a valid CatalogCategory object. - if type = DISCOUNT, only discount_data will be populated and it will contain a valid CatalogDiscount object. - if type = TAX, only tax_data will be populated and it will contain a valid CatalogTax object. - if type = IMAGE, only image_data will be populated and it will contain a valid CatalogImage object. - if type = QUICK_AMOUNTS_SETTINGS, only quick_amounts_settings_data will be populated and will contain a valid CatalogQuickAmountsSettings object. For a more detailed discussion of the Catalog data model, please see the Design a Catalog guide.

Properties

NameGetterSetterTypeDescriptionNotes
typegetType()setType($value)stringThe type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See CatalogObjectType for possible values
idgetId()setId($value)stringAn identifier to reference this object in the catalog. When a new `CatalogObject` is inserted, the client should set the id to a temporary identifier starting with a "`#`" character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object. When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references.
updated_atgetUpdatedAt()setUpdatedAt($value)stringLast modification timestamp in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds.[optional]
versiongetVersion()setVersion($value)intThe version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.[optional]
is_deletedgetIsDeleted()setIsDeleted($value)boolIf `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time.[optional]
custom_attribute_valuesgetCustomAttributeValues()setCustomAttributeValues($value)map[string,\SquareConnect\Model\CatalogCustomAttributeValue]Application-defined key/value attributes that are set at a global (location-independent) level. Custom Attribute Values are intended to store additional information about a Catalog Object or associations with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). For CustomAttributesDefinitions defined by the app making the request, the map key is the key defined in the `CatalogCustomAttributeDefinition` (e.g. “reference_id”). For custom attributes created by other apps, the map key is the key defined in `CatalogCustomAttributeDefinition` prefixed with the application ID and a colon (eg. “abcd1234:reference_id”).[optional] [beta]
catalog_v1_idsgetCatalogV1Ids()setCatalogV1Ids($value)\SquareConnect\Model\CatalogV1Id[]The Connect v1 IDs for this object at each location where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs.[optional]
present_at_all_locationsgetPresentAtAllLocations()setPresentAtAllLocations($value)boolIf `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`.[optional]
present_at_location_idsgetPresentAtLocationIds()setPresentAtLocationIds($value)string[]A list of locations where the object is present, even if `present_at_all_locations` is `false`.[optional]
absent_at_location_idsgetAbsentAtLocationIds()setAbsentAtLocationIds($value)string[]A list of locations where the object is not present, even if `present_at_all_locations` is `true`.[optional]
image_idgetImageId()setImageId($value)stringIdentifies the `CatalogImage` attached to this `CatalogObject`.[optional]
item_datagetItemData()setItemData($value)\SquareConnect\Model\CatalogItemStructured data for a `CatalogItem`, set for CatalogObjects of type `ITEM`.[optional]
category_datagetCategoryData()setCategoryData($value)\SquareConnect\Model\CatalogCategoryStructured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`.[optional]
item_variation_datagetItemVariationData()setItemVariationData($value)\SquareConnect\Model\CatalogItemVariationStructured data for a `CatalogItemVariation`, set for CatalogObjects of type `ITEM_VARIATION`.[optional]
tax_datagetTaxData()setTaxData($value)\SquareConnect\Model\CatalogTaxStructured data for a `CatalogTax`, set for CatalogObjects of type `TAX`.[optional]
discount_datagetDiscountData()setDiscountData($value)\SquareConnect\Model\CatalogDiscountStructured data for a `CatalogDiscount`, set for CatalogObjects of type `DISCOUNT`.[optional]
modifier_list_datagetModifierListData()setModifierListData($value)\SquareConnect\Model\CatalogModifierListStructured data for a `CatalogModifierList`, set for CatalogObjects of type `MODIFIER_LIST`.[optional]
modifier_datagetModifierData()setModifierData($value)\SquareConnect\Model\CatalogModifierStructured data for a `CatalogModifier`, set for CatalogObjects of type `MODIFIER`.[optional]
time_period_datagetTimePeriodData()setTimePeriodData($value)\SquareConnect\Model\CatalogTimePeriodStructured data for a `CatalogTimePeriod`, set for CatalogObjects of type `TIME_PERIOD`.[optional]
product_set_datagetProductSetData()setProductSetData($value)\SquareConnect\Model\CatalogProductSetStructured data for a `CatalogProductSet`, set for CatalogObjects of type `PRODUCT_SET`.[optional]
pricing_rule_datagetPricingRuleData()setPricingRuleData($value)\SquareConnect\Model\CatalogPricingRuleStructured data for a `CatalogPricingRule`, set for CatalogObjects of type `PRICING_RULE`.[optional]
image_datagetImageData()setImageData($value)\SquareConnect\Model\CatalogImageStructured data for a `CatalogImage`, set for CatalogObjects of type `IMAGE`.[optional]
measurement_unit_datagetMeasurementUnitData()setMeasurementUnitData($value)\SquareConnect\Model\CatalogMeasurementUnitStructured data for a `CatalogMeasurementUnit`, set for CatalogObjects of type `MEASUREMENT_UNIT`.[optional]
item_option_datagetItemOptionData()setItemOptionData($value)\SquareConnect\Model\CatalogItemOptionStructured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`.[optional]
item_option_value_datagetItemOptionValueData()setItemOptionValueData($value)\SquareConnect\Model\CatalogItemOptionValueStructured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`.[optional]
custom_attribute_definition_datagetCustomAttributeDefinitionData()setCustomAttributeDefinitionData($value)\SquareConnect\Model\CatalogCustomAttributeDefinitionStructured data for a `CatalogCustomAttributeDefinition`, set for CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`.[optional]
quick_amounts_settings_datagetQuickAmountsSettingsData()setQuickAmountsSettingsData($value)\SquareConnect\Model\CatalogQuickAmountsSettingsStructured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`.[optional]

Note: All properties are protected and only accessed via getters and setters.

[Back to Model list] [Back to API list] [Back to README]