mastercard_personalizedloyaltyoffers 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b86c1fecc57ebbe4b126f56aa2a21bef77f6b6d
4
- data.tar.gz: 996e2ed753df157b7eb3e6f389ae521da2c0f3e1
3
+ metadata.gz: 8d0f45fb3f22f2d489245169a472671e07d203c3
4
+ data.tar.gz: 3fad3f645da3cfb4c23ff657426edfa51aecca1e
5
5
  SHA512:
6
- metadata.gz: 74d994fe778d55f9060a732eb0522986a3dd4cdae9097733781830c191a69548201b44ae464037f807c30a88ff0b981a6f9f2eb503309a9b2d3bc7e38d5cc667
7
- data.tar.gz: 9d134d3ddaad71f1329d4fbfe35ec2405ea2dc7d0e565a89d1b19ea77324200afd9c2084ac1d6c172958837b6648c31fdf923fca1ad5ad40bb07c34e29d179b9
6
+ metadata.gz: 26f1094c7ae8f2c85a3820e78133a1b1196091ba52b9982d87fac0cbec9f42ec8ab77a0701b3c340721e20d7402f22e97a88bd9020846e58765a0d6db3555f8e
7
+ data.tar.gz: 9de552d52a98025f7fd273ba67ccdd47dba1c5d79e51d4bdfb655638fee21b046e405abb0b77d0e2783b147fe2759759e0ffdb5dc99cf258b63a861d49d31296
@@ -31,55 +31,30 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class ActivateStatementCreditOffer < BaseObject
34
+ class ActivateStatementCreditOffer < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "CREATE"
45
- return "/plo/v1/activatestatementcreditoffer"
46
- end
38
+ @__store = {
39
+ '88b46411-66e3-4133-949a-a150de5853ff' => OperationConfig.new("/plo/v1/activatestatementcreditoffer", "create", [], ["FId","UserToken","OfferId","RedemptionMode"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "CREATE"
58
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
59
48
  end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
62
50
  end
63
51
 
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "CREATE"
70
- return ["FId","UserToken","OfferId","RedemptionMode"]
71
- end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
74
54
  end
75
55
 
76
- def self.getApiVersion
77
- return "1.0.0"
78
- end
56
+ public
79
57
 
80
-
81
-
82
-
83
58
  def self.activateCredit(mapObj)
84
59
  #
85
60
  #Creates object of type ActivateStatementCreditOffer
@@ -87,16 +62,14 @@ module MasterCard
87
62
  #@param Dict mapObj, containing the required parameters to create a new object
88
63
  #@return ActivateStatementCreditOffer of the response of created instance.
89
64
  #
90
- return self.createObject(ActivateStatementCreditOffer.new(mapObj))
65
+ return self.execute("88b46411-66e3-4133-949a-a150de5853ff", ActivateStatementCreditOffer.new(mapObj))
91
66
  end
92
67
 
93
-
94
-
95
-
96
-
97
-
98
-
99
-
68
+
69
+
70
+
71
+
72
+
100
73
  end
101
74
  end
102
75
  end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class MatchedOffers < BaseObject
34
+ class MatchedOffers < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/plo/v1/matchedoffers"
46
- end
38
+ @__store = {
39
+ '4179ad18-63c3-46ec-bc93-97dfade50b77' => OperationConfig.new("/plo/v1/matchedoffers", "query", [], ["FId","UserToken","Lang","MerchantName","Category","OfferType","Latitude","Longitude","Radius","PageNumber","ItemsPerPage"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return ["FId","UserToken","Lang","MerchantName","Category","OfferType","Latitude","Longitude","Radius","PageNumber","ItemsPerPage"]
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.matchedOffers(criteria)
89
64
  #
90
65
  #Query objects of type MatchedOffers by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return MatchedOffers object representing the response.
93
68
  #
94
69
 
95
- obj = MatchedOffers.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("4179ad18-63c3-46ec-bc93-97dfade50b77",MatchedOffers.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class OfferDetails < BaseObject
34
+ class OfferDetails < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/plo/v1/offerdetails"
46
- end
38
+ @__store = {
39
+ 'ccc8d070-528c-4186-a02d-c92aff4661ba' => OperationConfig.new("/plo/v1/offerdetails", "query", [], ["FId","UserToken","OfferId"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return ["FId","UserToken","OfferId"]
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.offerDetails(criteria)
89
64
  #
90
65
  #Query objects of type OfferDetails by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return OfferDetails object representing the response.
93
68
  #
94
69
 
95
- obj = OfferDetails.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("ccc8d070-528c-4186-a02d-c92aff4661ba",OfferDetails.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class RedeemedOffers < BaseObject
34
+ class RedeemedOffers < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/plo/v1/redeemedoffers"
46
- end
38
+ @__store = {
39
+ 'eb796afe-33e5-49a3-801b-b38cd1e02dd3' => OperationConfig.new("/plo/v1/redeemedoffers", "query", [], ["FId","UserToken","Lang","PageNumber","ItemsPerPage"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return ["FId","UserToken","Lang","PageNumber","ItemsPerPage"]
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.redeemOffers(criteria)
89
64
  #
90
65
  #Query objects of type RedeemedOffers by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return RedeemedOffers object representing the response.
93
68
  #
94
69
 
95
- obj = RedeemedOffers.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("eb796afe-33e5-49a3-801b-b38cd1e02dd3",RedeemedOffers.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -0,0 +1,50 @@
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
+ module MasterCard
28
+ module API
29
+ module PersonalizedLoyaltyOffers
30
+ class SDKConfig
31
+
32
+ private
33
+ @@host = nil
34
+
35
+ public
36
+ def self.setHost(host)
37
+ @@host = host
38
+ end
39
+
40
+ def self.getHost()
41
+ return @@host
42
+ end
43
+
44
+ def self.getVersion()
45
+ return "1.0.2"
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class StatementCreditActivationDetail < BaseObject
34
+ class StatementCreditActivationDetail < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/plo/v1/statementcreditactivationdetail"
46
- end
38
+ @__store = {
39
+ '38184dd3-4078-4d41-a840-d8b7f9ec8136' => OperationConfig.new("/plo/v1/statementcreditactivationdetail", "query", [], ["FId","UserToken","ActivationId"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return ["FId","UserToken","ActivationId"]
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.creditDetail(criteria)
89
64
  #
90
65
  #Query objects of type StatementCreditActivationDetail by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return StatementCreditActivationDetail object representing the response.
93
68
  #
94
69
 
95
- obj = StatementCreditActivationDetail.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("38184dd3-4078-4d41-a840-d8b7f9ec8136",StatementCreditActivationDetail.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -31,55 +31,30 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class UserFeedback < BaseObject
34
+ class UserFeedback < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "CREATE"
45
- return "/plo/v1/userfeedback"
46
- end
38
+ @__store = {
39
+ 'fe56ee57-0516-4d96-9484-1d53380faf26' => OperationConfig.new("/plo/v1/userfeedback", "create", [], ["FId","UserToken","OfferId","Feedback"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "CREATE"
58
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
59
48
  end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
62
50
  end
63
51
 
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "CREATE"
70
- return ["FId","UserToken","OfferId","Feedback"]
71
- end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
74
54
  end
75
55
 
76
- def self.getApiVersion
77
- return "1.0.0"
78
- end
56
+ public
79
57
 
80
-
81
-
82
-
83
58
  def self.userFeedback(mapObj)
84
59
  #
85
60
  #Creates object of type UserFeedback
@@ -87,16 +62,14 @@ module MasterCard
87
62
  #@param Dict mapObj, containing the required parameters to create a new object
88
63
  #@return UserFeedback of the response of created instance.
89
64
  #
90
- return self.createObject(UserFeedback.new(mapObj))
65
+ return self.execute("fe56ee57-0516-4d96-9484-1d53380faf26", UserFeedback.new(mapObj))
91
66
  end
92
67
 
93
-
94
-
95
-
96
-
97
-
98
-
99
-
68
+
69
+
70
+
71
+
72
+
100
73
  end
101
74
  end
102
75
  end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class UserSaving < BaseObject
34
+ class UserSaving < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/plo/v1/usersavings"
46
- end
38
+ @__store = {
39
+ '99f45ded-af17-4e47-a2ff-b17ba7cbcdb3' => OperationConfig.new("/plo/v1/usersavings", "query", [], ["FId","UserToken"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return ["FId","UserToken"]
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.userSaving(criteria)
89
64
  #
90
65
  #Query objects of type UserSaving by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return UserSaving object representing the response.
93
68
  #
94
69
 
95
- obj = UserSaving.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("99f45ded-af17-4e47-a2ff-b17ba7cbcdb3",UserSaving.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module PersonalizedLoyaltyOffers
34
- include MasterCard::Core::Model
35
- class UserToken < BaseObject
34
+ class UserToken < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/plo/v1/usertoken"
46
- end
38
+ @__store = {
39
+ '602e079c-2c47-45eb-b303-38505214e13b' => OperationConfig.new("/plo/v1/usertoken", "query", [], ["FId","AuthInfo"]),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return ["FId","AuthInfo"]
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.userSession(criteria)
89
64
  #
90
65
  #Query objects of type UserToken by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return UserToken object representing the response.
93
68
  #
94
69
 
95
- obj = UserToken.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("602e079c-2c47-45eb-b303-38505214e13b",UserToken.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -1,4 +1,5 @@
1
1
  require 'mastercard_api_core'
2
+ require 'mastercard/api/personalizedloyaltyoffers/skdconfig'
2
3
  require 'mastercard/api/personalizedloyaltyoffers/usersaving'
3
4
  require 'mastercard/api/personalizedloyaltyoffers/usertoken'
4
5
  require 'mastercard/api/personalizedloyaltyoffers/activatestatementcreditoffer'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastercard_personalizedloyaltyoffers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
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: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mastercard_api_core
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.0
19
+ version: 1.2.0
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.1.0
22
+ version: 1.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 1.1.0
29
+ version: 1.2.0
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.1.0
32
+ version: 1.2.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: ci_reporter_minitest
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -55,6 +55,7 @@ files:
55
55
  - lib/mastercard/api/personalizedloyaltyoffers/matchedoffers.rb
56
56
  - lib/mastercard/api/personalizedloyaltyoffers/offerdetails.rb
57
57
  - lib/mastercard/api/personalizedloyaltyoffers/redeemedoffers.rb
58
+ - lib/mastercard/api/personalizedloyaltyoffers/skdconfig.rb
58
59
  - lib/mastercard/api/personalizedloyaltyoffers/statementcreditactivationdetail.rb
59
60
  - lib/mastercard/api/personalizedloyaltyoffers/userfeedback.rb
60
61
  - lib/mastercard/api/personalizedloyaltyoffers/usersaving.rb