Class: SecondAmendmentWholesale::Attribute
- Includes:
- API
- Defined in:
- lib/second_amendment_wholesale/attribute.rb
Constant Summary
Constants included from API
SecondAmendmentWholesale::API::ROOT_API_URL
Class Method Summary collapse
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(options = {}) ⇒ Attribute
constructor
A new instance of Attribute.
Methods included from API
#delete_request, #get_request, #post_request, #put_request
Constructor Details
#initialize(options = {}) ⇒ Attribute
Returns a new instance of Attribute.
6 7 8 9 10 |
# File 'lib/second_amendment_wholesale/attribute.rb', line 6 def initialize( = {}) requires!(, :token) = end |
Class Method Details
.all(options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/second_amendment_wholesale/attribute.rb', line 12 def self.all( = {}) requires!(, :token) new().all end |
Instance Method Details
#all ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/second_amendment_wholesale/attribute.rb', line 18 def all headers = [ *auth_header([:token]), *content_type_header('application/json'), ].to_h get_request('feed/attributes', headers).body end |