Class: StickyIoRestfulApiV2025731::OrderController

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

Overview

OrderController

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_all_subscriptions(domain, v3_ext, order_id) ⇒ ApiResponse

TODO: type endpoint description here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v3_ext (String)

    Required parameter: TODO: type description here

  • order_id (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/sticky_io_restful_api_v2025731/controllers/order_controller.rb', line 14

def get_all_subscriptions(domain,
                          v3_ext,
                          order_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v3_ext}orders/{order_id}/subscriptions',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v3_ext, key: 'v3_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(order_id, key: 'order_id')
                                .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(GetAllSubscriptions.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_children_subscriptions(domain, v3_ext, order_id) ⇒ ApiResponse

TODO: type endpoint description here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v3_ext (String)

    Required parameter: TODO: type description here

  • order_id (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/sticky_io_restful_api_v2025731/controllers/order_controller.rb', line 44

def get_children_subscriptions(domain,
                               v3_ext,
                               order_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v3_ext}orders/{order_id}/subscriptions/children',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v3_ext, key: 'v3_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(order_id, key: 'order_id')
                                .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(GetChildrenSubscriptions.method(:from_hash))
                .is_api_response(true))
    .execute
end