Class: StickyIoRestfulApiV2025731::TemplatesController
- Inherits:
-
BaseController
- Object
- BaseController
- StickyIoRestfulApiV2025731::TemplatesController
- Defined in:
- lib/sticky_io_restful_api_v2025731/controllers/templates_controller.rb
Overview
TemplatesController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_cancellation_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Cancellation Type Note Templates.
-
#get_default_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Default Type Note Templates.
-
#get_refund_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Refund Type Note Templates.
-
#get_restart_reset_subscription_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Restart / Reset Subscription Type Note Templates.
-
#get_subscription_credit_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Subscription Credit Type Note Templates.
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_cancellation_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Cancellation Type Note Templates. **Response Data**\ Response parameters expected in each Cancellation Type Note Templates object contained within the ‘data` field array: | Field | Data Type | Description
|
| ————————————— | ———— | ————————————– | | id | Integer | The Cancellation Type Note Template ID. | | name | String | The Cancellation Type Note Template name. | | is_global | Boolean | True if the Cancellation Type Note Template is global. | | is_editable | Boolean | True if the Cancellation Type Note Template can be edited. | | campaigns | Array | The associated campaigns with the Cancellation Type Note Template.
|
| content | String | The Cancellation Type Note Template content. |
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/templates_controller.rb', line 33 def get_cancellation_note_templates(domain, v2_ext) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/.{domain}{v2_ext}orders/histories/notes/templates/cancellation', 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(GetCancellationNoteTemplates.method(:from_hash)) .is_api_response(true)) .execute end |
#get_default_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Default Type Note Templates. **Response Data**\ Response parameters expected in each Default Type Note Templates object contained within the ‘data` field array: | Field | Data Type | Description
|
| ————————————— | ———— | ————————————– | | id | Integer | The Default Type Note Template ID. | | name | String | The Default Type Note Template name. | | is_global | Boolean | True if the Default Type Note Template is global. | | is_editable | Boolean | True if the Default Type Note Template can be edited. | | campaigns | Array | The associated campaigns with the Default Type Note Template. | | content | String | The Default Type Note Template content. |
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/templates_controller.rb', line 78 def get_default_note_templates(domain, v2_ext) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/.{domain}{v2_ext}orders/histories/notes/templates/default', 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(GetDefaultNoteTemplates.method(:from_hash)) .is_api_response(true)) .execute end |
#get_refund_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Refund Type Note Templates. **Response Data**\ Response parameters expected in each Refund Type Note Templates object contained within the ‘data` field array: | Field | Data Type | Description
|
| ————————————— | ———— | ————————————– | | id | Integer | The Refund Type Note Template ID. | | name | String | The Refund Type Note Template name. | | is_global | Boolean | True if the Refund Type Note Template is global. | | is_editable | Boolean | True if the Refund Type Note Template can be edited. | | campaigns | Array | The associated campaigns with the Refund Type Note Template. | | content | String | The Refund Type Note Template content. |
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/templates_controller.rb', line 123 def get_refund_note_templates(domain, v2_ext) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/.{domain}{v2_ext}orders/histories/notes/templates/refund', 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(GetRefundNoteTemplates.method(:from_hash)) .is_api_response(true)) .execute end |
#get_restart_reset_subscription_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Restart / Reset Subscription Type Note Templates
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/templates_controller.rb', line 149 def get_restart_reset_subscription_note_templates(domain, v2_ext) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/.{domain}{v2_ext}orders/histories/notes/templates/restart_reset_subscription', 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_subscription_credit_note_templates(domain, v2_ext) ⇒ ApiResponse
A method to GET available Subscription Credit Type Note Templates. **Response Data**\ Response parameters expected in each Subscription Credit Type Note Templates object contained within the ‘data` field array: | Field | Data Type | Description
|
| ————————————— | ———— | ————————————– | | id | Integer | The Subscription Credit Type Note Template ID. | | name | String | The Subscription Credit Type Note Template name. | | is_global | Boolean | True if the Subscription Credit Type Note Template is global. | | is_editable | Boolean | True if the Subscription Credit Type Note Template can be edited.
|
| campaigns | Array | The associated campaigns with the Subscription Credit Type Note Template.
|
| content | String | The Subscription Credit Type Note Template content. |
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/templates_controller.rb', line 195 def get_subscription_credit_note_templates(domain, v2_ext) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/.{domain}{v2_ext}orders/histories/notes/templates/subscription_credit', 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(GetSubscriptionCreditNoteTemplates.method(:from_hash)) .is_api_response(true)) .execute end |