Class: Telnyx::Resources::Porting::LoaConfigurations
- Inherits:
-
Object
- Object
- Telnyx::Resources::Porting::LoaConfigurations
- Defined in:
- lib/telnyx/resources/porting/loa_configurations.rb
Overview
Endpoints related to porting orders management.
Instance Method Summary collapse
-
#create(address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ Telnyx::Models::Porting::LoaConfigurationCreateResponse
Create a LOA configuration.
-
#delete(id, request_options: {}) ⇒ nil
Delete a specific LOA configuration.
-
#initialize(client:) ⇒ LoaConfigurations
constructor
private
A new instance of LoaConfigurations.
-
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Porting::PortingLoaConfiguration>
List the LOA configurations.
-
#preview(address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ StringIO
Preview the LOA template that would be generated without need to create LOA configuration.
-
#preview_0(address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ StringIO
Preview the LOA template that would be generated without need to create LOA configuration.
-
#preview_1(id, request_options: {}) ⇒ StringIO
Preview a specific LOA configuration.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Porting::LoaConfigurationRetrieveResponse
Retrieve a specific LOA configuration.
-
#update(id, address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ Telnyx::Models::Porting::LoaConfigurationUpdateResponse
Update a specific LOA configuration.
Constructor Details
#initialize(client:) ⇒ LoaConfigurations
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of LoaConfigurations.
222 223 224 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 222 def initialize(client:) @client = client end |
Instance Method Details
#create(address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ Telnyx::Models::Porting::LoaConfigurationCreateResponse
Create a LOA configuration.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 27 def create(params) parsed, = Telnyx::Porting::LoaConfigurationCreateParams.dump_request(params) @client.request( method: :post, path: "porting/loa_configurations", body: parsed, model: Telnyx::Models::Porting::LoaConfigurationCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Delete a specific LOA configuration.
125 126 127 128 129 130 131 132 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 125 def delete(id, params = {}) @client.request( method: :delete, path: ["porting/loa_configurations/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Porting::PortingLoaConfiguration>
List the LOA configurations.
101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 101 def list(params = {}) parsed, = Telnyx::Porting::LoaConfigurationListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "porting/loa_configurations", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Porting::PortingLoaConfiguration, options: ) end |
#preview(address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ StringIO
Preview the LOA template that would be generated without need to create LOA configuration.
154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 154 def preview(params) parsed, = Telnyx::Porting::LoaConfigurationPreviewParams.dump_request(params) @client.request( method: :post, path: "porting/loa_configurations/preview", headers: {"accept" => "application/pdf"}, body: parsed, model: StringIO, options: ) end |
#preview_0(address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ StringIO
Preview the LOA template that would be generated without need to create LOA configuration.
186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 186 def preview_0(params) parsed, = Telnyx::Porting::LoaConfigurationPreview0Params.dump_request(params) @client.request( method: :post, path: "porting/loa_configurations/preview", headers: {"accept" => "application/pdf"}, body: parsed, model: StringIO, options: ) end |
#preview_1(id, request_options: {}) ⇒ StringIO
Preview a specific LOA configuration.
209 210 211 212 213 214 215 216 217 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 209 def preview_1(id, params = {}) @client.request( method: :get, path: ["porting/loa_configurations/%1$s/preview", id], headers: {"accept" => "application/pdf"}, model: StringIO, options: params[:request_options] ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Porting::LoaConfigurationRetrieveResponse
Retrieve a specific LOA configuration.
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 49 def retrieve(id, params = {}) @client.request( method: :get, path: ["porting/loa_configurations/%1$s", id], model: Telnyx::Models::Porting::LoaConfigurationRetrieveResponse, options: params[:request_options] ) end |
#update(id, address:, company_name:, contact:, logo:, name:, request_options: {}) ⇒ Telnyx::Models::Porting::LoaConfigurationUpdateResponse
Update a specific LOA configuration.
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/telnyx/resources/porting/loa_configurations.rb', line 79 def update(id, params) parsed, = Telnyx::Porting::LoaConfigurationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["porting/loa_configurations/%1$s", id], body: parsed, model: Telnyx::Models::Porting::LoaConfigurationUpdateResponse, options: ) end |