mastercard_qkr 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mastercard/api/qkr/card.rb +16 -16
  3. data/lib/mastercard/api/qkr/cart.rb +12 -12
  4. data/lib/mastercard/api/qkr/cartitem.rb +12 -12
  5. data/lib/mastercard/api/qkr/country.rb +9 -9
  6. data/lib/mastercard/api/qkr/externaltrans.rb +11 -11
  7. data/lib/mastercard/api/qkr/forgottenpassword.rb +7 -7
  8. data/lib/mastercard/api/qkr/lightbox.rb +9 -9
  9. data/lib/mastercard/api/qkr/machine.rb +99 -0
  10. data/lib/mastercard/api/qkr/menu.rb +7 -7
  11. data/lib/mastercard/api/qkr/merchant.rb +9 -9
  12. data/lib/mastercard/api/qkr/order.rb +14 -14
  13. data/lib/mastercard/api/qkr/orderahead.rb +7 -7
  14. data/lib/mastercard/api/qkr/orderaheadmenu.rb +7 -7
  15. data/lib/mastercard/api/qkr/orderslot.rb +7 -7
  16. data/lib/mastercard/api/qkr/ordertotal.rb +7 -7
  17. data/lib/mastercard/api/qkr/payment.rb +7 -7
  18. data/lib/mastercard/api/qkr/posorder.rb +104 -0
  19. data/lib/mastercard/api/qkr/pospayment.rb +7 -7
  20. data/lib/mastercard/api/qkr/pospaymentnotification.rb +7 -7
  21. data/lib/mastercard/api/qkr/prodgroup.rb +7 -7
  22. data/lib/mastercard/api/qkr/refund.rb +7 -7
  23. data/lib/mastercard/api/qkr/resendotp.rb +7 -7
  24. data/lib/mastercard/api/qkr/resourceconfig.rb +7 -6
  25. data/lib/mastercard/api/qkr/securityquestion.rb +7 -7
  26. data/lib/mastercard/api/qkr/trans.rb +13 -13
  27. data/lib/mastercard/api/qkr/updatepassword.rb +7 -7
  28. data/lib/mastercard/api/qkr/user.rb +11 -11
  29. data/lib/mastercard/api/qkr/usersession.rb +7 -7
  30. data/lib/mastercard/api/qkr/vendingsession.rb +130 -0
  31. data/lib/mastercard/api/qkr/verifyotp.rb +7 -7
  32. data/lib/mastercard_qkr.rb +3 -0
  33. metadata +5 -2
@@ -0,0 +1,130 @@
1
+ #
2
+ # Copyright (c) 2016 MasterCard International Incorporated
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification, are
6
+ # permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list of
9
+ # conditions and the following disclaimer.
10
+ # Redistributions in binary form must reproduce the above copyright notice, this list of
11
+ # conditions and the following disclaimer in the documentation and/or other materials
12
+ # provided with the distribution.
13
+ # Neither the name of the MasterCard International Incorporated nor the names of its
14
+ # contributors may be used to endorse or promote products derived from this software
15
+ # without specific prior written permission.
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
+ # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
+ # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
+ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
+ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
+ # SUCH DAMAGE.
26
+ #
27
+
28
+
29
+ require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
31
+
32
+ module MasterCard
33
+ module API
34
+ module Qkr
35
+ class VendingSession < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '39746855-f9be-45d2-a224-f0f64594f6ff' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/vendingSession", "create", ["X-Auth-Token"], []),
41
+ 'fe75af9f-9e21-47ee-9616-ba26123cf90c' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/vendingSession/{id}", "delete", ["X-Auth-Token"], []),
42
+
43
+ }
44
+
45
+ protected
46
+
47
+ def self.getOperationConfig(operationUUID)
48
+ if @__store.key?(operationUUID)
49
+ return @__store[operationUUID]
50
+ end
51
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
52
+ end
53
+
54
+ def self.getOperationMetadata()
55
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
56
+ end
57
+
58
+ public
59
+
60
+
61
+ def self.create(mapObj)
62
+ #
63
+ #Creates object of type VendingSession
64
+ #
65
+ #@param Dict mapObj, containing the required parameters to create a new object
66
+ #@return [VendingSession] of the response of created instance.
67
+ #@raise [APIException] an exception from the response status
68
+ return self.execute("39746855-f9be-45d2-a224-f0f64594f6ff", VendingSession.new(mapObj))
69
+ end
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ def self.deleteById(id, map = nil)
81
+ #Delete object of type VendingSession by id
82
+
83
+ #@param [String] id
84
+ #@param [Dict] map, containing additional parameters
85
+ #@return [VendingSession] of the response of the deleted instance.
86
+ #@raise [APIException] an exception from the response status
87
+
88
+
89
+ mapObj = VendingSession.new
90
+ if !(id.nil? || id.to_s.empty?)
91
+ mapObj.set("id", id)
92
+ end
93
+ if !map.nil?
94
+ if map.instance_of? RequestMap
95
+ mapObj.setAll(map.getObject())
96
+ else
97
+ mapObj.setAll(map)
98
+ end
99
+ end
100
+
101
+ return self.execute("fe75af9f-9e21-47ee-9616-ba26123cf90c", mapObj)
102
+ end
103
+
104
+
105
+ def delete
106
+ #
107
+ #Delete object of type VendingSession
108
+
109
+ #@param [String] id
110
+ #@return [VendingSession] of the response of the deleted instance.
111
+ #@raise [APIException] an exception from the response status
112
+ #
113
+
114
+ return self.class.execute("fe75af9f-9e21-47ee-9616-ba26123cf90c", self)
115
+ end
116
+
117
+
118
+
119
+
120
+ end
121
+ end
122
+ end
123
+ end
124
+
125
+
126
+
127
+
128
+
129
+
130
+
@@ -37,21 +37,21 @@ module MasterCard
37
37
  #
