Class: ChargeBee::PromotionalCredit

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/promotional_credit.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #to_s, uri_path

Constructor Details

This class inherits a constructor from ChargeBee::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ChargeBee::Model

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def amount
  @amount
end

#amount_in_decimalObject

Returns the value of attribute amount_in_decimal.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def amount_in_decimal
  @amount_in_decimal
end

#closing_balanceObject

Returns the value of attribute closing_balance.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def closing_balance
  @closing_balance
end

#created_atObject

Returns the value of attribute created_at.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def created_at
  @created_at
end

#credit_typeObject

Returns the value of attribute credit_type.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def credit_type
  @credit_type
end

#currency_codeObject

Returns the value of attribute currency_code.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def currency_code
  @currency_code
end

#customer_idObject

Returns the value of attribute customer_id.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def customer_id
  @customer_id
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def description
  @description
end

#done_byObject

Returns the value of attribute done_by.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def done_by
  @done_by
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def id
  @id
end

#referenceObject

Returns the value of attribute reference.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def reference
  @reference
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/chargebee/models/promotional_credit.rb', line 4

def type
  @type
end

Class Method Details

.add(params, env = nil, headers = {}) ⇒ Object

OPERATIONS




10
11
12
# File 'lib/chargebee/models/promotional_credit.rb', line 10

def self.add(params, env=nil, headers={})
  Request.send('post', uri_path("promotional_credits","add"), params, env, headers)
end

.deduct(params, env = nil, headers = {}) ⇒ Object



14
15
16
# File 'lib/chargebee/models/promotional_credit.rb', line 14

def self.deduct(params, env=nil, headers={})
  Request.send('post', uri_path("promotional_credits","deduct"), params, env, headers)
end

.list(params = {}, env = nil, headers = {}) ⇒ Object



22
23
24
# File 'lib/chargebee/models/promotional_credit.rb', line 22

def self.list(params={}, env=nil, headers={})
  Request.send_list_request('get', uri_path("promotional_credits"), params, env, headers)
end

.retrieve(id, env = nil, headers = {}) ⇒ Object



26
27
28
# File 'lib/chargebee/models/promotional_credit.rb', line 26

def self.retrieve(id, env=nil, headers={})
  Request.send('get', uri_path("promotional_credits",id.to_s), {}, env, headers)
end

.set(params, env = nil, headers = {}) ⇒ Object



18
19
20
# File 'lib/chargebee/models/promotional_credit.rb', line 18

def self.set(params, env=nil, headers={})
  Request.send('post', uri_path("promotional_credits","set"), params, env, headers)
end