Class: Quickbooks::Service::PaymentMethod
- Inherits:
-
BaseService
- Object
- BaseService
- Quickbooks::Service::PaymentMethod
- Defined in:
- lib/quickbooks/service/payment_method.rb
Constant Summary
Constants inherited from BaseService
BaseService::HTTP_ACCEPT, BaseService::HTTP_ACCEPT_ENCODING, BaseService::HTTP_CONTENT_TYPE, BaseService::XML_NS
Instance Attribute Summary
Attributes inherited from BaseService
#base_uri, #company_id, #last_response_body, #last_response_xml, #oauth
Instance Method Summary collapse
- #default_model_query ⇒ Object
- #fetch_by_name(name) ⇒ Object
- #model ⇒ Object
- #search_name_query(name) ⇒ Object
Methods inherited from BaseService
#access_token=, #initialize, #realm_id=, #url_for_base, #url_for_query, #url_for_resource
Methods included from ServiceCrud
#create, #delete, #delete_by_query_string, #fetch_by_id, #query, #update
Methods included from Util::Logging
Constructor Details
This class inherits a constructor from Quickbooks::Service::BaseService
Instance Method Details
#default_model_query ⇒ Object
5 6 7 |
# File 'lib/quickbooks/service/payment_method.rb', line 5 def default_model_query "SELECT * FROM PaymentMethod" end |
#fetch_by_name(name) ⇒ Object
9 10 11 |
# File 'lib/quickbooks/service/payment_method.rb', line 9 def fetch_by_name(name) self.query(search_name_query(name)).entries.first end |
#model ⇒ Object
13 14 15 |
# File 'lib/quickbooks/service/payment_method.rb', line 13 def model Quickbooks::Model::PaymentMethod end |
#search_name_query(name) ⇒ Object
17 18 19 |
# File 'lib/quickbooks/service/payment_method.rb', line 17 def search_name_query(name) "SELECT * FROM PaymentMethod WHERE Name = '#{name}'" end |