Class: MasterCard::API::McOn::Offers

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/mcon/offers.rb

Class Method Summary collapse

Class Method Details

.activateOffer(mapObj) ⇒ Object



92
93
94
95
96
97
98
99
100
# File 'lib/mastercard/api/mcon/offers.rb', line 92

def self.activateOffer(mapObj)
    #
    #Creates object of type Offers
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [Offers] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("6851b8d2-f300-47d9-ac68-b1f960b7eec3", Offers.new(mapObj))
end

.favoriteOffer(mapObj) ⇒ Object



125
126
127
128
129
130
131
132
133
# File 'lib/mastercard/api/mcon/offers.rb', line 125

def self.favoriteOffer(mapObj)
    #
    #Creates object of type Offers
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [Offers] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("ce244292-514d-4022-837d-f61830bd20ab", Offers.new(mapObj))
end

.getOfferDetail(criteria) ⇒ Object



113
114
115
116
117
118
119
120
121
122
# File 'lib/mastercard/api/mcon/offers.rb', line 113

def self.getOfferDetail(criteria)
    #
    #Query objects of type Offers by id and optional criteria
    #@param [Dict] criteria
    #@return [Offers] object representing the response.
    #@raise [APIException] an exception from the response status
    #

    return self.execute("7b6bcb7a-526b-4873-ab8a-e64737876bee",Offers.new(criteria))
end

.getOffers(criteria = nil) ⇒ Object



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/mastercard/api/mcon/offers.rb', line 74

def self.getOffers(criteria = nil)
    #
    #List objects of type Offers
    #
    #@param [Dict] criteria
    #@return Array [Offers] object matching the criteria.
    #@raise [APIException] an exception from the response status

    if criteria.nil?
        return self.execute("cba2c5c8-3998-41bf-a381-871fbc6aae87",Offers.new)
    else
        return self.execute("cba2c5c8-3998-41bf-a381-871fbc6aae87",Offers.new(criteria))
    end
end

.getPoints(criteria) ⇒ Object



231
232
233
234
235
236
237
238
239
240
# File 'lib/mastercard/api/mcon/offers.rb', line 231

def self.getPoints(criteria)
    #
    #Query objects of type Offers by id and optional criteria
    #@param [Dict] criteria
    #@return [Offers] object representing the response.
    #@raise [APIException] an exception from the response status
    #

    return self.execute("3498fa18-91b4-4b83-8059-b104edc0c09c",Offers.new(criteria))
end

.getPointsExpiring(criteria) ⇒ Object



214
215
216
217
218
219
220
221
222
223
# File 'lib/mastercard/api/mcon/offers.rb', line 214

def self.getPointsExpiring(criteria)
    #
    #Query objects of type Offers by id and optional criteria
    #@param [Dict] criteria
    #@return [Offers] object representing the response.
    #@raise [APIException] an exception from the response status
    #

    return self.execute("4fce153a-4d7d-4aae-9eb9-5c0a8f8cfd15",Offers.new(criteria))
end

.getRedeemedOffers(criteria = nil) ⇒ Object



191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/mastercard/api/mcon/offers.rb', line 191

def self.getRedeemedOffers(criteria = nil)
    #
    #List objects of type Offers
    #
    #@param [Dict] criteria
    #@return Array [Offers] object matching the criteria.
    #@raise [APIException] an exception from the response status

    if criteria.nil?
        return self.execute("f89d3973-8fc5-46f4-ae0a-035a41cb52db",Offers.new)
    else
        return self.execute("f89d3973-8fc5-46f4-ae0a-035a41cb52db",Offers.new(criteria))
    end
end

.getVoucherDetail(criteria) ⇒ Object



285
286
287
288
289
290
291
292
293
294
# File 'lib/mastercard/api/mcon/offers.rb', line 285

def self.getVoucherDetail(criteria)
    #
    #Query objects of type Offers by id and optional criteria
    #@param [Dict] criteria
    #@return [Offers] object representing the response.
    #@raise [APIException] an exception from the response status
    #

    return self.execute("9d9f3631-bcf3-430a-bea4-2529842fd0df",Offers.new(criteria))
end

.getVouchers(criteria = nil) ⇒ Object



262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/mastercard/api/mcon/offers.rb', line 262

def self.getVouchers(criteria = nil)
    #
    #List objects of type Offers
    #
    #@param [Dict] criteria
    #@return Array [Offers] object matching the criteria.
    #@raise [APIException] an exception from the response status

    if criteria.nil?
        return self.execute("f94538a0-4a24-4a69-b665-bc070879f41f",Offers.new)
    else
        return self.execute("f94538a0-4a24-4a69-b665-bc070879f41f",Offers.new(criteria))
    end
end

.redeemOffer(mapObj) ⇒ Object



141
142
143
144
145
146
147
148
149
# File 'lib/mastercard/api/mcon/offers.rb', line 141

def self.redeemOffer(mapObj)
    #
    #Creates object of type Offers
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [Offers] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("2f67272a-2247-4ead-99bf-a25bc9fd929c", Offers.new(mapObj))
end

.submitOfferPromo(mapObj) ⇒ Object



173
174
175
176
177
178
179
180
181
# File 'lib/mastercard/api/mcon/offers.rb', line 173

def self.submitOfferPromo(mapObj)
    #
    #Creates object of type Offers
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [Offers] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("9eaec443-ab25-4fb1-bf45-736bc654c217", Offers.new(mapObj))
end

.unfavoriteOffer(mapObj) ⇒ Object



157
158
159
160
161
162
163
164
165
# File 'lib/mastercard/api/mcon/offers.rb', line 157

def self.unfavoriteOffer(mapObj)
    #
    #Creates object of type Offers
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [Offers] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("b64d01ea-92f1-4a2d-8c47-db883910c18b", Offers.new(mapObj))
end

.userOffersRegistrationStatus(criteria) ⇒ Object



248
249
250
251
252
253
254
255
256
257
# File 'lib/mastercard/api/mcon/offers.rb', line 248

def self.userOffersRegistrationStatus(criteria)
    #
    #Query objects of type Offers by id and optional criteria
    #@param [Dict] criteria
    #@return [Offers] object representing the response.
    #@raise [APIException] an exception from the response status
    #

    return self.execute("072b87c6-f65d-4af7-90dd-cf5102981dd1",Offers.new(criteria))
end