View | Details | Raw Unified | Return to bug 38256
Collapse All | Expand All

(-)a/Koha/ERM/EUsage/UsageDataProvider.pm (+15 lines)
Lines 36-41 use Koha::ERM::EUsage::UsagePlatforms; Link Here
36
use Koha::ERM::EUsage::UsageDatabases;
36
use Koha::ERM::EUsage::UsageDatabases;
37
use Koha::ERM::EUsage::MonthlyUsages;
37
use Koha::ERM::EUsage::MonthlyUsages;
38
use Koha::ERM::EUsage::SushiCounter;
38
use Koha::ERM::EUsage::SushiCounter;
39
use Koha::Acquisition::Bookseller;
39
use Koha::BackgroundJob::ErmSushiHarvester;
40
use Koha::BackgroundJob::ErmSushiHarvester;
40
41
41
=head1 NAME
42
=head1 NAME
Lines 367-372 sub erm_usage_databases { Link Here
367
    return Koha::ERM::EUsage::UsageDatabases->_new_from_dbic($usage_database_rs);
368
    return Koha::ERM::EUsage::UsageDatabases->_new_from_dbic($usage_database_rs);
368
}
369
}
369
370
371
372
=head3 vendor
373
374
Return the vendor for this provider
375
376
=cut
377
378
sub vendor {
379
    my ($self) = @_;
380
    my $vendor_rs = $self->_result->vendor;
381
    return unless $vendor_rs;
382
    return Koha::Acquisition::Bookseller->_new_from_dbic($vendor_rs);
383
}
384
370
=head2 Internal methods
385
=head2 Internal methods
371
386
372
=head3 _build_url_query
387
=head3 _build_url_query
(-)a/Koha/REST/V1/ERM/EUsage/UsageDataProviders.pm (-1 / +1 lines)
Lines 122-128 sub get { Link Here
122
122
123
    return try {
123
    return try {
124
        my $usage_data_provider =
124
        my $usage_data_provider =
125
            Koha::ERM::EUsage::UsageDataProviders->find( $c->param('erm_usage_data_provider_id') );
125
            $c->objects->find( Koha::ERM::EUsage::UsageDataProviders->search, $c->param('erm_usage_data_provider_id') );
126
126
127
        return $c->render_resource_not_found("Usage data provider")
127
        return $c->render_resource_not_found("Usage data provider")
128
            unless $usage_data_provider;
128
            unless $usage_data_provider;
(-)a/api/v1/swagger/definitions/erm_usage_data_provider.yaml (+8 lines)
Lines 83-88 properties: Link Here
83
    type: 
83
    type: 
84
    - string
84
    - string
85
    - "null"
85
    - "null"
86
  vendor_id:
87
    description: vendor of the provider
88
    type: 
89
    - integer
90
    - "null"
91
  vendor:
92
    type: object
93
    description: embedded vendor
86
  counter_files:
94
  counter_files:
87
    type: array
95
    type: array
88
    description: counter files
96
    description: counter files
(-)a/api/v1/swagger/paths/erm_usage_data_providers.yaml (-1 / +1 lines)
Lines 212-217 Link Here
212
          enum:
212
          enum:
213
            - counter_files
213
            - counter_files
214
            - erm_usage_titles.erm_usage_muses
214
            - erm_usage_titles.erm_usage_muses
215
            - vendor
215
        collectionFormat: csv
216
        collectionFormat: csv
216
    responses:
217
    responses:
217
      200:
218
      200:
218
- 

Return to bug 38256