Skip to content

date argument from get_invoices() not encoded in _get_collections() #186

@sherrardb

Description

@sherrardb

it is passed

stripe-perl/lib/Net/Stripe.pm

Lines 1459 to 1473 in 079e182

method get_invoices(Net::Stripe::Customer|Str :$customer?,
Int|HashRef :$date?,
Str :$ending_before?,
Int :$limit?,
Str :$starting_after?) {
if (ref($customer)) {
$customer = $customer->id
}
$self->_get_collections('invoices', customer => $customer,
date => $date,
ending_before => $ending_before,
limit => $limit,
starting_after => $starting_after);
}

but not encoded, AFAICT

stripe-perl/lib/Net/Stripe.pm

Lines 1677 to 1714 in 079e182

sub _get_collections {
my $self = shift;
my $path = shift;
my %args = @_;
my @path_args;
if (my $c = $args{limit}) {
push @path_args, "limit=$c";
}
if (my $o = $args{offset}) {
push @path_args, "offset=$o";
}
if (my $c = $args{customer}) {
push @path_args, "customer=$c";
}
if (my $c = $args{object}) {
push @path_args, "object=$c";
}
if (my $c = $args{ending_before}) {
push @path_args, "ending_before=$c";
}
if (my $c = $args{starting_after}) {
push @path_args, "starting_after=$c";
}
if (my $e = $args{email}) {
push @path_args, "email=$e";
}
# example: $Stripe->get_charges( 'count' => 100, 'created' => { 'gte' => 1397663381 } );
if (defined($args{created})) {
my %c = %{$args{created}};
foreach my $key (keys %c) {
if ($key =~ /(?:l|g)te?/) {
push @path_args, "created[".$key."]=".$c{$key};
}
}
}
return $self->_get_with_args($path, \@path_args);
}

and it looks like date may have been changed to due_date

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions