This repository was archived by the owner on Oct 25, 2023. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 3 files changed +97
-0
lines changed Expand file tree Collapse file tree 3 files changed +97
-0
lines changed Original file line number Diff line number Diff line change 411411                ]
412412            ]
413413        ],
414+         'changeListing '  => [
415+             'httpMethod '  => 'POST ' ,
416+             'uri '  => 'marketplace/listings/{listing_id} ' ,
417+             'summary '  => 'Edit the data associated with a listing. ' ,
418+             'responseModel '  => 'GetResponse ' ,
419+             'parameters '  => [
420+ 	            'listing_id '  => [
421+ 		            'type '  => 'string ' ,
422+ 		            'location '  => 'uri ' ,
423+ 		            'required '  => true ,
424+ 	            ],
425+                 'release_id '  => [
426+                     'type '  => 'string ' ,
427+                     'location '  => 'json ' ,
428+                     'required '  => false ,
429+                 ],
430+                 'condition '  => [
431+                     'type '  => 'string ' ,
432+                     'location '  => 'json ' ,
433+                     'required '  => false ,
434+                 ],
435+                 'sleeve_condition '  => [
436+                     'type '  => 'string ' ,
437+                     'location '  => 'json ' ,
438+                     'required '  => false ,
439+                 ],
440+                 'price '  => [
441+                     'type '  => 'number ' ,
442+                     'location '  => 'json ' ,
443+                     'required '  => false ,
444+                 ],
445+                 'comments '  => [
446+                     'type '  => 'string ' ,
447+                     'location '  => 'json ' ,
448+                     'required '  => false ,
449+                 ],
450+                 'allow_offers '  => [
451+                     'type '  => 'boolean ' ,
452+                     'location '  => 'json ' ,
453+                     'required '  => false ,
454+                 ],
455+                 'status '  => [
456+                     'type '  => 'string ' ,
457+                     'location '  => 'json ' ,
458+                     'required '  => false ,
459+                 ],
460+                 'external_id '  => [
461+                     'type '  => 'string ' ,
462+                     'location '  => 'json ' ,
463+                     'required '  => false ,
464+                 ],
465+                 'location '  => [
466+                     'type '  => 'string ' ,
467+                     'location '  => 'json ' ,
468+                     'required '  => false ,
469+                 ],
470+                 'weight '  => [
471+                     'type '  => 'number ' ,
472+                     'location '  => 'json ' ,
473+                     'required '  => false ,
474+                 ],
475+                 'format_quantity '  => [
476+                     'type '  => 'number ' ,
477+                     'location '  => 'json ' ,
478+                     'required '  => false ,
479+                 ]
480+             ]
481+         ],
414482        'deleteListing '  => [
415483            'httpMethod '  => 'DELETE ' ,
416484            'uri '  => 'marketplace/listings/{listing_id} ' ,
Original file line number Diff line number Diff line change @@ -277,6 +277,21 @@ public function testCreateListing()
277277        $ this assertSame ('https://api.discogs.com/marketplace/listings ' , $ historygetLastRequest ()->getUrl ());
278278    }
279279
280+     public  function  testChangeListing ()
281+     {
282+         $ client$ this createClient ('change_listing ' , $ historynew  History ());
283+         $ response$ clientchangeListing ([
284+             'listing_id '  => '1 ' ,
285+             'release_id '  => '1 ' ,
286+             'condition '  => 'Mint (M) ' ,
287+             'status '  => 'For Sale ' ,
288+             'price '  => 5.90 
289+         ]);
290+ 
291+         $ this assertSame ('POST ' , $ historygetLastRequest ()->getMethod ());
292+         $ this assertSame ('https://api.discogs.com/marketplace/listings/1 ' , $ historygetLastRequest ()->getUrl ());
293+     }
294+ 
280295    public  function  testDeleteListing ()
281296    {
282297        $ client$ this createClient ('delete_listing ' , $ historynew  History ());
Original file line number Diff line number Diff line change 1+ HTTP/1.1 204 OK
2+ Reproxy-Status: yes
3+ Access-Control-Allow-Origin: *
4+ Cache-Control: public, must-revalidate
5+ Content-Type: application/json
6+ Server: lighttpd
7+ Content-Length: 780
8+ Date: Tue, 15 Jul 2014 19:59:59 GMT
9+ X-Varnish: 1702965334
10+ Age: 0
11+ Via: 1.1 varnish
12+ Connection: keep-alive
13+ 
14+ {}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments