Sha256: 684919e178cb5704e431211948f791311e9a95da33e708a681cf4f18369d58c5
Contents?: true
Size: 1.27 KB
Versions: 12
Compression:
Stored size: 1.27 KB
Contents
module Iyzipay module Model class Card < IyzipayResource def create(request = {}, options) pki_string = to_pki_string_create(request) HttpClient.post("#{options.base_url}/cardstorage/card", get_http_header(pki_string, options), request.to_json) end def delete(request = {}, options) pki_string = to_pki_string_delete(request) HttpClient.delete("#{options.base_url}/cardstorage/card", get_http_header(pki_string, options), request.to_json) end def to_pki_string_create(request) PkiBuilder.new. append(:locale, request[:locale]). append(:conversationId, request[:conversationId]). append(:externalId, request[:externalId]). append(:email, request[:email]). append(:cardUserKey, request[:cardUserKey]). append(:card, CardInformation.to_pki_string(request[:card])). get_request_string end def to_pki_string_delete(request) PkiBuilder.new. append(:locale, request[:locale]). append(:conversationId, request[:conversationId]). append(:cardUserKey, request[:cardUserKey]). append(:cardToken, request[:cardToken]). get_request_string end end end end
Version data entries
12 entries across 12 versions & 4 rubygems