Module: Culqi::Update
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
5 6 7 |
# File 'lib/operation/update.rb', line 5 def initialize @url = '' end |
#update(id, params = {}, rsa_key = '', rsa_id = '') ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/operation/update.rb', line 9 def update(id, params={}, rsa_key='', rsa_id='') if(rsa_key != '') params = Encrypt.encrypt_with_aes_rsa(params, rsa_key, true) end response, statusCode = Culqi.connect("#{@url}#{id}/", Culqi.secret_key, params, 'patch', Culqi::READ_TIMEOUT, rsa_id) return response, statusCode end |