Class: Quickeebooks::Online::Model::Payment
- Inherits:
-
IntuitType
- Object
- IntuitType
- Quickeebooks::Online::Model::Payment
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/quickeebooks/online/model/payment.rb
Constant Summary collapse
- XML_NODE =
"Payment"
- REST_RESOURCE =
"payment"
Class Method Summary collapse
-
.resource_for_collection ⇒ Object
Class methods.
Instance Method Summary collapse
-
#initialize ⇒ Payment
constructor
A new instance of Payment.
- #to_xml_ns(options = {}) ⇒ Object
- #valid_for_deletion? ⇒ Boolean
- #valid_for_update? ⇒ Boolean
Methods inherited from IntuitType
Constructor Details
#initialize ⇒ Payment
Returns a new instance of Payment.
24 25 26 |
# File 'lib/quickeebooks/online/model/payment.rb', line 24 def initialize ensure_line_items_initialization end |
Class Method Details
.resource_for_collection ⇒ Object
Class methods
42 43 44 |
# File 'lib/quickeebooks/online/model/payment.rb', line 42 def self.resource_for_collection "#{self::REST_RESOURCE}s" end |
Instance Method Details
#to_xml_ns(options = {}) ⇒ Object
32 33 34 |
# File 'lib/quickeebooks/online/model/payment.rb', line 32 def to_xml_ns( = {}) to_xml_inject_ns(XML_NODE, ) end |
#valid_for_deletion? ⇒ Boolean
36 37 38 39 |
# File 'lib/quickeebooks/online/model/payment.rb', line 36 def valid_for_deletion? return false if(id.nil? || sync_token.nil?) id.to_i > 0 && !sync_token.to_s.empty? && sync_token.to_i >= 0 end |
#valid_for_update? ⇒ Boolean
28 29 30 |
# File 'lib/quickeebooks/online/model/payment.rb', line 28 def valid_for_update? errors.empty? end |