Class: Parse::Product

Inherits:
Object show all
Defined in:
lib/parse/model/classes/product.rb

Overview

This class represents the data and columns contained in the standard Parse `_Product` collection. These records are usually used when implementing in-app purchases in mobile applications.

The default schema for Product is as follows:

class Parse::Product < Parse::Object
   # See Parse::Object for inherited properties...

   property :download, :file
   property :icon,     :file,    required: true
   property :order,    :integer, required: true
   property :subtitle,           required: true
   property :title,              required: true
   property :product_identifier, required: true

end

See Also:

Constant Summary

Constants included from Properties

Parse::Properties::BASE, Parse::Properties::BASE_FIELD_MAP, Parse::Properties::BASE_KEYS, Parse::Properties::CORE_FIELDS, Parse::Properties::DELETE_OP, Parse::Properties::TYPES

Constants inherited from Pointer

Parse::Pointer::ATTRIBUTES

Constants inherited from Model

Model::CLASS_INSTALLATION, Model::CLASS_PRODUCT, Model::CLASS_ROLE, Model::CLASS_SESSION, Model::CLASS_USER, Model::ID, Model::KEY_CLASS_NAME, Model::KEY_CREATED_AT, Model::KEY_OBJECT_ID, Model::KEY_UPDATED_AT, Model::OBJECT_ID, Model::TYPE_ACL, Model::TYPE_BYTES, Model::TYPE_DATE, Model::TYPE_FIELD, Model::TYPE_FILE, Model::TYPE_GEOPOINT, Model::TYPE_NUMBER, Model::TYPE_OBJECT, Model::TYPE_POINTER, Model::TYPE_RELATION

Instance Attribute Summary collapse

Attributes inherited from Object

#acl, #created_at, #id, #updated_at

Attributes inherited from Pointer

#id, #parse_class

Method Summary

Methods inherited from Object

#[], #[]=, #__type, #after_create, #after_destroy, #after_save, #apply_defaults!, #as_json, #before_create, #before_destroy, #before_save, build, #clear_attribute_change!, #clear_changes!, #existed?, #initialize, #new?, #parse_class, #persisted?, pointer, #pretty, #reload!, #rollback!, #schema, set_default_acl, #twin, #updates, #validate!, webhook, webhook_function

Methods included from Core::Querying

#all, #count, #distinct, #each, #find, #first, #literal_where, #newest, #oldest, #query, #scope

Methods included from Core::Schema

#auto_upgrade!, #create_schema, #fetch_schema, #schema, #update_schema

Methods included from Core::Actions

#change_requests, #changes_applied!, #changes_payload, #create, #destroy, #destroy_request, #op_add!, #op_add_relation!, #op_add_unique!, #op_destroy!, #op_increment!, #op_remove!, #op_remove_relation!, #operate_field!, #prepare_save!, #relation_change_operations, #save, #save!, #set_attributes!, #update, #update!, #update_relations, #uri_path

Methods included from Core::Fetching

#autofetch!, #fetch, #fetch!

Methods included from Associations::HasMany

has_many, #relation_changes?, #relation_updates, #relations

Methods included from Associations::BelongsTo

belongs_to, #key?

Methods included from Associations::HasOne

has_one

Methods included from Properties

#apply_attributes!, #attribute_changes?, #attribute_updates, #attributes, #attributes=, #field_map, #fields, #format_operation, #format_value

Methods inherited from Pointer

#==, #[], #[]=, #__type, #attributes, #className, #fetch, #fetched?, #hash, #initialize, #json_hash, #pointer, #pointer?, #present?, #sig

Methods inherited from Model

find_class

Methods included from Client::Connectable

#client

Constructor Details

This class inherits a constructor from Parse::Object

Instance Attribute Details

#downloadString

Returns the file payload for this product download.

Returns:

  • (String)

    the file payload for this product download.



28
# File 'lib/parse/model/classes/product.rb', line 28

property :download, :file

#download_nameString

Returns the name of this download.

Returns:

  • (String)

    the name of this download.



32
# File 'lib/parse/model/classes/product.rb', line 32

property :download_name

#iconString

An icon file representing this download. This field is required by Parse.

Returns:



37
# File 'lib/parse/model/classes/product.rb', line 37

property :icon, :file, required: true

#orderString

The product order number. This field is required by Parse.

Returns:



42
# File 'lib/parse/model/classes/product.rb', line 42

property :order, :integer, required: true

#product_identifierString

The product identifier. This field is required by Parse.

Returns:



47
# File 'lib/parse/model/classes/product.rb', line 47

property :product_identifier, required: true

#subtitleString

The subtitle description for this product. This field is required by Parse.

Returns:



52
# File 'lib/parse/model/classes/product.rb', line 52

property :subtitle, required: true

#titleString

The title for this product. This field is required by Parse.

Returns:

  • (String)

    the title for this product.



57
# File 'lib/parse/model/classes/product.rb', line 57

property :title, required: true