Class: Conekta::Checkout

Inherits:
Resource show all
Includes:
Operations::Create, Operations::CustomAction, Operations::Find, Operations::Where
Defined in:
lib/conekta/checkout.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Attributes inherited from ConektaObject

#values

Instance Method Summary collapse

Methods included from Operations::CustomAction

#custom_action

Methods included from Operations::Find

included

Methods included from Operations::Where

handle_type_of_paging, included

Methods included from Operations::Create

included

Methods inherited from Resource

_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

#_idObject

Returns the value of attribute _id.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def _id
  @_id
end

#allowed_payment_methodsObject

Returns the value of attribute allowed_payment_methods.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def allowed_payment_methods
  @allowed_payment_methods
end

#company_idObject

Returns the value of attribute company_id.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def company_id
  @company_id
end

#emails_sentObject

Returns the value of attribute emails_sent.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def emails_sent
  @emails_sent
end

#entity_idObject

Returns the value of attribute entity_id.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def entity_id
  @entity_id
end

#expires_atObject

Returns the value of attribute expires_at.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def expires_at
  @expires_at
end

#is_redirect_on_failureObject

Returns the value of attribute is_redirect_on_failure.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def is_redirect_on_failure
  @is_redirect_on_failure
end

#livemodeObject

Returns the value of attribute livemode.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def livemode
  @livemode
end

#monthly_installments_enabledObject

Returns the value of attribute monthly_installments_enabled.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def monthly_installments_enabled
  @monthly_installments_enabled
end

#monthly_installments_optionsObject

Returns the value of attribute monthly_installments_options.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def monthly_installments_options
  @monthly_installments_options
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def name
  @name
end

#needs_shipping_contactObject

Returns the value of attribute needs_shipping_contact.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def needs_shipping_contact
  @needs_shipping_contact
end

#on_demand_enabledObject

Returns the value of attribute on_demand_enabled.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def on_demand_enabled
  @on_demand_enabled
end

Returns the value of attribute paid_payments_count.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def paid_payments_count
  @paid_payments_count
end

#payments_limit_countObject

Returns the value of attribute payments_limit_count.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def payments_limit_count
  @payments_limit_count
end

#recurrentObject

Returns the value of attribute recurrent.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def recurrent
  @recurrent
end

#returns_control_onObject

Returns the value of attribute returns_control_on.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def returns_control_on
  @returns_control_on
end

#slugObject

Returns the value of attribute slug.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def slug
  @slug
end

#sms_sentObject

Returns the value of attribute sms_sent.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def sms_sent
  @sms_sent
end

#statusObject

Returns the value of attribute status.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def status
  @status
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def type
  @type
end

#urlObject

Returns the value of attribute url.



8
9
10
# File 'lib/conekta/checkout.rb', line 8

def url
  @url
end

Instance Method Details

#_urlObject



17
18
19
20
21
# File 'lib/conekta/checkout.rb', line 17

def _url
  ensure_id

  "/checkouts/#{id}"
end

#cancel(params = {}) ⇒ Object



31
32
33
# File 'lib/conekta/checkout.rb', line 31

def cancel(params = {})
  custom_action(:put, "cancel", params)
end

#send_email(params = {}) ⇒ Object



27
28
29
# File 'lib/conekta/checkout.rb', line 27

def send_email(params = {})
  custom_action(:post, "email", params)
end

#send_sms(params = {}) ⇒ Object



23
24
25
# File 'lib/conekta/checkout.rb', line 23

def send_sms(params = {})
  custom_action(:post, "sms", params)
end