Skip to content

Commit

Permalink
MARVAL-1626942: Prepare for tooling get order
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Wassberg authored and theseal committed Aug 24, 2020
1 parent 84cc9c4 commit 912f803
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SU/API/NexusCardOrdering.pm
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,25 @@ sub get_orderid
return $orderId;
}

sub get_order
{
my ($self, $id) = @_;

my $response = $self->do_request("GET", "order/$id");

my $code = $self->request_code;
if ($code == 404)
{
warn "No orders not found";
return undef;
}
elsif ($code != 200)
{
die "unknown response code $code"
}
return $response;
}

sub set_lookback
{
my ($self, $date) = @_;
Expand Down

0 comments on commit 912f803

Please sign in to comment.