Class: KillBillClient::Model::Credit

Inherits:
CreditAttributes show all
Defined in:
lib/killbill_client/models/credit.rb

Constant Summary collapse

KILLBILL_API_CREDITS_PREFIX =
"#{KILLBILL_API_PREFIX}/credits"

Instance Method Summary collapse

Instance Method Details

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



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/killbill_client/models/credit.rb', line 7

def create(auto_commit = false, user = nil, reason = nil, comment = nil, options = {})
  created_credit = self.class.post KILLBILL_API_CREDITS_PREFIX,
                                        to_json,
                                        {
                                            :autoCommit => auto_commit
                                        },
                                        {
                                            :user => user,
                                            :reason => reason,
                                            :comment => comment,
                                        }.merge(options)
  created_credit.refresh(options)
end