Class: MoxiworksPlatform::Brand

Inherits:
Resource
  • Object
show all
Defined in:
lib/moxiworks_platform/brand.rb

Overview

Moxi Works Platform Brand

Instance Attribute Summary collapse

Attributes inherited from Resource

#headers

Class Method Summary collapse

Methods inherited from Resource

accept_header, attr_accessor, attributes, #attributes, auth_header, check_for_error_in_response, content_type_header, #float_attrs, headers, #init_attrs_from_hash, #initialize, #int_attrs, #method_missing, #numeric_attrs, #numeric_value_for, #to_hash, underscore, underscore_array, underscore_attribute_names, underscore_hash, user_agent_header

Constructor Details

This class inherits a constructor from MoxiworksPlatform::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MoxiworksPlatform::Resource

Instance Attribute Details

#background_colorString

Returns:

  • (String)


18
19
20
# File 'lib/moxiworks_platform/brand.rb', line 18

def background_color
  @background_color
end

#background_font_color_primaryString

Returns:

  • (String)


23
24
25
# File 'lib/moxiworks_platform/brand.rb', line 23

def background_font_color_primary
  @background_font_color_primary
end

#button_background_colorString

Returns:

  • (String)


28
29
30
# File 'lib/moxiworks_platform/brand.rb', line 28

def button_background_color
  @button_background_color
end

#button_font_colorString

Returns:

  • (String)


33
34
35
# File 'lib/moxiworks_platform/brand.rb', line 33

def button_font_color
  @button_font_color
end

#cma_authoring_colorString

Returns:

  • (String)


13
14
15
# File 'lib/moxiworks_platform/brand.rb', line 13

def cma_authoring_color
  @cma_authoring_color
end

Returns:

  • (String)


38
39
40
# File 'lib/moxiworks_platform/brand.rb', line 38

def copyright
  @copyright
end

Returns:

  • (String)


38
# File 'lib/moxiworks_platform/brand.rb', line 38

attr_accessor :copyright

#display_nameString

Returns:

  • (String)


43
44
45
# File 'lib/moxiworks_platform/brand.rb', line 43

def display_name
  @display_name
end

#email_element_background_colorString

Returns:

  • (String)


48
49
50
# File 'lib/moxiworks_platform/brand.rb', line 48

def email_element_background_color
  @email_element_background_color
end

#HTML hexadecimal color code of a text color suitable for placement over $pres_block_background_color(hexadecimalcolorcodeofatextcolorsuitable) ⇒ String

Returns:

  • (String)


78
# File 'lib/moxiworks_platform/brand.rb', line 78

attr_accessor :pres_block_text_color

#HTML hexadecimal color code of the background color for buttons displayed(hexadecimalcolorcodeofthebackgroundcolor) ⇒ String

Returns:

  • (String)


28
# File 'lib/moxiworks_platform/brand.rb', line 28

attr_accessor :button_background_color

#HTML hexadecimal color code of the background color for the company(hexadecimalcolorcodeofthebackgroundcolor) ⇒ String

Returns:

  • (String)


18
# File 'lib/moxiworks_platform/brand.rb', line 18

attr_accessor :background_color

#HTML hexadecimal color code of the background color for the company used in block elements of the company's presentations(hexadecimalcolorcodeofthebackgroundcolor) ⇒ String

Returns:

  • (String)


73
# File 'lib/moxiworks_platform/brand.rb', line 73

attr_accessor :pres_block_background_color

#HTML hexadecimal color code of the background color of email elements for the company(hexadecimalcolorcodeofthebackgroundcolorofemailelements) ⇒ String

Returns:

  • (String)


48
# File 'lib/moxiworks_platform/brand.rb', line 48

attr_accessor :email_element_background_color

#HTML hexadecimal color code of the background font color for the company(hexadecimalcolorcodeofthebackgroundfontcolor) ⇒ String

Returns:

  • (String)


23
# File 'lib/moxiworks_platform/brand.rb', line 23

attr_accessor :background_font_color_primary

#HTML hexadecimal color code of the font color for buttons displayed(hexadecimalcolorcodeofthefontcolor) ⇒ String

Returns:

  • (String)


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

attr_accessor :button_font_color

#HTML hexadecimal color code of the presentation accent color for the company(hexadecimalcolorcodeofthepresentationaccentcolor) ⇒ String

Returns:

  • (String)


13
# File 'lib/moxiworks_platform/brand.rb', line 13

attr_accessor :cma_authoring_color

#HTML the display name for the company as to be presented to end users(thedisplayname) ⇒ String

