Class: Conekta::Charge
- Inherits:
-
Resource
- Object
- Hash
- ConektaObject
- Resource
- Conekta::Charge
- Defined in:
- lib/conekta/charge.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#amount_in_foreign_currency ⇒ Object
Returns the value of attribute amount_in_foreign_currency.
-
#checkout_id ⇒ Object
Returns the value of attribute checkout_id.
-
#checkout_order_count ⇒ Object
Returns the value of attribute checkout_order_count.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#device_fingerprint ⇒ Object
Returns the value of attribute device_fingerprint.
-
#exchange_rate ⇒ Object
Returns the value of attribute exchange_rate.
-
#failure_code ⇒ Object
Returns the value of attribute failure_code.
-
#failure_message ⇒ Object
Returns the value of attribute failure_message.
-
#fee ⇒ Object
Returns the value of attribute fee.
-
#foreign_currency ⇒ Object
Returns the value of attribute foreign_currency.
-
#livemode ⇒ Object
Returns the value of attribute livemode.
-
#monthly_installments ⇒ Object
Returns the value of attribute monthly_installments.
-
#reference_id ⇒ Object
Returns the value of attribute reference_id.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from Resource
Attributes inherited from ConektaObject
Instance Method Summary collapse
Methods included from Operations::CustomAction
Methods included from Operations::Create
Methods included from Operations::Where
handle_type_of_paging, included
Methods included from Operations::Find
Methods inherited from Resource
#_url, _url, #create_member_with_relation, #initialize, underscored_class
Methods inherited from ConektaObject
#class_name, class_name, #create_attr, #first, #initialize, #inspect, #last, #load_from, #set_val, #to_s, #unset_key
Constructor Details
This class inherits a constructor from Conekta::Resource
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def amount @amount end |
#amount_in_foreign_currency ⇒ Object
Returns the value of attribute amount_in_foreign_currency.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def amount_in_foreign_currency @amount_in_foreign_currency end |
#checkout_id ⇒ Object
Returns the value of attribute checkout_id.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def checkout_id @checkout_id end |
#checkout_order_count ⇒ Object
Returns the value of attribute checkout_order_count.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def checkout_order_count @checkout_order_count end |
#created_at ⇒ Object
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def created_at @created_at end |
#currency ⇒ Object
Returns the value of attribute currency.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def description @description end |
#device_fingerprint ⇒ Object
Returns the value of attribute device_fingerprint.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def device_fingerprint @device_fingerprint end |
#exchange_rate ⇒ Object
Returns the value of attribute exchange_rate.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def exchange_rate @exchange_rate end |
#failure_code ⇒ Object
Returns the value of attribute failure_code.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def failure_code @failure_code end |
#failure_message ⇒ Object
Returns the value of attribute failure_message.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def @failure_message end |
#fee ⇒ Object
Returns the value of attribute fee.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def fee @fee end |
#foreign_currency ⇒ Object
Returns the value of attribute foreign_currency.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def foreign_currency @foreign_currency end |
#livemode ⇒ Object
Returns the value of attribute livemode.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def livemode @livemode end |
#monthly_installments ⇒ Object
Returns the value of attribute monthly_installments.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def monthly_installments @monthly_installments end |
#reference_id ⇒ Object
Returns the value of attribute reference_id.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def reference_id @reference_id end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/conekta/charge.rb', line 8 def status @status end |
Instance Method Details
#capture ⇒ Object
14 15 16 |
# File 'lib/conekta/charge.rb', line 14 def capture custom_action(:post, 'capture') end |
#refund(params = nil) ⇒ Object
17 18 19 20 |
# File 'lib/conekta/charge.rb', line 17 def refund(params=nil) params = { 'amount' => (params || self.amount) } custom_action(:post, 'refund', params) end |