Class: Zendesk2::Brand
- Inherits:
-
Object
- Object
- Zendesk2::Brand
- Extended by:
- Attributes
- Includes:
- Model
- Defined in:
- lib/zendesk2/brand.rb
Instance Attribute Summary
Attributes included from Model
Instance Method Summary collapse
-
#active ⇒ Boolean
If the brand is set as active.
-
#brand_url ⇒ String
The url of the brand.
-
#created_at ⇒ Date
The time the brand was created.
-
#default ⇒ Boolean
Is the brand the default brand for this account.
- #destroy! ⇒ Object
-
#has_help_center ⇒ Boolean
If the brand has a Help Center.
-
#help_center_state ⇒ String
The state of the Help Center: enabled, disabled, or restricted.
-
#host_mapping ⇒ String
The hostmapping to this brand, if any (only admins view this key).
-
#id ⇒ integer
Automatically assigned upon creation.
-
#logo ⇒ Attachment
Logo image for this brand.
-
#name ⇒ String
The name of the brand.
- #save! ⇒ Object
-
#signature_template ⇒ String
The signature template for a brand.
-
#subdomain ⇒ String
The subdomain of the brand.
-
#ticket_form_ids ⇒ Array
The ids of ticket forms that are available for use by a brand.
-
#updated_at ⇒ Date
The time of the last update of the brand.
-
#url ⇒ String
The API url of this brand.
Methods included from Attributes
assoc_accessor, assoc_reader, assoc_writer
Methods included from Model
#destroy, #destroyed?, #missing_attributes, #save, #update!
Instance Method Details
#active ⇒ Boolean
Returns If the brand is set as active.
21 |
# File 'lib/zendesk2/brand.rb', line 21 attribute :active, type: :boolean |
#brand_url ⇒ String
Returns The url of the brand.
15 |
# File 'lib/zendesk2/brand.rb', line 15 attribute :brand_url, type: :string |
#created_at ⇒ Date
Returns The time the brand was created.
29 |
# File 'lib/zendesk2/brand.rb', line 29 attribute :created_at, type: :date |
#default ⇒ Boolean
Returns Is the brand the default brand for this account.
23 |
# File 'lib/zendesk2/brand.rb', line 23 attribute :default, type: :boolean |
#destroy! ⇒ Object
53 54 55 56 57 |
# File 'lib/zendesk2/brand.rb', line 53 def destroy! requires :identity cistern.destroy_brand('brand' => { 'id' => identity }) end |
#has_help_center ⇒ Boolean
Returns If the brand has a Help Center.
17 |
# File 'lib/zendesk2/brand.rb', line 17 attribute :has_help_center, type: :boolean |
#help_center_state ⇒ String
Returns The state of the Help Center: enabled, disabled, or restricted.
19 |
# File 'lib/zendesk2/brand.rb', line 19 attribute :help_center_state, type: :string |
#host_mapping ⇒ String
Returns The hostmapping to this brand, if any (only admins view this key).
35 |
# File 'lib/zendesk2/brand.rb', line 35 attribute :host_mapping, type: :string |
#id ⇒ integer
Returns Automatically assigned upon creation.
8 |
# File 'lib/zendesk2/brand.rb', line 8 identity :id, type: :integer |
#logo ⇒ Attachment
Returns Logo image for this brand.
25 |
# File 'lib/zendesk2/brand.rb', line 25 attribute :logo, type: :Attachment |
#name ⇒ String
Returns The name of the brand.
13 |
# File 'lib/zendesk2/brand.rb', line 13 attribute :name, type: :string |
#save! ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/zendesk2/brand.rb', line 39 def save! data = if new_record? requires :name cistern.create_brand('brand' => attributes) else requires :identity cistern.update_brand('brand' => attributes) end.body['brand'] merge_attributes(data) end |
#signature_template ⇒ String
Returns The signature template for a brand.
37 |
# File 'lib/zendesk2/brand.rb', line 37 attribute :signature_template, type: :string |
#subdomain ⇒ String
Returns The subdomain of the brand.
33 |
# File 'lib/zendesk2/brand.rb', line 33 attribute :subdomain, type: :string |
#ticket_form_ids ⇒ Array
Returns The ids of ticket forms that are available for use by a brand.
27 |
# File 'lib/zendesk2/brand.rb', line 27 attribute :ticket_form_ids, type: :array |
#updated_at ⇒ Date
Returns The time of the last update of the brand.
31 |
# File 'lib/zendesk2/brand.rb', line 31 attribute :updated_at, type: :date |
#url ⇒ String
Returns The API url of this brand.
11 |
# File 'lib/zendesk2/brand.rb', line 11 attribute :url, type: :string |