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

(-)a/Koha/REST/V1/Acquisitions/Vendors.pm (-5 / +5 lines)
Lines 24-30 use Koha::Acquisition::Booksellers; Link Here
24
24
25
use Try::Tiny;
25
use Try::Tiny;
26
26
27
sub list {
27
sub list_vendors {
28
    my ( $c, $args, $cb ) = @_;
28
    my ( $c, $args, $cb ) = @_;
29
29
30
    my @vendors;
30
    my @vendors;
Lines 43-49 sub list { Link Here
43
    };
43
    };
44
}
44
}
45
45
46
sub get {
46
sub get_vendor {
47
    my ( $c, $args, $cb ) = @_;
47
    my ( $c, $args, $cb ) = @_;
48
48
49
    my $vendor = Koha::Acquisition::Booksellers->find( $args->{vendor_id} );
49
    my $vendor = Koha::Acquisition::Booksellers->find( $args->{vendor_id} );
Lines 54-60 sub get { Link Here
54
    return $c->$cb( _to_api($vendor), 200 );
54
    return $c->$cb( _to_api($vendor), 200 );
55
}
55
}
56
56
57
sub add {
57
sub add_vendor {
58
    my ( $c, $args, $cb ) = @_;
58
    my ( $c, $args, $cb ) = @_;
59
59
60
    my $vendor = Koha::Acquisition::Bookseller->new( _to_model( $args->{body} ) );
60
    my $vendor = Koha::Acquisition::Bookseller->new( _to_model( $args->{body} ) );
Lines 73-79 sub add { Link Here
73
    };
73
    };
74
}
74
}
75
75
76
sub update {
76
sub update_vendor {
77
    my ( $c, $args, $cb ) = @_;
77
    my ( $c, $args, $cb ) = @_;
78
78
79
    my $vendor;
79
    my $vendor;
Lines 98-104 sub update { Link Here
98
98
99
}
99
}
100
100
101
sub delete {
101
sub delete_vendor {
102
    my ( $c, $args, $cb ) = @_;
102
    my ( $c, $args, $cb ) = @_;
103
103
104
    my $vendor;
104
    my $vendor;
(-)a/api/v1/swagger/paths/acquisitions_vendors.json (-6 / +5 lines)
Lines 2-8 Link Here
2
  "/acquisitions/vendors": {
2
  "/acquisitions/vendors": {
3
    "get": {
3
    "get": {
4
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
4
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
5
      "operationId": "list",
5
      "operationId": "listVendors",
6
      "tags": ["acquisitions","vendors"],
6
      "tags": ["acquisitions","vendors"],
7
      "produces": [
7
      "produces": [
8
        "application/json"
8
        "application/json"
Lines 51-57 Link Here
51
    },
51
    },
52
    "post": {
52
    "post": {
53
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
53
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
54
      "operationId": "add",
54
      "operationId": "addVendor",
55
      "tags": ["acquisitions","vendors"],
55
      "tags": ["acquisitions","vendors"],
56
      "parameters": [{
56
      "parameters": [{
57
        "name": "body",
57
        "name": "body",
Lines 95-101 Link Here
95
  "/acquisitions/vendors/{vendor_id}": {
95
  "/acquisitions/vendors/{vendor_id}": {
96
    "get": {
96
    "get": {
97
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
97
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
98
      "operationId": "get",
98
      "operationId": "getVendor",
99
      "tags": ["acquisitions","vendors"],
99
      "tags": ["acquisitions","vendors"],
100
      "parameters": [{
100
      "parameters": [{
101
        "$ref": "../parameters.json#/vendoridPathParam"
101
        "$ref": "../parameters.json#/vendoridPathParam"
Lines 137-143 Link Here
137
    },
137
    },
138
    "put": {
138
    "put": {
139
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
139
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
140
      "operationId": "update",
140
      "operationId": "updateVendor",
141
      "tags": ["acquisitions","vendors"],
141
      "tags": ["acquisitions","vendors"],
142
      "parameters": [{
142
      "parameters": [{
143
        "$ref": "../parameters.json#/vendoridPathParam"
143
        "$ref": "../parameters.json#/vendoridPathParam"
Lines 187-193 Link Here
187
    },
187
    },
188
    "delete": {
188
    "delete": {
189
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
189
      "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors",
190
      "operationId": "delete",
190
      "operationId": "deleteVendor",
191
      "tags": ["acquisitions","vendors"],
191
      "tags": ["acquisitions","vendors"],
192
      "parameters": [{
192
      "parameters": [{
193
        "$ref": "../parameters.json#/vendoridPathParam"
193
        "$ref": "../parameters.json#/vendoridPathParam"
194
- 

Return to bug 18120