Class: StickyIoRestfulApiV2025731::MetaController

Inherits:
BaseController show all
Defined in:
lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb

Overview

MetaController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters

Constructor Details

This class inherits a constructor from StickyIoRestfulApiV2025731::BaseController

Instance Method Details

#get_bundle_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of product bundle types. **Response Data**\ Response parameters contained within the ‘data` field array: | Field | Data Type | Description | | —————- | ——— | ——————— | | id | Integer | The bundle type ID. | | name | String | The bundle type name. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 432

def get_bundle_types(domain,
                     v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}products/bundle_types',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetBundleTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_channels(domain, v2_ext) ⇒ ApiResponse

Fetch a list of channel objects. **Response Data**\ Response parameters expected in each channel object contained within the ‘data` field array: | Field | Data Type | Description | | —– | ——— | —————– | | id | Integer | The channel ID. | | name | String | The channel name. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 168

def get_channels(domain,
                 v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}campaigns/channels',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetChannels.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_coupon_discount_behavior_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of all coupon discount behavior types **Response Data**\ Response parameters expected in coupon discount behavior type object contained within the ‘data` field array: | Field | Data Type | Description | ————————————— | ———— | ————————————– | | id | Integer | The coupon discount behavior type ID. | name | String | The coupon discount behavior type name.

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 300

def get_coupon_discount_behavior_types(domain,
                                       v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}coupons/discount_behavior_types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end

#get_coupon_discount_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of all coupon discount types **Response Data**\ Response parameters expected in coupon discount type object contained within the ‘data` field array: | Field | Data Type | Description | ————————————— | ———— | ————————————– | | id | Integer | The coupon discount type ID. | name | String | The coupon discount type name.

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 268

def get_coupon_discount_types(domain,
                              v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}coupons/discount_types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end

#get_coupon_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of all coupon types **Response Data**\ Response parameters expected in coupon type object contained within the ‘data` field array: | Field | Data Type | Description | ————————————— | ———— | ————————————– | | id | Integer | The coupon type ID. | name | String | The coupon type name.

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 236

def get_coupon_types(domain,
                     v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}coupons/types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end

#get_cycle_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of cycle type objects. **Response Data**\ Response parameters expected in the cycle types object contained within the data field array: | Field | Data Type | Description | | - | - | - | | id | Integer | The cycle type ID. | name | String | The cycle type

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 366

def get_cycle_types(domain,
                    v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}offers/cycle_types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetCycleTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_days(domain, v2_ext) ⇒ ApiResponse

Fetch the days of the week. **Response Data**\ Response parameters expected in each day object contained within the ‘data` field array: | Field | Data Type | Description

|

| ————————————— | ———— | ————————————– | | id | Integer | The day ID.

|

| name | String | The day.

|

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 98

def get_days(domain,
             v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}billing_models/days',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetDays.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_frequency_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of frequency types. **Response Data**\ Response parameters expected in each frequency type object contained within the ‘data` field array: | Field | Data Type | Description

|

| ————————————— | ———— | ————————————– | | id | Integer | The frequency type ID.

|

| name | String | The frequency type name. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 61

def get_frequency_types(domain,
                        v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}billing_models/frequencies_types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetFrequencyTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_offer_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of all the offer types. **Response Data**\ Response parameters expected in each response object contained within the ‘data` field array: | Field | Data Type | Description | | - | - | - | | id | Integer | The offer ID. | name | String | The offer name. | is_active | Integer Flag | The offer active status. | smc_active | Integer Flag | The System Module Control is enabled

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 333

def get_offer_types(domain,
                    v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}offers/types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetOfferTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_payment_methods(domain, v2_ext) ⇒ ApiResponse

Fetch a list of campaign payment method objects. **Response Data**\ Response parameters expected in each payment method object contained within the ‘data` field array: | Field | Data Type | Description | | ———– | ———— | ———————- | | id | Integer | The payment method ID. | | name | String | The payment method name. | | description | String | The payment method description. | | is_cc_brand | Integer Flag | Flag that determines whether or not the payment method is a credit card brand. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 203

def get_payment_methods(domain,
                        v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}campaigns/payment_methods',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetPaymentMethods.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_price_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of product bundle price types. **Response Data**\ Response parameters contained within the ‘data` field array: | Field | Data Type | Description | | —————- | ——— | ————————— | | id | Integer | The bundle price type ID. | | name | String | The bundle price type name. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 463

def get_price_types(domain,
                    v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}products/price_types',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetPriceTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_terminating_cycle_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of all the terminating cycle types. **Response Data**\ Response parameters expected in custom field object contained within the ‘data` field array: | Field | Data Type | Description | - | - | - | | id | Integer | The terminating cycle type ID. | name | String | The terminating cycle type name. | description | String | The terminating cycle type.

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 400

def get_terminating_cycle_types(domain,
                                v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}offers/terminating_cycle_types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetTerminatingCycleTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of billing model types. **Response Data**\ Response parameters expected in each billing model object contained within the ‘data` field array: | Field | Data Type | Description

|

| ————————————— | ———— | ————————————– | | id | Integer | The billing model type ID. | | name | String | The billing model type name. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 24

def get_types(domain,
              v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}billing_models/types',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_weeks(domain, v2_ext) ⇒ ApiResponse

Fetch weeks in a month. **Response Data**\ Response parameters expected in each week object contained within the ‘data` field array: | Field | Data Type | Description

|

| ————————————— | ———— | ————————————– | | id | Integer | The week ID.

|

| name | String | The week of a month.

|

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 135

def get_weeks(domain,
              v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}billing_models/weeks',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetWeeks.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_weight_types(domain, v2_ext) ⇒ ApiResponse

Fetch a list of product weight types. **Response Data**\ Response parameters contained within the ‘data` field array: | Field | Data Type | Description | | —————- | ——— | ————————————- | | id | Integer | The product weight type ID. | | name | String | The product weight type name. | | abbreviation | String | The product weight type abbreviation. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/sticky_io_restful_api_v2025731/controllers/meta_controller.rb', line 495

def get_weight_types(domain,
                     v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}products/weight_types',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetWeightTypes.method(:from_hash))
                .is_api_response(true))
    .execute
end