Class: Vacuum::Locale

Inherits:
Object
  • Object
show all
Defined in:
lib/vacuum/locale.rb

Overview

The target locale

Defined Under Namespace

Classes: NotFound

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(marketplace, access_key:, secret_key:, partner_tag:, partner_type: 'Associates') ⇒ Locale

Creates a locale

Parameters:

  • marketplace (Symbol, String)
  • access_key (String)
  • secret_key (String)
  • partner_tag (String)
  • partner_type (String) (defaults to: 'Associates')

Raises:

  • (NotFound)

    if marketplace is not found


44
45
46
47
48
49
50
51
# File 'lib/vacuum/locale.rb', line 44

def initialize(marketplace, access_key:, secret_key:, partner_tag:,
               partner_type: 'Associates')
  @host, @region = find_host_and_region(marketplace)
  @access_key = access_key
  @secret_key = secret_key
  @partner_tag = partner_tag
  @partner_type = partner_type
end

Instance Attribute Details

#access_keyString (readonly)

Returns:

  • (String)

33
34
35
# File 'lib/vacuum/locale.rb', line 33

def access_key
  @access_key
end

#hostString (readonly)

Returns:

  • (String)

33
34
35
# File 'lib/vacuum/locale.rb', line 33

def host
  @host
end

#partner_tagString (readonly)

Returns:

  • (String)

33
34
35
# File 'lib/vacuum/locale.rb', line 33

def partner_tag
  @partner_tag
end

#partner_typeString (readonly)

Returns:

  • (String)

33
34
35
# File 'lib/vacuum/locale.rb', line 33

def partner_type
  @partner_type
end

#regionString (readonly)

Returns:

  • (String)

33
34
35
# File 'lib/vacuum/locale.rb', line 33

def region
  @region
end

#secret_keyString (readonly)

Returns:

  • (String)

33
34
35
# File 'lib/vacuum/locale.rb', line 33

def secret_key
  @secret_key
end