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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mastercard/api/qkr/auth.rb +130 -0
  3. data/lib/mastercard/api/qkr/beneficiary.rb +166 -0
  4. data/lib/mastercard/api/qkr/{pospayment.rb → beneficiarycustomfield.rb} +33 -32
  5. data/lib/mastercard/api/qkr/card.rb +102 -102
  6. data/lib/mastercard/api/qkr/cart.rb +82 -82
  7. data/lib/mastercard/api/qkr/cartitem.rb +71 -71
  8. data/lib/mastercard/api/qkr/country.rb +53 -53
  9. data/lib/mastercard/api/qkr/creditnote.rb +116 -0
  10. data/lib/mastercard/api/qkr/externaltrans.rb +63 -63
  11. data/lib/mastercard/api/qkr/forgottenpassword.rb +32 -32
  12. data/lib/mastercard/api/qkr/form.rb +99 -0
  13. data/lib/mastercard/api/qkr/formsubmission.rb +104 -0
  14. data/lib/mastercard/api/qkr/lightbox.rb +53 -53
  15. data/lib/mastercard/api/qkr/machine.rb +43 -43
  16. data/lib/mastercard/api/qkr/menu.rb +32 -32
  17. data/lib/mastercard/api/qkr/merchant.rb +53 -53
  18. data/lib/mastercard/api/qkr/order.rb +92 -92
  19. data/lib/mastercard/api/qkr/orderahead.rb +32 -32
  20. data/lib/mastercard/api/qkr/orderaheadmenu.rb +32 -32
  21. data/lib/mastercard/api/qkr/ordercalendar.rb +99 -0
  22. data/lib/mastercard/api/qkr/orderslot.rb +32 -32
  23. data/lib/mastercard/api/qkr/ordertotal.rb +32 -32
  24. data/lib/mastercard/api/qkr/posorder.rb +42 -42
  25. data/lib/mastercard/api/qkr/pospaymentnotification.rb +32 -32
  26. data/lib/mastercard/api/qkr/prodgroup.rb +43 -43
  27. data/lib/mastercard/api/qkr/refund.rb +32 -32
  28. data/lib/mastercard/api/qkr/resendotp.rb +32 -32
  29. data/lib/mastercard/api/qkr/resourceconfig.rb +54 -54
  30. data/lib/mastercard/api/qkr/securityquestion.rb +32 -32
  31. data/lib/mastercard/api/qkr/trans.rb +73 -73
  32. data/lib/mastercard/api/qkr/updatepassword.rb +32 -32
  33. data/lib/mastercard/api/qkr/user.rb +52 -52
  34. data/lib/mastercard/api/qkr/{payment.rb → userimage.rb} +32 -32
  35. data/lib/mastercard/api/qkr/usersession.rb +32 -32
  36. data/lib/mastercard/api/qkr/vendingsession.rb +61 -61
  37. data/lib/mastercard/api/qkr/verifyotp.rb +32 -32
  38. data/lib/mastercard_qkr.rb +8 -2
  39. metadata +12 -6
@@ -30,65 +30,65 @@ require "mastercard/core/model"
30
30
  require "mastercard/core/baseobject"
31
31
 
32
32
  module MasterCard
33
- module API
34
- module Qkr
35
- class ProdGroup < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Qkr
35
+ class ProdGroup < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- 'e3939bd9-4d04-4613-a523-d2ab1f00982b' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/prodGroup/{id}", "read", [], []),
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
- protected
44
+ protected
45
45
 
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
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
- def self.getOperationMetadata()
54
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
55
- end
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
- public
57
+ public
58
58
 
59
59
 
60
60
 
61
61
 
62
62
 
63
63
 
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
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
- 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
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
- return self.execute("e3939bd9-4d04-4613-a523-d2ab1f00982b",ProdGroup.new(mapObj))
85
- end
84
+ return self.execute("79c6ec65-6573-4d37-9e52-ad88b7ea38a9",ProdGroup.new(mapObj))
85
+ end
86
86
 
87
87
 
88
88
 
89
- end
90
- end
91
- end
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
- module API
34
- module Qkr
35
- class Refund < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Qkr
35
+ class Refund < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- 'dd26de38-0820-4078-8e9b-6c1010f79b3c' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/refund", "create", [], []),
41
-
42
- }
39
+ @__store = {
40
+ '6a5e4855-9152-4234-b6b7-80aaa3fc56be' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/refund", "create", [], []),
41
+
42
+ }
43
43
 
44
- protected
44
+ protected
45
45
 
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
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
- def self.getOperationMetadata()
54
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
55
- end
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
- public
57
+ public
58
58
 