38
38
 
39
39
  @__store = {
40
- 'e79dc2f7-3908-4809-8317-150491f0b878' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/verifyOTP", "update", [], []),
40
+ '2547039c-baec-4c47-98a4-36b380150e60' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/verifyOTP", "update", [], []),
41
41
 
42
42
  }
43
43
 
44
44
  protected
45
45
 
46
- def self.getOperationConfig(uuid)
47
- if @__store.key?(uuid)
48
- return @__store[uuid]
46
+ def self.getOperationConfig(operationUUID)
47
+ if @__store.key?(operationUUID)
48
+ return @__store[operationUUID]
49
49
  end
50
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
51
51
  end
52
52
 
53
53
  def self.getOperationMetadata()
54
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
55
55
  end
56
56
 
57
57
  public
@@ -65,7 +65,7 @@ module MasterCard
65
65
  #@return [VerifyOTP] object representing the response.
66
66
  #@raise [APIException] an exception from the response status
67
67
  #
68
- return self.class.execute("e79dc2f7-3908-4809-8317-150491f0b878",self)
68
+ return self.class.execute("2547039c-baec-4c47-98a4-36b380150e60",self)
69
69
  end
70
70
 
71
71
 
@@ -9,6 +9,7 @@ require 'mastercard/api/qkr/country'
9
9
  require 'mastercard/api/qkr/externaltrans'
10
10
  require 'mastercard/api/qkr/forgottenpassword'
11
11
  require 'mastercard/api/qkr/lightbox'
12
+ require 'mastercard/api/qkr/machine'
12
13
  require 'mastercard/api/qkr/menu'
13
14
  require 'mastercard/api/qkr/merchant'
14
15
  require 'mastercard/api/qkr/order'
@@ -17,6 +18,7 @@ require 'mastercard/api/qkr/orderaheadmenu'
17
18
  require 'mastercard/api/qkr/orderslot'
18
19
  require 'mastercard/api/qkr/ordertotal'
19
20
  require 'mastercard/api/qkr/payment'
21
+ require 'mastercard/api/qkr/posorder'
20
22
  require 'mastercard/api/qkr/pospayment'
21
23
  require 'mastercard/api/qkr/pospaymentnotification'
22
24
  require 'mastercard/api/qkr/prodgroup'
@@ -27,4 +29,5 @@ require 'mastercard/api/qkr/trans'
27
29
  require 'mastercard/api/qkr/updatepassword'
28
30
  require 'mastercard/api/qkr/user'
29
31
  require 'mastercard/api/qkr/usersession'
32
+ require 'mastercard/api/qkr/vendingsession'
30
33
  require 'mastercard/api/qkr/verifyotp'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastercard_qkr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - MasterCard Worldwide
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-12 00:00:00.000000000 Z
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mastercard_api_core
@@ -58,6 +58,7 @@ files:
58
58
  - lib/mastercard/api/qkr/externaltrans.rb
59
59
  - lib/mastercard/api/qkr/forgottenpassword.rb
60
60
  - lib/mastercard/api/qkr/lightbox.rb
61
+ - lib/mastercard/api/qkr/machine.rb
61
62
  - lib/mastercard/api/qkr/menu.rb
62
63
  - lib/mastercard/api/qkr/merchant.rb
63
64
  - lib/mastercard/api/qkr/order.rb
@@ -66,6 +67,7 @@ files:
66
67
  - lib/mastercard/api/qkr/orderslot.rb
67
68
  - lib/mastercard/api/qkr/ordertotal.rb
68
69
  - lib/mastercard/api/qkr/payment.rb
70
+ - lib/mastercard/api/qkr/posorder.rb
69
71
  - lib/mastercard/api/qkr/pospayment.rb
70
72
  - lib/mastercard/api/qkr/pospaymentnotification.rb
71
73
  - lib/mastercard/api/qkr/prodgroup.rb
@@ -77,6 +79,7 @@ files:
77
79
  - lib/mastercard/api/qkr/updatepassword.rb
78
80
  - lib/mastercard/api/qkr/user.rb
79
81
  - lib/mastercard/api/qkr/usersession.rb
82
+ - lib/mastercard/api/qkr/vendingsession.rb
80
83
  - lib/mastercard/api/qkr/verifyotp.rb
81
84
  - lib/mastercard_qkr.rb
82
85
  homepage: https://developer.mastercard.com