Class: Nibo::Category

Inherits:
Object
  • Object
show all
Includes:
ApiResource, ApiResource::List
Defined in:
lib/nibo/category.rb

Constant Summary

Constants included from ApiResource

ApiResource::BASE_URL

Class Method Summary collapse

Methods included from ApiResource::List

included, #list

Methods included from ApiResource

#api_request, #encode, included, #url_encode

Methods inherited from Object

#create_fields, create_from, #initialize, #metaclass, #refresh_object, #set_properties, #to_hash, #to_json, #to_s

Constructor Details

This class inherits a constructor from Nibo::Object

Class Method Details

.class_nameObject



10
11
12
# File 'lib/nibo/category.rb', line 10

def self.class_name
  self.name.split('::')[-1]
end

.urlObject



6
7
8
# File 'lib/nibo/category.rb', line 6

def self.url
  "/#{CGI.escape(class_name)}"
end

.url_method(method) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/nibo/category.rb', line 14

def self.url_method(method)
  case method
    when :get
      '/GetCategory'
  end

end