Module: Post

Instance Method Summary collapse

Instance Method Details

#create(params = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/operation/post.rb', line 9

def create(params={})
  key = ''
  if @url.include? 'token'
    key = Culqi.public_key
  else
    key = Culqi.secret_key
  end
  response = Culqi.connect(@url, key, params, 'post', Culqi::READ_TIMEOUT)
  return response.read_body
end

#initializeObject



5
6
7
# File 'lib/operation/post.rb', line 5

def initialize
  @url = ''
end