partydrone/connect-sdk-ruby

View on GitHub
docs/OpConnect/Client/Items.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Module: OpConnect::Client::Items
  
    &mdash; Documentation by YARD 0.9.27
  
</title>

  <link rel="stylesheet" href="../../css/style.css" type="text/css" />

  <link rel="stylesheet" href="../../css/common.css" type="text/css" />

<script type="text/javascript">
  pathId = "OpConnect::Client::Items";
  relpath = '../../';
</script>


  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="../../class_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../../_index.html">Index (I)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../OpConnect.html" title="OpConnect (module)">OpConnect</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="OpConnect::Client (class)">Client</a></span></span>
     &raquo; 
    <span class="title">Items</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../../class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><h1>Module: OpConnect::Client::Items
  
  
  
</h1>
<div class="box_info">
  

  
  
  
  
  

  
  <dl>
    <dt>Included in:</dt>
    <dd><span class='object_link'><a href="../Client.html" title="OpConnect::Client (class)">OpConnect::Client</a></span></dd>
  </dl>
  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/op_connect/client/items.rb</dd>
  </dl>
  
</div>








  
    <h2>
      Instance Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#create_item-instance_method" title="#create_item (instance method)">#<strong>create_item</strong>(vault_id:, **attributes)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#delete_item-instance_method" title="#delete_item (instance method)">#<strong>delete_item</strong>(vault_id:, id:)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get_item-instance_method" title="#get_item (instance method)">#<strong>get_item</strong>(vault_id:, id:)  &#x21d2; Object </a>
    

    
      (also: #item)
    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#list_items-instance_method" title="#list_items (instance method)">#<strong>list_items</strong>(vault_id:, **params)  &#x21d2; Object </a>
    

    
      (also: #items)
    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#replace_item-instance_method" title="#replace_item (instance method)">#<strong>replace_item</strong>(vault_id:, id:, **attributes)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#update_item-instance_method" title="#update_item (instance method)">#<strong>update_item</strong>(vault_id:, id:, **attributes)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  



  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="create_item-instance_method">
  
    #<strong>create_item</strong>(vault_id:, **attributes)  &#x21d2; <tt><span class='object_link'><a href="../Object.html" title="OpConnect::Object (class)">Object</a></span></tt> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


14
15
16</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/op_connect/client/items.rb', line 14</span>

<span class='kw'>def</span> <span class='id identifier rubyid_create_item'>create_item</span><span class='lparen'>(</span><span class='label'>vault_id:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
  <span class='const'><span class='object_link'><a href="../Item.html" title="OpConnect::Item (class)">Item</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Item.html#initialize-instance_method" title="OpConnect::Item#initialize (method)">new</a></span></span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vaults/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vault_id'>vault_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/items</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="delete_item-instance_method">
  
    #<strong>delete_item</strong>(vault_id:, id:)  &#x21d2; <tt><span class='object_link'><a href="../Object.html" title="OpConnect::Object (class)">Object</a></span></tt> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


22
23
24
25
26
27</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/op_connect/client/items.rb', line 22</span>

<span class='kw'>def</span> <span class='id identifier rubyid_delete_item'>delete_item</span><span class='lparen'>(</span><span class='label'>vault_id:</span><span class='comma'>,</span> <span class='label'>id:</span><span class='rparen'>)</span>
  <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vaults/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vault_id'>vault_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/items/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>204</span>
  <span class='kw'>false</span>
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../OpConnect.html" title="OpConnect (module)">OpConnect</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Error.html" title="OpConnect::Error (class)">Error</a></span></span>
  <span class='kw'>false</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="get_item-instance_method">
  
    #<strong>get_item</strong>(vault_id:, id:)  &#x21d2; <tt><span class='object_link'><a href="../Object.html" title="OpConnect::Object (class)">Object</a></span></tt> 
  

  
    <span class="aliases">Also known as:
    <span class="names"><span id='item-instance_method'>item</span></span>
    </span>
  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/op_connect/client/items.rb', line 9</span>

<span class='kw'>def</span> <span class='id identifier rubyid_get_item'>get_item</span><span class='lparen'>(</span><span class='label'>vault_id:</span><span class='comma'>,</span> <span class='label'>id:</span><span class='rparen'>)</span>
  <span class='const'><span class='object_link'><a href="../Item.html" title="OpConnect::Item (class)">Item</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Item.html#initialize-instance_method" title="OpConnect::Item#initialize (method)">new</a></span></span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vaults/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vault_id'>vault_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/items/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="list_items-instance_method">
  
    #<strong>list_items</strong>(vault_id:, **params)  &#x21d2; <tt><span class='object_link'><a href="../Object.html" title="OpConnect::Object (class)">Object</a></span></tt> 
  

  
    <span class="aliases">Also known as:
    <span class="names"><span id='items-instance_method'>items</span></span>
    </span>
  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/op_connect/client/items.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_list_items'>list_items</span><span class='lparen'>(</span><span class='label'>vault_id:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vaults/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vault_id'>vault_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/items</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="../Item.html" title="OpConnect::Item (class)">Item</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Item.html#initialize-instance_method" title="OpConnect::Item#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="replace_item-instance_method">
  
    #<strong>replace_item</strong>(vault_id:, id:, **attributes)  &#x21d2; <tt><span class='object_link'><a href="../Object.html" title="OpConnect::Object (class)">Object</a></span></tt> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


18
19
20</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/op_connect/client/items.rb', line 18</span>

<span class='kw'>def</span> <span class='id identifier rubyid_replace_item'>replace_item</span><span class='lparen'>(</span><span class='label'>vault_id:</span><span class='comma'>,</span> <span class='label'>id:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
  <span class='const'><span class='object_link'><a href="../Item.html" title="OpConnect::Item (class)">Item</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Item.html#initialize-instance_method" title="OpConnect::Item#initialize (method)">new</a></span></span> <span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vaults/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vault_id'>vault_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/items/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="update_item-instance_method">
  
    #<strong>update_item</strong>(vault_id:, id:, **attributes)  &#x21d2; <tt><span class='object_link'><a href="../Object.html" title="OpConnect::Object (class)">Object</a></span></tt> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


29
30
31</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/op_connect/client/items.rb', line 29</span>

<span class='kw'>def</span> <span class='id identifier rubyid_update_item'>update_item</span><span class='lparen'>(</span><span class='label'>vault_id:</span><span class='comma'>,</span> <span class='label'>id:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
  <span class='const'><span class='object_link'><a href="../Item.html" title="OpConnect::Item (class)">Item</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Item.html#initialize-instance_method" title="OpConnect::Item#initialize (method)">new</a></span></span> <span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>vaults/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vault_id'>vault_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/items/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='comma'>,</span> <span class='label'>headers:</span> <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Content-Type</span><span class='label_end'>&quot;:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>applicatoin/json-patch+json</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Mon Mar 14 05:16:28 2022 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.27 (ruby-3.1.1).
</div>

    </div>
  </body>
</html>