59
59
 
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("dd26de38-0820-4078-8e9b-6c1010f79b3c", Refund.new(mapObj))
68
- end
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
- end
77
- end
78
- end
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
- module API
34
- module Qkr
35
- class ResendOTP < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Qkr
35
+ class ResendOTP < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- '31d2bc2f-85ae-4e66-a5d9-897f89077e5c' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/resendOTP", "create", [], []),
41
-
42
- }
39
+ @__store = {
40
+ '2653ef21-100b-4449-bae3-ca0ff1fba94e' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/resendOTP", "create", [], []),
41
+
42
+ }
43
43
 
44
- protected
44
+ protected
45
45
 
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
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
- def self.getOperationMetadata()
54
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
55
- end
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
- public
57
+ public
58
58
 
59
59
 
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("31d2bc2f-85ae-4e66-a5d9-897f89077e5c", ResendOTP.new(mapObj))
68
- end
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
- end
77
- end
78
- end
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
- module API
33
- module Qkr
34
- class ResourceConfig
35
- include MasterCard::Core
32
+ module API
33
+ module Qkr
34
+ class ResourceConfig
35
+ include MasterCard::Core
36
36
 
37
- @@instance = nil
37
+ @@instance = nil
38
38
 
39
- def initialize
40
- @override = nil
41
- @host = nil
42
- @context = nil
39
+ def initialize
40
+ @override = nil
41
+ @host = nil
42
+ @context = nil
43
43
 
44
- Config.registerResourceConfig(self)
45
- currentEnvironment = Config.getEnvironment()
46
- self.setEnvironment(currentEnvironment)
44
+ Config.registerResourceConfig(self)
45
+ currentEnvironment = Config.getEnvironment()
46
+ self.setEnvironment(currentEnvironment)
47
47
 
48
- end
48
+ end
49
49
 
50
50
 
51
- def self.instance
52
- return @@instance
53
- end
51
+ def self.instance
52
+ return @@instance
53
+ end
54
54
 
55
55
 
56
- def getName
57
- return "qkr"
58
- end
56
+ def getName
57
+ return "qkr"
58
+ end
59
59
 
60
60
 
61
- def getHost
62
- unless @override.nil? || @override == 0
63
- return @override
64
- else
65
- return @host
66
- end
67
- end
61
+ def getHost
62
+ unless @override.nil? || @override == 0
63
+ return @override
64
+ else
65
+ return @host
66
+ end
67
+ end
68
68
 
69
- def getContext
70
- return @context
71
- end
69
+ def getContext
70
+ return @context
71
+ end
72
72
 
73
- def getVersion
74
- return "qkr:1.0.2"
75
- end
73
+ def getVersion
74
+ return "qkr:1.1.0"
75
+ end
76
76
 
77
- def getJsonNative
78
- return false
79
- end
77
+ def getJsonNative
78
+ return false
79
+ end
80
80
 
81
- def getContentTypeOverride
82
- return nil
83
- end
81
+ def getContentTypeOverride
82
+ return nil
83
+ end
84
84
 
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
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
- def setCustomEnvironment(host,context)
94
- @host = host
95
- @context = context
96
- end
93
+ def setCustomEnvironment(host,context)
94
+ @host = host
95
+ @context = context
96
+ end
97
97
 
98
- @@instance = ResourceConfig.new
98
+ @@instance = ResourceConfig.new
99
99
 
100
- private_class_method :new
101
- end
102
- end
103
- end
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
- module API
34
- module Qkr
35
- class SecurityQuestion < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Qkr
35
+ class SecurityQuestion < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- 'ed4fa6eb-0f40-4f08-981f-18131f1ba4d8' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/securityQuestion", "query", [], []),
41
-
42
- }
39
+ @__store = {
40
+ 'de899493-c582-4439-ba10-5dac1da870f7' => OperationConfig.new("/labs/proxy/qkr2/internal/api2/securityQuestion", "query", [], []),
41
+
42
+ }
43
43
 
44
- protected
44
+ protected
45
45
 
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
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
- def self.getOperationMetadata()
54
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
55
- end
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
- public
57
+ public
58
58
 
59
59
 
60
60
 
@@ -62,21 +62,21 @@ module MasterCard
62
62
 
63
63
 
64
64
 
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
- #
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
- return self.execute("ed4fa6eb-0f40-4f08-981f-18131f1ba4d8",SecurityQuestion.new(criteria))
74
- end
73
+ return self.execute("de899493-c582-4439-ba10-5dac1da870f7",SecurityQuestion.new(criteria))
74
+ end
75
75
 
76
76
 
77
- end
78
- end
79
- end
77
+ end
78
+ end
79
+ end
80
80
  end
81
81
 
82
82