default => sub{ [qw(date_birth)] },
);
has '+endpoint' => (
default => 'sepa',
);
has '+_json_ignore' => (
default => sub{ [qw(check endpoint created populated country last4)] },
);
has
> 1,
);
sub TO_JSON {
my $self = shift;
return {} unless defined $self->sepa;
return { id => $self->sepa->id } if defined $self->sepa->id;
return $self->sepa->TO_JSON();
}
1;
__END
use Stancer::Config;
use Stancer::Core::Request::Call;
use Stancer::Exceptions::Http;
use JSON qw(decode_json);
use Log::Any qw($log);
use Try::Tiny;
use Moo;
use namespace::clean;
sub del {
m
;
my $request = HTTP::Request->new(PATCH => $object->uri);
$request->content($object->toJSON());
return $this->_request($request, $object);
}
sub post {
my $this = shift;
my $
t;
my $request = HTTP::Request->new(POST => $object->uri);
$request->content($object->toJSON());
return $this->_request($request, $object);
}
sub _clean_request {
my $this = shift;
re)] },
);
has '+_inner_objects' => (
default => sub{ [qw(card customer sepa)] },
);
has '+_json_ignore' => (
default => sub{ [qw(endpoint created populated method refunds)] },
);
has '+end
;
use Stancer::Core::Request;
use List::MoreUtils qw(any first_index);
use Log::Any qw($log);
use JSON;
use Scalar::Util qw(blessed);
use Storable qw(dclone);
use Moo;
use namespace::clean;
around
has _integer => (
is => 'ro',
isa => ArrayRef[Str],
default => sub{ [] },
);
has _json_ignore => (
is => 'ro',
isa => ArrayRef[Str],
default => sub{ [qw(endpoint created po
$data = Stancer::Core::Request->new->del($this);
if ($data) {
$this->hydrate(decode_json $data);
}
my @parts = split m/::/sm, ref $this;
my $class = $parts[-1];
$log->i
Stancer::Exceptions::InvalidSearchStart;
use Stancer::Exceptions::InvalidSearchUntilCreation;
use JSON;
use Scalar::Util qw(blessed);
use Try::Tiny;
use Moo;
use namespace::clean;
sub _create_eleme
$json = decode_json $response;
$more = $json->{range}->{has_more} == JSON::true;
@elements = @{$json->{$class->_element_key}};
$data->{start} += $json
t => 'cards',
);
has '+_integer' => (
default => sub{ [qw(exp_month exp_year)] },
);
has '+_json_ignore' => (
default => sub{ [qw(endpoint created populated brand country last4)] },
);
has