Module: Culqi::Update
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
6 7 8 |
# File 'lib/operation/update.rb', line 6 def initialize @url = '' end |
#update(id, params = {}, rsa_key = '', rsa_id = '') ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/operation/update.rb', line 10 def update(id, params={}, rsa_key='', rsa_id='') error = verifyClassValidationGet(@url, id) if error return error end 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 |