Returns:

  • (String)


43
# File 'lib/moxiworks_platform/brand.rb', line 43

attr_accessor :display_name

#image_cma_pdf_logo_headerString

Returns:

  • (String)


53
54
55
# File 'lib/moxiworks_platform/brand.rb', line 53

def image_cma_pdf_logo_header
  @image_cma_pdf_logo_header
end

#image_email_logo_altString

Returns:

  • (String)


58
59
60
# File 'lib/moxiworks_platform/brand.rb', line 58

def image_email_logo_alt
  @image_email_logo_alt
end

#image_faviconString

Returns:

  • (String)


63
64
65
# File 'lib/moxiworks_platform/brand.rb', line 63

def image_favicon
  @image_favicon
end

#image_logoString

Returns:

  • (String)


8
9
10
# File 'lib/moxiworks_platform/brand.rb', line 8

def 
  @image_logo
end

#image_pres_cover_logoString

Returns:

  • (String)


68
69
70
# File 'lib/moxiworks_platform/brand.rb', line 68

def 
  @image_pres_cover_logo
end

#pres_block_background_colorString

Returns:

  • (String)


73
74
75
# File 'lib/moxiworks_platform/brand.rb', line 73

def pres_block_background_color
  @pres_block_background_color
end

#pres_block_text_colorString

Returns:

  • (String)


78
79
80
# File 'lib/moxiworks_platform/brand.rb', line 78

def pres_block_text_color
  @pres_block_text_color
end

#URL to a favicon image(toafaviconimage) ⇒ String

Returns:

  • (String)


63
# File 'lib/moxiworks_platform/brand.rb', line 63

attr_accessor :image_favicon

Returns:

  • (String)


53
# File 'lib/moxiworks_platform/brand.rb', line 53

attr_accessor :image_cma_pdf_logo_header

Returns:

  • (String)


68
# File 'lib/moxiworks_platform/brand.rb', line 68

attr_accessor :image_pres_cover_logo

Returns:

  • (String)


58
# File 'lib/moxiworks_platform/brand.rb', line 58

attr_accessor :image_email_logo_alt

Returns:

  • (String)


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

attr_accessor :image_logo

Class Method Details

.find(opts = {}) ⇒ MoxiworksPlatform::Brand

Find an Brand on the Moxi Works Platform

Parameters:

  • opts (Hash) (defaults to: {})

    named parameter Hash

Options Hash (opts):

  • :moxi_works_company_id (String)

    REQUIRED The Moxi Works Brand ID for the brand

Returns:

Raises:

  • ::MoxiworksPlatform::Exception::ArgumentError if required named parameters aren't included



89
90
91
92
93
94
95
96
97
98
99
# File 'lib/moxiworks_platform/brand.rb', line 89

def self.find(opts={})
  required_opts = [:moxi_works_company_id]
  raise ::MoxiworksPlatform::Exception::ArgumentError,
        'arguments must be passed as named parameters' unless opts.is_a? Hash
  required_opts.each do |opt|
    raise ::MoxiworksPlatform::Exception::ArgumentError, "#{opt} required" if
        opts[opt].nil? or opts[opt].to_s.empty?
  end
  url = "#{MoxiworksPlatform::Config.url}/api/brands/#{opts[:moxi_works_company_id]}"
  self.send_request(:get, opts, url)
end

.search(opts = {}) ⇒ MoxiworksPlatform::Brand

Search For Brands in Moxi Works Platform

Examples:

results = MoxiworksPlatform::Brand.search(
moxi_works_company_id: 'the_company',
)

Parameters:

  • opts (Hash) (defaults to: {})

    named parameter Hash

Options Hash (opts):

  • :moxi_works_company_id (String)

    The Moxi Works Company ID For the search (use Company.search to determine available moxi_works_company_id)

  • :moxi_works_agent_id (String)

    The Moxi Works Agent ID For the search (use Agent.search to determine available moxi_works_agent_id)

    optional Search parameters

  • :page_number (Integer)

    the page of results to return

Returns:

Raises:

  • ::MoxiworksPlatform::Exception::ArgumentError if required named parameters aren't included



122
123
124
# File 'lib/moxiworks_platform/brand.rb', line 122

def self.search(opts={})
  self.send_request(:get, opts)
end

.send_request(method, opts = {}, url = nil) ⇒ Object



127
128
129
130
# File 'lib/moxiworks_platform/brand.rb', line 127

def self.send_request(method, opts={}, url=nil)
  url ||= "#{MoxiworksPlatform::Config.url}/api/brands"
  super(method, opts, url)
end