Class: ChargeBee::HostedPage

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

Defined Under Namespace

Classes: Content

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

construct, #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

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#embedObject

Returns the value of attribute embed.



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

def embed
  @embed
end

#expires_atObject

Returns the value of attribute expires_at.



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

def expires_at
  @expires_at
end

#failure_reasonObject

Returns the value of attribute failure_reason.



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

def failure_reason
  @failure_reason
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#pass_thru_contentObject

Returns the value of attribute pass_thru_content.



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

def pass_thru_content
  @pass_thru_content
end

#stateObject

Returns the value of attribute state.



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

def state
  @state
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end

Class Method Details

.checkout_existing(params, env = nil) ⇒ Object



25
26
27
# File 'lib/chargebee/models/hosted_page.rb', line 25

def self.checkout_existing(params, env=nil)
  Request.send('post', uri_path("hosted_pages","checkout_existing"), params, env)
end

.checkout_new(params, env = nil) ⇒ Object

OPERATIONS




21
22
23
# File 'lib/chargebee/models/hosted_page.rb', line 21

def self.checkout_new(params, env=nil)
  Request.send('post', uri_path("hosted_pages","checkout_new"), params, env)
end

.checkout_onetime_addons(params, env = nil) ⇒ Object



37
38
39
# File 'lib/chargebee/models/hosted_page.rb', line 37

def self.checkout_onetime_addons(params, env=nil)
  Request.send('post', uri_path("hosted_pages","checkout_onetime_addons"), params, env)
end

.checkout_onetime_charge(params, env = nil) ⇒ Object



33
34
35
# File 'lib/chargebee/models/hosted_page.rb', line 33

def self.checkout_onetime_charge(params, env=nil)
  Request.send('post', uri_path("hosted_pages","checkout_onetime_charge"), params, env)
end

.retrieve(id, env = nil) ⇒ Object



41
42
43
# File 'lib/chargebee/models/hosted_page.rb', line 41

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

.update_card(params, env = nil) ⇒ Object



29
30
31
# File 'lib/chargebee/models/hosted_page.rb', line 29

def self.update_card(params, env=nil)
  Request.send('post', uri_path("hosted_pages","update_card"), params, env)
end

Instance Method Details

#contentObject



10
11
12
13
14
15
16
# File 'lib/chargebee/models/hosted_page.rb', line 10

def content
  if @values[:content].nil?
      nil
  else
      Content.new(@values[:content])
  end
end