Module: Post
- Included in:
- Culqi::Card, Culqi::Charge, Culqi::Customer, Culqi::Plan, Culqi::Refund, Culqi::Subscription, Culqi::Token
- 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 |
# 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 |
#initialize ⇒ Object
5 6 7 |
# File 'lib/operation/post.rb', line 5 def initialize @url = '' end |