File Coverage

blib/lib/WebService/Akeneo/Resource/Products.pm
Criterion Covered Total %
statement 5 26 19.2
branch n/a
condition n/a
subroutine 2 6 33.3
pod 0 4 0.0
total 7 36 19.4


line stmt bran cond sub pod time code
1             package WebService::Akeneo::Resource::Products;
2             $WebService::Akeneo::Resource::Products::VERSION = '0.001';
3 3     3   42 use v5.38;
  3         12  
4 3     3   19 use Object::Pad;
  3         8  
  3         57  
5              
6             class WebService::Akeneo::Resource::Products 0.001;
7              
8             field $t :param;
9             field $paginator;
10              
11             BUILD { $paginator = WebService::Akeneo::Paginator->new( transport => $t ) }
12              
13 0     0 0   method get ($code) { $t->request('GET', "/products/$code") }
  0            
  0            
  0            
  0            
14 0     0 0   method upsert ($code, $payload) { $t->request('PATCH', "/products/$code", json => $payload) }
  0            
  0            
  0            
  0            
  0            
15 0     0 0   method upsert_ndjson ($records) { $t->request('PATCH', "/products", ndjson => $records) }
  0            
  0            
  0            
  0            
16 0     0 0   method list (%params) { $paginator->collect('/products', %params) }
  0            
  0            
  0            
  0            
17              
18             1;