1# -*- perl -*-
2# !!! DO NOT EDIT !!!
3# This file was automatically generated.
4package Net::Amazon::Validate::ItemSearch::de::ISPUPostalCode;
5
6use 5.006;
7use strict;
8use warnings;
9
10sub new {
11    my ($class , %options) = @_;
12    my $self = {
13        '_default' => 'Apparel',
14        %options,
15    };
16
17    push @{$self->{_options}}, 'Apparel';
18    push @{$self->{_options}}, 'Kitchen';
19
20    bless $self, $class;
21}
22
23sub user_or_default {
24    my ($self, $user) = @_;
25    if (defined $user && length($user) > 0) {
26        return $self->find_match($user);
27    }
28    return $self->default();
29}
30
31sub default {
32    my ($self) = @_;
33    return $self->{_default};
34}
35
36sub find_match {
37    my ($self, $value) = @_;
38    for (@{$self->{_options}}) {
39        return $_ if lc($_) eq lc($value);
40    }
41    die "$value is not a valid value for de::ISPUPostalCode!\n";
42}
43
441;
45
46__END__
47
48=head1 NAME
49
50Net::Amazon::Validate::ItemSearch::de::ISPUPostalCode - valid search indices for the de locale and the ISPUPostalCode operation.
51
52=head1 DESCRIPTION
53
54The default value is Apparel, unless mode is specified.
55
56The list of available values are:
57
58    Apparel
59    Kitchen
60
61=cut
62