Class: Zendesk2::Brand

Inherits:
Object
  • Object
show all
Extended by:
Attributes
Includes:
Model
Defined in:
lib/zendesk2/brand.rb

Instance Attribute Summary

Attributes included from Model

#errors

Instance Method Summary collapse

Methods included from Attributes

assoc_accessor, assoc_reader, assoc_writer

Methods included from Model

#destroy, #destroyed?, #missing_attributes, #save, #update!

Instance Method Details

#activeBoolean

Returns If the brand is set as active.

Returns:

  • (Boolean)

    If the brand is set as active



21
# File 'lib/zendesk2/brand.rb', line 21

attribute :active, type: :boolean

#brand_urlString

Returns The url of the brand.

Returns:

  • (String)

    The url of the brand



15
# File 'lib/zendesk2/brand.rb', line 15

attribute :brand_url, type: :string

#created_atDate

Returns The time the brand was created.

Returns:

  • (Date)

    The time the brand was created



29
# File 'lib/zendesk2/brand.rb', line 29

attribute :created_at, type: :date

#defaultBoolean

Returns Is the brand the default brand for this account.

Returns:

  • (Boolean)

    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_centerBoolean

Returns If the brand has a Help Center.

Returns:

  • (Boolean)

    If the brand has a Help Center



17
# File 'lib/zendesk2/brand.rb', line 17

attribute :has_help_center, type: :boolean

#help_center_stateString

Returns The state of the Help Center: enabled, disabled, or restricted.

Returns:

  • (String)

    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_mappingString

Returns The hostmapping to this brand, if any (only admins view this key).

Returns:

  • (String)

    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

#idinteger

Returns Automatically assigned upon creation.

Returns:

  • (integer)

    Automatically assigned upon creation



8
# File 'lib/zendesk2/brand.rb', line 8

identity :id, type: :integer

#logoAttachment

Returns Logo image for this brand.

Returns:

  • (Attachment)

    Logo image for this brand



25
# File 'lib/zendesk2/brand.rb', line 25

attribute :logo, type: :Attachment

#nameString

Returns The name of the brand.

Returns:

  • (String)

    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_templateString

Returns The signature template for a brand.

Returns:

  • (String)

    The signature template for a brand



37
# File 'lib/zendesk2/brand.rb', line 37

attribute :signature_template, type: :string

#subdomainString

Returns The subdomain of the brand.

Returns:

  • (String)

    The subdomain of the brand



33
# File 'lib/zendesk2/brand.rb', line 33

attribute :subdomain, type: :string

#ticket_form_idsArray

Returns The ids of ticket forms that are available for use by a brand.

Returns:

  • (Array)

    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_atDate

Returns The time of the last update of the brand.

Returns:

  • (Date)

    The time of the last update of the brand



31
# File 'lib/zendesk2/brand.rb', line 31

attribute :updated_at, type: :date

#urlString

Returns The API url of this brand.

Returns:

  • (String)

    The API url of this brand



11
# File 'lib/zendesk2/brand.rb', line 11

attribute :url, type: :string