Class: Ipizza::Request
- Inherits:
-
Object
- Object
- Ipizza::Request
- Defined in:
- lib/ipizza/request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#extra_params ⇒ Object
Returns the value of attribute extra_params.
-
#service_url ⇒ Object
Returns the value of attribute service_url.
-
#sign_params ⇒ Object
Returns the value of attribute sign_params.
Instance Method Summary collapse
Instance Attribute Details
#extra_params ⇒ Object
Returns the value of attribute extra_params.
4 5 6 |
# File 'lib/ipizza/request.rb', line 4 def extra_params @extra_params end |
#service_url ⇒ Object
Returns the value of attribute service_url.
6 7 8 |
# File 'lib/ipizza/request.rb', line 6 def service_url @service_url end |
#sign_params ⇒ Object
Returns the value of attribute sign_params.
5 6 7 |
# File 'lib/ipizza/request.rb', line 5 def sign_params @sign_params end |
Instance Method Details
#request_params ⇒ Object
13 14 15 |
# File 'lib/ipizza/request.rb', line 13 def request_params sign_params.merge(extra_params) end |
#sign(privkey_path, privkey_secret, order, mac_param = 'VK_MAC') ⇒ Object
8 9 10 11 |
# File 'lib/ipizza/request.rb', line 8 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 |