Class: KillBillClient::Model::Chargeback

Inherits:
ChargebackAttributes show all
Defined in:
lib/killbill_client/models/chargeback.rb

Constant Summary collapse

KILLBILL_API_CHARGEBACKS_PREFIX =
"#{KILLBILL_API_PREFIX}/chargebacks"

Constants inherited from Resource

Resource::KILLBILL_API_PREFIX

Instance Attribute Summary

Attributes inherited from Resource

#etag, #response, #session_id, #uri

Instance Method Summary collapse

Methods inherited from Resource

attribute, create_alias, delete, extract_session_id, from_json, from_response, get, has_many, has_one, head, instantiate_record_from_json, post, put, #refresh, #to_hash, #to_json

Instance Method Details

#create(user = nil, reason = nil, comment = nil, options = {}) ⇒ Object

Missing id in the Kill Bill server Refund resource

class << self
  def find_by_id(, with_balance = false, with_balance_and_cba = false, options = {})
    get "#{KILLBILL_API_CHARGEBACKS_PREFIX}/#{}",
        {
            :accountWithBalance => with_balance,
            :accountWithBalanceAndCBA => with_balance_and_cba
        },
        options
  end
end


22
23
24
25
26
27
28
29
30
31
32
# File 'lib/killbill_client/models/chargeback.rb', line 22

def create(user = nil, reason = nil, comment = nil, options = {})
  created_chargeback = self.class.post KILLBILL_API_CHARGEBACKS_PREFIX,
                                    to_json,
                                    {},
                                    {
                                        :user => user,
                                        :reason => reason,
                                        :comment => comment,
                                    }.merge(options)
  created_chargeback.refresh(options)
end