Class: KillBillClient::Model::TagDefinition
- Inherits:
-
TagDefinitionAttributes
- Object
- Resource
- TagDefinitionAttributes
- KillBillClient::Model::TagDefinition
- Defined in:
- lib/killbill_client/models/tag_definition.rb
Constant Summary collapse
- KILLBILL_API_TAG_DEFINITIONS_PREFIX =
"#{KILLBILL_API_PREFIX}/tagDefinitions"
Constants inherited from Resource
Resource::KILLBILL_API_PAGINATION_PREFIX, Resource::KILLBILL_API_PREFIX
Instance Attribute Summary
Attributes inherited from Resource
#clazz, #etag, #response, #session_id, #uri
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
#==, #_to_hash, attribute, create_alias, delete, extract_session_id, from_json, from_response, get, has_many, has_one, #hash, head, instantiate_record_from_json, post, put, #refresh, #to_hash, #to_json
Class Method Details
.all(options = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/killbill_client/models/tag_definition.rb', line 7 def all( = {}) get KILLBILL_API_TAG_DEFINITIONS_PREFIX, {}, end |
.find_by_name(name, options = {}) ⇒ Object
13 14 15 |
# File 'lib/killbill_client/models/tag_definition.rb', line 13 def find_by_name(name, = {}) self.all().select { |tag_definition| tag_definition.name == name }.first end |
Instance Method Details
#create(user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/killbill_client/models/tag_definition.rb', line 18 def create(user = nil, reason = nil, comment = nil, = {}) created_tag_definition = self.class.post KILLBILL_API_TAG_DEFINITIONS_PREFIX, to_json, {}, { :user => user, :reason => reason, :comment => comment, }.merge() created_tag_definition.refresh() end |