Class: Scribesend::Entry

Inherits:
APIResource show all
Defined in:
lib/scribesend/entry.rb

Class Method Summary collapse

Methods inherited from APIResource

all, class_name, #refresh, request, retrieve, #save, url, #url

Methods inherited from ScribesendObject

#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #serialize_nested_object, serialize_params, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from Scribesend::ScribesendObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Scribesend::ScribesendObject

Class Method Details

.create(params = {}, opts = {}) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/scribesend/entry.rb', line 3

def self.create(params={}, opts={})
  opts = {
    :content_type => 'application/json'
  }.merge(opts)

  response, opts = self.request(:post, url, params.to_json, opts)
  Util.convert_to_scribesend_object(response, opts)
end

.create_capture_entry(params, opts = {}) ⇒ Object



17
18
19
20
# File 'lib/scribesend/entry.rb', line 17

def self.create_capture_entry(params, opts={})
  response, opts = self.request(:post, url + "/capture", params, opts)
  Util.convert_to_scribesend_object(response, opts)
end

.create_charge_and_capture_entry(params, opts = {}) ⇒ Object



22
23
24
25
# File 'lib/scribesend/entry.rb', line 22

def self.create_charge_and_capture_entry(params, opts={})
  response, opts = self.request(:post, url + "/charge_and_capture", params, opts)
  Util.convert_to_scribesend_object(response, opts)
end

.create_charge_entry(params, opts = {}) ⇒ Object



12
13
14
15
# File 'lib/scribesend/entry.rb', line 12

def self.create_charge_entry(params, opts={})
  response, opts = self.request(:post, url + "/charge", params, opts)
  Util.convert_to_scribesend_object(response, opts)
end