mastercard_qkr 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mastercard/api/qkr/auth.rb +130 -0
- data/lib/mastercard/api/qkr/beneficiary.rb +166 -0
- data/lib/mastercard/api/qkr/{pospayment.rb → beneficiarycustomfield.rb} +33 -32
- data/lib/mastercard/api/qkr/card.rb +102 -102
- data/lib/mastercard/api/qkr/cart.rb +82 -82
- data/lib/mastercard/api/qkr/cartitem.rb +71 -71
- data/lib/mastercard/api/qkr/country.rb +53 -53
- data/lib/mastercard/api/qkr/creditnote.rb +116 -0
- data/lib/mastercard/api/qkr/externaltrans.rb +63 -63
- data/lib/mastercard/api/qkr/forgottenpassword.rb +32 -32
- data/lib/mastercard/api/qkr/form.rb +99 -0
- data/lib/mastercard/api/qkr/formsubmission.rb +104 -0
- data/lib/mastercard/api/qkr/lightbox.rb +53 -53
- data/lib/mastercard/api/qkr/machine.rb +43 -43
- data/lib/mastercard/api/qkr/menu.rb +32 -32
- data/lib/mastercard/api/qkr/merchant.rb +53 -53
- data/lib/mastercard/api/qkr/order.rb +92 -92
- data/lib/mastercard/api/qkr/orderahead.rb +32 -32
- data/lib/mastercard/api/qkr/orderaheadmenu.rb +32 -32
- data/lib/mastercard/api/qkr/ordercalendar.rb +99 -0
- data/lib/mastercard/api/qkr/orderslot.rb +32 -32
- data/lib/mastercard/api/qkr/ordertotal.rb +32 -32
- data/lib/mastercard/api/qkr/posorder.rb +42 -42
- data/lib/mastercard/api/qkr/pospaymentnotification.rb +32 -32
- data/lib/mastercard/api/qkr/prodgroup.rb +43 -43
- data/lib/mastercard/api/qkr/refund.rb +32 -32
- data/lib/mastercard/api/qkr/resendotp.rb +32 -32
- data/lib/mastercard/api/qkr/resourceconfig.rb +54 -54
- data/lib/mastercard/api/qkr/securityquestion.rb +32 -32
- data/lib/mastercard/api/qkr/trans.rb +73 -73
- data/lib/mastercard/api/qkr/updatepassword.rb +32 -32
- data/lib/mastercard/api/qkr/user.rb +52 -52
- data/lib/mastercard/api/qkr/{payment.rb → userimage.rb} +32 -32
- data/lib/mastercard/api/qkr/usersession.rb +32 -32
- data/lib/mastercard/api/qkr/vendingsession.rb +61 -61
- data/lib/mastercard/api/qkr/verifyotp.rb +32 -32
- data/lib/mastercard_qkr.rb +8 -2
- metadata +12 -6
@@ -30,65 +30,65 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module Qkr
|
35
|
+
class ProdGroup < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'79c6ec65-6573-4d37-9e52-ad88b7ea38a9' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/prodGroup/{id}", "read", [], []),
|
41
|
+
|
42
|
+
}
|
43
43
|
|
44
|
-
|
44
|
+
protected
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
public
|
58
58
|
|
59
59
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
64
|
+
def self.read(id, criteria = nil)
|
65
|
+
#
|
66
|
+
#Returns objects of type ProdGroup by id and optional criteria
|
67
|
+
#@param [String] id
|
68
|
+
#@param [Dict] criteria
|
69
|
+
#@return [ProdGroup] object representing the response
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
72
|
+
mapObj = ProdGroup.new
|
73
|
+
if !(id.nil? || id.to_s.empty?)
|
74
|
+
mapObj.set("id", id)
|
75
|
+
end
|
76
|
+
if !criteria.nil?
|
77
|
+
if criteria.instance_of? RequestMap
|
78
|
+
mapObj.setAll(criteria.getObject())
|
79
|
+
else
|
80
|
+
mapObj.setAll(criteria)
|
81
|
+
end
|
82
|
+
end
|
83
83
|
|
84
|
-
|
85
|
-
|
84
|
+
return self.execute("79c6ec65-6573-4d37-9e52-ad88b7ea38a9",ProdGroup.new(mapObj))
|
85
|
+
end
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
92
|
end
|
93
93
|
|
94
94
|
|
@@ -30,42 +30,42 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module Qkr
|
35
|
+
class Refund < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'6a5e4855-9152-4234-b6b7-80aaa3fc56be' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/refund", "create", [], []),
|
41
|
+
|
42
|
+
}
|
43
43
|
|
44
|
-
|
44
|
+
protected
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
public
|
58
58
|
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
def self.create(mapObj)
|
61
|
+
#
|
62
|
+
#Creates object of type Refund
|
63
|
+
#
|
64
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
+
#@return [Refund] of the response of created instance.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
return self.execute("6a5e4855-9152-4234-b6b7-80aaa3fc56be", Refund.new(mapObj))
|
68
|
+
end
|
69
69
|
|
70
70
|
|
71
71
|
|
@@ -73,9 +73,9 @@ module MasterCard
|
|
73
73
|
|
74
74
|
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
79
|
end
|
80
80
|
|
81
81
|
|
@@ -30,42 +30,42 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module Qkr
|
35
|
+
class ResendOTP < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'2653ef21-100b-4449-bae3-ca0ff1fba94e' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/resendOTP", "create", [], []),
|
41
|
+
|
42
|
+
}
|
43
43
|
|
44
|
-
|
44
|
+
protected
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
public
|
58
58
|
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
def self.create(mapObj)
|
61
|
+
#
|
62
|
+
#Creates object of type ResendOTP
|
63
|
+
#
|
64
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
+
#@return [ResendOTP] of the response of created instance.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
return self.execute("2653ef21-100b-4449-bae3-ca0ff1fba94e", ResendOTP.new(mapObj))
|
68
|
+
end
|
69
69
|
|
70
70
|
|
71
71
|
|
@@ -73,9 +73,9 @@ module MasterCard
|
|
73
73
|
|
74
74
|
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
79
|
end
|
80
80
|
|
81
81
|
|
@@ -29,76 +29,76 @@ require "mastercard/core/constants"
|
|
29
29
|
require "mastercard/core/config"
|
30
30
|
|
31
31
|
module MasterCard
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
module API
|
33
|
+
module Qkr
|
34
|
+
class ResourceConfig
|
35
|
+
include MasterCard::Core
|
36
36
|
|
37
|
-
|
37
|
+
@@instance = nil
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
def initialize
|
40
|
+
@override = nil
|
41
|
+
@host = nil
|
42
|
+
@context = nil
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
Config.registerResourceConfig(self)
|
45
|
+
currentEnvironment = Config.getEnvironment()
|
46
|
+
self.setEnvironment(currentEnvironment)
|
47
47
|
|
48
|
-
|
48
|
+
end
|
49
49
|
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
def self.instance
|
52
|
+
return @@instance
|
53
|
+
end
|
54
54
|
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
def getName
|
57
|
+
return "qkr"
|
58
|
+
end
|
59
59
|
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
def getHost
|
62
|
+
unless @override.nil? || @override == 0
|
63
|
+
return @override
|
64
|
+
else
|
65
|
+
return @host
|
66
|
+
end
|
67
|
+
end
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
def getContext
|
70
|
+
return @context
|
71
|
+
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
def getVersion
|
74
|
+
return "qkr:1.1.0"
|
75
|
+
end
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
def getJsonNative
|
78
|
+
return false
|
79
|
+
end
|
80
80
|
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
def getContentTypeOverride
|
82
|
+
return nil
|
83
|
+
end
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
85
|
+
def setEnvironment(environmet)
|
86
|
+
if Environment::MAPPING.key?(environmet)
|
87
|
+
tuple = Environment::MAPPING[environmet]
|
88
|
+
@host = tuple[0]
|
89
|
+
@context = tuple[1]
|
90
|
+
end
|
91
|
+
end
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
def setCustomEnvironment(host,context)
|
94
|
+
@host = host
|
95
|
+
@context = context
|
96
|
+
end
|
97
97
|
|
98
|
-
|
98
|
+
@@instance = ResourceConfig.new
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
private_class_method :new
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
104
|
end
|
@@ -30,31 +30,31 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module Qkr
|
35
|
+
class SecurityQuestion < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'de899493-c582-4439-ba10-5dac1da870f7' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/securityQuestion", "query", [], []),
|
41
|
+
|
42
|
+
}
|
43
43
|
|
44
|
-
|
44
|
+
protected
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
public
|
58
58
|
|
59
59
|
|
60
60
|
|
@@ -62,21 +62,21 @@ module MasterCard
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
def self.query(criteria)
|
66
|
+
#
|
67
|
+
#Query objects of type SecurityQuestion by id and optional criteria
|
68
|
+
#@param [Dict] criteria
|
69
|
+
#@return [SecurityQuestion] object representing the response.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
#
|
72
72
|
|
73
|
-
|
74
|
-
|
73
|
+
return self.execute("de899493-c582-4439-ba10-5dac1da870f7",SecurityQuestion.new(criteria))
|
74
|
+
end
|
75
75
|
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
80
|
end
|
81
81
|
|
82
82
|
|