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



49
50
51
52
53
54
55
56
# File 'lib/vacuum/locale.rb', line 49

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)


38
39
40
# File 'lib/vacuum/locale.rb', line 38

def access_key
  @access_key
end

#hostString (readonly)

Returns:

  • (String)


38
39
40
# File 'lib/vacuum/locale.rb', line 38

def host
  @host
end

#partner_tagString (readonly)

Returns:

  • (String)


38
39
40
# File 'lib/vacuum/locale.rb', line 38

def partner_tag
  @partner_tag
end

#partner_typeString (readonly)

Returns:

  • (String)


38
39
40
# File 'lib/vacuum/locale.rb', line 38

def partner_type
  @partner_type
end

#regionString (readonly)

Returns:

  • (String)


38
39
40
# File 'lib/vacuum/locale.rb', line 38

def region
  @region
end

#secret_keyString (readonly)

Returns:

  • (String)


38
39
40
# File 'lib/vacuum/locale.rb', line 38

def secret_key
  @secret_key
end