Class: Telnyx::Resources::BundlePricing::BillingBundles
- Inherits:
-
Object
- Object
- Telnyx::Resources::BundlePricing::BillingBundles
- Defined in:
- lib/telnyx/resources/bundle_pricing/billing_bundles.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ BillingBundles
constructor
private
A new instance of BillingBundles.
-
#list(filter: nil, page_number: nil, page_size: nil, authorization_bearer: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::BundlePricing::BillingBundleSummary>
Some parameter documentations has been truncated, see Models::BundlePricing::BillingBundleListParams for more details.
-
#retrieve(bundle_id, authorization_bearer: nil, request_options: {}) ⇒ Telnyx::Models::BundlePricing::BillingBundleRetrieveResponse
Get a single bundle by ID.
Constructor Details
#initialize(client:) ⇒ BillingBundles
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 BillingBundles.
69 70 71 |
# File 'lib/telnyx/resources/bundle_pricing/billing_bundles.rb', line 69 def initialize(client:) @client = client end |
Instance Method Details
#list(filter: nil, page_number: nil, page_size: nil, authorization_bearer: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::BundlePricing::BillingBundleSummary>
Some parameter documentations has been truncated, see Models::BundlePricing::BillingBundleListParams for more details.
Get all allowed bundles.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/telnyx/resources/bundle_pricing/billing_bundles.rb', line 51 def list(params = {}) query_params = [:filter, :page_number, :page_size] parsed, = Telnyx::BundlePricing::BillingBundleListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: "bundle_pricing/billing_bundles", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), headers: parsed.except(*query_params), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::BundlePricing::BillingBundleSummary, options: ) end |
#retrieve(bundle_id, authorization_bearer: nil, request_options: {}) ⇒ Telnyx::Models::BundlePricing::BillingBundleRetrieveResponse
Get a single bundle by ID.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/telnyx/resources/bundle_pricing/billing_bundles.rb', line 20 def retrieve(bundle_id, params = {}) parsed, = Telnyx::BundlePricing::BillingBundleRetrieveParams.dump_request(params) @client.request( method: :get, path: ["bundle_pricing/billing_bundles/%1$s", bundle_id], headers: parsed, model: Telnyx::Models::BundlePricing::BillingBundleRetrieveResponse, options: ) end |