asypost::Request::VERSION = '0.23';
use Moo;
use Carp qw(croak);
use HTTP::Tiny;
use JSON::MaybeXS qw(decode_json);
has 'user_agent' => (
is => 'ro',
default => sub { HTTP::Tiny->new( a
: "FATAL: " . $self->endpoint . $operation . " returned '$err'";
}
return decode_json $http_response->{content};
}
sub get {
my ($self, $endpoint) = @_;
$endpoint = $self->_
oint );
return lc $http_response->{headers}->{'content-type'} =~ m|^\Qapplication/json\E|
? decode_json $http_response->{content}
: $http_response->{content};
}
sub _build_url {
package Net::Easypost::CustomsInfo;
$Net::Easypost::CustomsInfo::VERSION = '0.23';
use JSON::MaybeXS;
use Types::Standard qw(ArrayRef Bool Enum InstanceOf Str);
use Moo;
with qw/Net::Easypost::Resour
customs_certify' => (
is => 'rw',
isa => Bool|InstanceOf['JSON::PP::Boolean'],
coerce => sub { $_[0] ? JSON->true : JSON->false }
);
has 'non_delivery_option' => (
is => 'rw',
ackage Net::Easypost::Address;
$Net::Easypost::Address::VERSION = '0.23';
use Carp qw/croak/;
use JSON::MaybeXS;
use Scalar::Util;
use overload
'""' => sub { $_[0]->as_string },
'0+' =
sidential' => (
is => 'rw',
isa => Bool|InstanceOf['JSON::PP::Boolean'],
coerce => sub { $_[0] ? JSON->true : JSON->false }
);
has 'verifications' => (
is => 'rw',
isa =>