Class: KillBillClient::Model::Payment

Inherits:
PaymentAttributes show all
Includes:
CustomFieldHelper, TagHelper
Defined in:
lib/killbill_client/models/payment.rb

Constant Summary collapse

KILLBILL_API_PAYMENTS_PREFIX =
"#{KILLBILL_API_PREFIX}/payments"

Constants included from TagHelper

TagHelper::AUTO_INVOICING_OFF_ID, TagHelper::AUTO_PAY_OFF_ID, TagHelper::MANUAL_PAY_ID, TagHelper::OVERDUE_ENFORCEMENT_OFF_ID, TagHelper::TEST_ID, TagHelper::WRITTEN_OFF_ID

Class Method Summary collapse

Methods included from TagHelper

#add_tag, #add_tag_from_definition_id, #control_tag?, included, #remove_tag, #remove_tag_from_definition_id, #set_tags

Methods included from CustomFieldHelper

included

Class Method Details

.find_by_external_key(external_key, with_plugin_info = false, with_attempts = false, options = {}) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/killbill_client/models/payment.rb', line 27

def find_by_external_key(external_key, with_plugin_info = false, with_attempts = false, options = {})
  get "#{KILLBILL_API_PAYMENTS_PREFIX}",
      {
          :externalKey => external_key,
          :withAttempts => with_attempts,
          :withPluginInfo => with_plugin_info
      },
      options
end

.find_by_id(payment_id, with_plugin_info = false, with_attempts = false, options = {}) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/killbill_client/models/payment.rb', line 18

def find_by_id(payment_id, with_plugin_info = false, with_attempts = false, options = {})
  get "#{KILLBILL_API_PAYMENTS_PREFIX}/#{payment_id}",
      {
          :withAttempts => with_attempts,
          :withPluginInfo => with_plugin_info
      },
      options
end

.find_by_transaction_id(transaction_id, with_plugin_info = false, with_attempts = false, options = {}) ⇒ Object



37
38
39
40
41
42
43
44
# File 'lib/killbill_client/models/payment.rb', line 37

def find_by_transaction_id(transaction_id, with_plugin_info = false, with_attempts = false, options = {})
  get "#{Transaction::KILLBILL_API_TRANSACTIONS_PREFIX}/#{transaction_id}",
      {
          :withAttempts => with_attempts,
          :withPluginInfo => with_plugin_info
      },
      options
end

.find_in_batches(offset = 0, limit = 100, options = {}) ⇒ Object



46
47
48
49
50
51
52
53
# File 'lib/killbill_client/models/payment.rb', line 46

def find_in_batches(offset = 0, limit = 100, options = {})
  get "#{KILLBILL_API_PAYMENTS_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
      {
          :offset => offset,
          :limit  => limit
      },
      options
end

.find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {}) ⇒ Object



55
56
57
58
59
60
61
62
# File 'lib/killbill_client/models/payment.rb', line 55

def find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {})
  get "#{KILLBILL_API_PAYMENTS_PREFIX}/search/#{search_key}",
      {
          :offset => offset,
          :limit  => limit
      },
      options
end