Module: Culqi::Post
- Defined in:
- lib/operation/post.rb
Instance Method Summary collapse
Instance Method Details
#create(params = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/operation/post.rb', line 9 def create(params={}) key = '' if @url.include? 'token' key = Culqi.public_key response = Culqi.connect(@url, key, params, 'post', Culqi::READ_TIMEOUT, true) return response.read_body else key = Culqi.secret_key response = Culqi.connect(@url, key, params, 'post', Culqi::READ_TIMEOUT) return response.read_body end end |
#initialize ⇒ Object
5 6 7 |
# File 'lib/operation/post.rb', line 5 def initialize @url = '' end |