Class: StickyIoRestfulApiV2025731::OverridesController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/sticky_io_restful_api_v2025731/controllers/overrides_controller.rb

Overview

OverridesController

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

#create_subscription_override(conten, body, domain, v2_ext, subscription_id) ⇒ ApiResponse

This will create a subscription override when a specific product line item when passing the subscription id type description here here

Parameters:

  • conten (String)

    Required parameter: TODO: type description here

  • body (CreateSubscriptionOverrideRequest)

    Required parameter: TODO:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • subscription_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/sticky_io_restful_api_v2025731/controllers/overrides_controller.rb', line 19

def create_subscription_override(conten,
                                 body,
                                 domain,
                                 v2_ext,
                                 subscription_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/.{domain}{v2_ext}subscriptions/{subscription_id}/override',
                                 Server::SERVER_1)
               .header_param(new_parameter(conten, key: 'conten')
                              .is_required(true))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .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))
               .template_param(new_parameter(subscription_id, key: 'subscription_id')
                                .is_required(true)
                                .should_encode(true))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end

#delete_subscription_override(domain, v2_ext, subscription_id) ⇒ ApiResponse

This is to delete a subscription override for a specific line item if a subscription id is passed. here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • subscription_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/sticky_io_restful_api_v2025731/controllers/overrides_controller.rb', line 57

def delete_subscription_override(domain,
                                 v2_ext,
                                 subscription_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::DELETE,
                                 '/.{domain}{v2_ext}subscriptions/{subscription_id}/override',
                                 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))
               .template_param(new_parameter(subscription_id, key: 'subscription_id')
                                .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_subscription_override(domain, v2_ext, subscription_id) ⇒ ApiResponse

This route allows the user to see the subscription override for a specific line item when the subscription_id is passed. here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • subscription_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/sticky_io_restful_api_v2025731/controllers/overrides_controller.rb', line 125

def get_subscription_override(domain,
                              v2_ext,
                              subscription_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}subscriptions/{subscription_id}/override',
                                 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))
               .template_param(new_parameter(subscription_id, key: 'subscription_id')
                                .is_required(true)
                                .should_encode(true))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end

#set_subscription_address_override(body, domain, v2_ext, subscription_id) ⇒ ApiResponse

This is an idempotent operation that will set (create or update) the ‘Address Override’ for the subscription in question. If the given address already exists in the system, the existing record will be referenced, otherwise it will be created. TODO: type description here here

Parameters:

  • body (SetSubscriptionAddressOverrideRequest)

    Required parameter:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • subscription_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/sticky_io_restful_api_v2025731/controllers/overrides_controller.rb', line 160

def set_subscription_address_override(body,
                                      domain,
                                      v2_ext,
                                      subscription_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/.{domain}{v2_ext}subscriptions/{subscription_id}/override/address',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .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))
               .template_param(new_parameter(subscription_id, key: 'subscription_id')
                                .is_required(true)
                                .should_encode(true))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end

#update_subscription_override(body, domain, v2_ext, subscription_id) ⇒ ApiResponse

This subscription override will have the capability of updating a specific line item via passing the subscription id. type description here here

Parameters:

  • body (UpdateSubscriptionOverrideRequest)

    Required parameter: TODO:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • subscription_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/sticky_io_restful_api_v2025731/controllers/overrides_controller.rb', line 90

def update_subscription_override(body,
                                 domain,
                                 v2_ext,
                                 subscription_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/.{domain}{v2_ext}subscriptions/{subscription_id}/override',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .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))
               .template_param(new_parameter(subscription_id, key: 'subscription_id')
                                .is_required(true)
                                .should_encode(true))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end