| 1 | # -*- perl -*- | ||
| 2 | # !!! DO NOT EDIT !!! | ||
| 3 | # This file was automatically generated. | ||
| 4 | package Net::Amazon::Validate::Type::CartModify; | ||
| 5 | |||
| 6 | use 5.006; | ||
| 7 | use strict; | ||
| 8 | use warnings; | ||
| 9 | |||
| 10 | use constant RESPONSEGROUP_VALID_VALUES => { | ||
| 11 | 'Cart' => 1, | ||
| 12 | 'CartNewReleases' => 1, | ||
| 13 | 'CartSimilarities' => 1, | ||
| 14 | 'CartTopSellers' => 1, | ||
| 15 | }; | ||
| 16 | |||
| 17 | sub new { | ||
| 18 | my ($class , %options) = @_; | ||
| 19 | my $self = { | ||
| 20 | %options, | ||
| 21 | }; | ||
| 22 | bless $self, $class; | ||
| 23 | } | ||
| 24 | |||
| 25 | sub assert { | ||
| 26 | my ($self, $value, $name, $href) = @_; | ||
| 27 | die "Unknown type in Net::Amazon::Request constructor: $value" unless defined $href->{$value}; | ||
| 28 | } | ||
| 29 | |||
| 30 | sub validate { | ||
| 31 | my ($self, $value, $name, $href) = @_; | ||
| 32 | if ( ref ($value) eq 'ARRAY' ) { | ||
| 33 | $self->assert($_, $name, $href) for (@$value); | ||
| 34 | } else { | ||
| 35 | $self->assert($value, $name, $href); | ||
| 36 | } | ||
| 37 | } | ||
| 38 | |||
| 39 | sub ResponseGroup { | ||
| 40 | my ($self, $value) = @_; | ||
| 41 | $self->validate($value, "ResponseGroup", (RESPONSEGROUP_VALID_VALUES)); | ||
| 42 | } | ||
| 43 | |||
| 44 | 1; |