Sha256: 8345de9d88e6e55f144c44fe80ebfc1f1c6f52ac5375988e1d3f5ad94081b178

Contents?: true

Size: 459 Bytes

Versions: 14

Compression:

Stored size: 459 Bytes

Contents

module Ipizza
  class Request
    
    attr_accessor :extra_params
    attr_accessor :sign_params
    attr_accessor :service_url
    
    def sign(privkey_path, privkey_secret, order, mac_param = 'VK_MAC')
      signature = Ipizza::Util.sign(privkey_path, privkey_secret, Ipizza::Util.mac_data_string(sign_params, order))
      self.sign_params[mac_param] = signature
    end
    
    def request_params
      sign_params.merge(extra_params)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ipizza-1.0.0 lib/ipizza/request.rb
ipizza-0.7.1 lib/ipizza/request.rb
ipizza-0.6.1 lib/ipizza/request.rb
ipizza-0.5.5 lib/ipizza/request.rb
ipizza-0.5.4 lib/ipizza/request.rb
ipizza-0.5.3 lib/ipizza/request.rb
ipizza-0.5.2 lib/ipizza/request.rb
ipizza-0.5.1 lib/ipizza/request.rb
ipizza-0.5.0 lib/ipizza/request.rb
ipizza-0.4.4 lib/ipizza/request.rb
ipizza-0.4.3 lib/ipizza/request.rb
ipizza-0.4.2 lib/ipizza/request.rb
ipizza-0.4.1 lib/ipizza/request.rb
ipizza-0.4.0 lib/ipizza/request.rb