class Bfwd::SubscriptionsApi
Attributes
Public Class Methods
# File lib/bf_ruby2/api/subscriptions_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Creates a charge on the specified subscription. {"nickname":"Add Charge","response":"addChargeToSubscriptionRequest.html","response":"addChargeToSubscription.html"} @param subscription_id ID of the subscription. @param charge The charge request @param [Hash] opts the optional parameters @return [SubscriptionChargePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 29 def add_charge_to_subscription(subscription_id, charge, opts = {}) data, _status_code, _headers = add_charge_to_subscription_with_http_info(subscription_id, charge, opts) return data end
Creates a charge on the specified subscription. {"nickname":"Add Charge","response":"addChargeToSubscriptionRequest.html","response":"addChargeToSubscription.html"} @param subscription_id ID of the subscription. @param charge The charge request @param [Hash] opts the optional parameters @return [Array<(SubscriptionChargePagedMetadata
, Fixnum, Hash)>] SubscriptionChargePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 40 def add_charge_to_subscription_with_http_info(subscription_id, charge, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.add_charge_to_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.add_charge_to_subscription" end # verify the required parameter 'charge' is set if @api_client.config.client_side_validation && charge.nil? fail ArgumentError, "Missing the required parameter 'charge' when calling SubscriptionsApi.add_charge_to_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/charge".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(charge) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionChargePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#add_charge_to_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Applies a coupon to a subscription. {"nickname":"Apply coupon", "request":"addCouponCodeRequest.html","response":"addCouponCodeResponse.html"} @param subscription_id @param request Request containing the coupon code. @param [Hash] opts the optional parameters @return [CouponPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 90 def add_coupon_to_subscription(subscription_id, request, opts = {}) data, _status_code, _headers = add_coupon_to_subscription_with_http_info(subscription_id, request, opts) return data end
Applies a coupon to a subscription. {"nickname":"Apply coupon", "request":"addCouponCodeRequest.html","response":"addCouponCodeResponse.html"} @param subscription_id @param request Request containing the coupon code. @param [Hash] opts the optional parameters @return [Array<(CouponPagedMetadata
, Fixnum, Hash)>] CouponPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 101 def add_coupon_to_subscription_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.add_coupon_to_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.add_coupon_to_subscription" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.add_coupon_to_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/coupons".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CouponPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#add_coupon_to_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a credit-note which may be used by only the specified subscription. {"nickname":"Add Credit","request":"addCreditNoteToSubscriptionRequest.html", "response":"addCreditNoteToSubscription.html"} @param subscription_id ID of the subscription. @param credit_note The credit-note request @param [Hash] opts the optional parameters @return [CreditNotePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 151 def add_credit_note_to_subscription(subscription_id, credit_note, opts = {}) data, _status_code, _headers = add_credit_note_to_subscription_with_http_info(subscription_id, credit_note, opts) return data end
Creates a credit-note which may be used by only the specified subscription. {"nickname":"Add Credit","request":"addCreditNoteToSubscriptionRequest.html", "response":"addCreditNoteToSubscription.html"} @param subscription_id ID of the subscription. @param credit_note The credit-note request @param [Hash] opts the optional parameters @return [Array<(CreditNotePagedMetadata
, Fixnum, Hash)>] CreditNotePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 162 def add_credit_note_to_subscription_with_http_info(subscription_id, credit_note, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.add_credit_note_to_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.add_credit_note_to_subscription" end # verify the required parameter 'credit_note' is set if @api_client.config.client_side_validation && credit_note.nil? fail ArgumentError, "Missing the required parameter 'credit_note' when calling SubscriptionsApi.add_credit_note_to_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/credit".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(credit_note) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreditNotePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#add_credit_note_to_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Enables the payment method to pay invoices of this subscription. {"nickname":"Add payment-method to subscription","response":"addPaymentMethod.html","request":"addPaymentMethod.request.html"} @param subscription_id @param payment_method @param [Hash] opts the optional parameters @return [PaymentMethodPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 212 def add_payment_method_to_subscription(subscription_id, payment_method, opts = {}) data, _status_code, _headers = add_payment_method_to_subscription_with_http_info(subscription_id, payment_method, opts) return data end
Enables the payment method to pay invoices of this subscription. {"nickname":"Add payment-method to subscription","response":"addPaymentMethod.html","request":"addPaymentMethod.request.html"} @param subscription_id @param payment_method @param [Hash] opts the optional parameters @return [Array<(PaymentMethodPagedMetadata
, Fixnum, Hash)>] PaymentMethodPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 223 def add_payment_method_to_subscription_with_http_info(subscription_id, payment_method, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.add_payment_method_to_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.add_payment_method_to_subscription" end # verify the required parameter 'payment_method' is set if @api_client.config.client_side_validation && payment_method.nil? fail ArgumentError, "Missing the required parameter 'payment_method' when calling SubscriptionsApi.add_payment_method_to_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/payment-methods".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payment_method) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PaymentMethodPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#add_payment_method_to_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Advance the subscription through time. {"nickname":"Advance","request":"advanceSubscriptionRequest.html","response":"advanceSubscription.html"} @param subscription_id ID of the subscription. @param request The request @param [Hash] opts the optional parameters @return [TimeResponsePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 273 def advance_subscription(subscription_id, request, opts = {}) data, _status_code, _headers = advance_subscription_with_http_info(subscription_id, request, opts) return data end
Advance the subscription through time. {"nickname":"Advance","request":"advanceSubscriptionRequest.html","response":"advanceSubscription.html"} @param subscription_id ID of the subscription. @param request The request @param [Hash] opts the optional parameters @return [Array<(TimeResponsePagedMetadata
, Fixnum, Hash)>] TimeResponsePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 284 def advance_subscription_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.advance_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.advance_subscription" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.advance_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/advance".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimeResponsePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#advance_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns all available payment methods for the specified subscription. By default 10 values are returned. Records are returned in natural order. { "nickname" : "List on subscription","response" : "getAvailablePaymentMethods.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [PaymentMethodPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 338 def available_payment_methods_for_subscription(subscription_id, opts = {}) data, _status_code, _headers = available_payment_methods_for_subscription_with_http_info(subscription_id, opts) return data end
Returns all available payment methods for the specified subscription. By default 10 values are returned. Records are returned in natural order. { "nickname" : "List on subscription","response" : "getAvailablePaymentMethods.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(PaymentMethodPagedMetadata
, Fixnum, Hash)>] PaymentMethodPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 353 def available_payment_methods_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.available_payment_methods_for_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.available_payment_methods_for_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/{subscription-ID}/payment-methods".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PaymentMethodPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#available_payment_methods_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create multiple subscriptions. {"nickname":"Create multiple subscriptions","response":"createMultipleSubscriptionViaHelper.html","request":"createMultipleSubscriptionViaHelper.request.html"} @param request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 406 def batch_create_subscriptions(request, opts = {}) data, _status_code, _headers = batch_create_subscriptions_with_http_info(request, opts) return data end
Create multiple subscriptions. {"nickname":"Create multiple subscriptions","response":"createMultipleSubscriptionViaHelper.html","request":"createMultipleSubscriptionViaHelper.request.html"} @param request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 416 def batch_create_subscriptions_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.batch_create_subscriptions ..." end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.batch_create_subscriptions" end # resource path local_var_path = "/subscriptions/batch" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#batch_create_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retires the subscription specified by the subscription-ID parameter. Retiring a subscription causes it to cancel based on the specified retirement settings for the product. {"nickname":"Cancel subscription","response":"deleteSubscription.html","request":"deleteSubscriptionRequest.html"} @param subscription_id @param subscription_cancellation The cancellation request @param [Hash] opts the optional parameters @return [SubscriptionCancellationPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 462 def cancel_subscription(subscription_id, subscription_cancellation, opts = {}) data, _status_code, _headers = cancel_subscription_with_http_info(subscription_id, subscription_cancellation, opts) return data end
Retires the subscription specified by the subscription-ID parameter. Retiring a subscription causes it to cancel based on the specified retirement settings for the product. {"nickname":"Cancel subscription","response":"deleteSubscription.html","request":"deleteSubscriptionRequest.html"} @param subscription_id @param subscription_cancellation The cancellation request @param [Hash] opts the optional parameters @return [Array<(SubscriptionCancellationPagedMetadata
, Fixnum, Hash)>] SubscriptionCancellationPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 473 def cancel_subscription_with_http_info(subscription_id, subscription_cancellation, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.cancel_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.cancel_subscription" end # verify the required parameter 'subscription_cancellation' is set if @api_client.config.client_side_validation && subscription_cancellation.nil? fail ArgumentError, "Missing the required parameter 'subscription_cancellation' when calling SubscriptionsApi.cancel_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/cancel".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(subscription_cancellation) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionCancellationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#cancel_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create an aggregating subscription. {"nickname":"Create aggregating subscription","response":"createAggregatingSubscription.html","request":"createAggregatingSubscription.request.html"} @param request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 522 def create_aggregating_subscription(request, opts = {}) data, _status_code, _headers = create_aggregating_subscription_with_http_info(request, opts) return data end
Create an aggregating subscription. {"nickname":"Create aggregating subscription","response":"createAggregatingSubscription.html","request":"createAggregatingSubscription.request.html"} @param request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 532 def create_aggregating_subscription_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.create_aggregating_subscription ..." end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.create_aggregating_subscription" end # resource path local_var_path = "/subscriptions/aggregating" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#create_aggregating_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new subscription. {"nickname":"Create a new subscription","request":"createSubscriptionRequest.html","response":"createSubscriptionResponse.html"} @param subscription The subscription object to be updated. @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 577 def create_subscription(subscription, opts = {}) data, _status_code, _headers = create_subscription_with_http_info(subscription, opts) return data end
Create a subscription (V2). {"nickname":"Create a subscription (V2)","response":"createSubscriptionViaHelper.html","request":"createSubscriptionViaHelper.request.html"} @param request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 632 def create_subscription_v2(request, opts = {}) data, _status_code, _headers = create_subscription_v2_with_http_info(request, opts) return data end
Create a subscription (V2). {"nickname":"Create a subscription (V2)","response":"createSubscriptionViaHelper.html","request":"createSubscriptionViaHelper.request.html"} @param request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 642 def create_subscription_v2_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.create_subscription_v2 ..." end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.create_subscription_v2" end # resource path local_var_path = "/subscriptions/create" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#create_subscription_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new subscription. {"nickname":"Create a new subscription","request":"createSubscriptionRequest.html","response":"createSubscriptionResponse.html"} @param subscription The subscription object to be updated. @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 587 def create_subscription_with_http_info(subscription, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.create_subscription ..." end # verify the required parameter 'subscription' is set if @api_client.config.client_side_validation && subscription.nil? fail ArgumentError, "Missing the required parameter 'subscription' when calling SubscriptionsApi.create_subscription" end # resource path local_var_path = "/subscriptions" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(subscription) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a timer for a subscription event. {"nickname":"Create Timer","response":"createSubscriptionTimer.html","request":"createSubscriptionTimer.request.html"} @param subscription_id @param request @param [Hash] opts the optional parameters @return [TimerAmendment]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 688 def create_timer(subscription_id, request, opts = {}) data, _status_code, _headers = create_timer_with_http_info(subscription_id, request, opts) return data end
Create a timer for a subscription event. {"nickname":"Create Timer","response":"createSubscriptionTimer.html","request":"createSubscriptionTimer.request.html"} @param subscription_id @param request @param [Hash] opts the optional parameters @return [Array<(TimerAmendment
, Fixnum, Hash)>] TimerAmendment
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 699 def create_timer_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.create_timer ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.create_timer" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.create_timer" end # resource path local_var_path = "/subscriptions/{subscription-ID}/timer".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimerAmendment') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#create_timer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Remove any associated metadata. {"nickname":"Clear from subscription","request" :"deleteSubscriptionMetadataRequest.html","response":"deleteSubscriptionMetadataResponse.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [DynamicMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 749 def delete_metadata_for_subscription(subscription_id, opts = {}) data, _status_code, _headers = delete_metadata_for_subscription_with_http_info(subscription_id, opts) return data end
Remove any associated metadata. {"nickname":"Clear from subscription","request" :"deleteSubscriptionMetadataRequest.html","response":"deleteSubscriptionMetadataResponse.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(DynamicMetadata
, Fixnum, Hash)>] DynamicMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 760 def delete_metadata_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.delete_metadata_for_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.delete_metadata_for_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/metadata".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#delete_metadata_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Freeze the subscription. {"nickname":"Freeze","request":"freezeSubscriptionRequest.html","response":"freezeSubscription.html"} @param subscription_id ID of the subscription. @param request The request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 807 def freeze_subscription(subscription_id, request, opts = {}) data, _status_code, _headers = freeze_subscription_with_http_info(subscription_id, request, opts) return data end
Freeze the subscription. {"nickname":"Freeze","request":"freezeSubscriptionRequest.html","response":"freezeSubscription.html"} @param subscription_id ID of the subscription. @param request The request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 818 def freeze_subscription_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.freeze_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.freeze_subscription" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.freeze_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/freeze".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#freeze_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of all subscriptions. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve all subscriptions","response":"getSubscriptionAll.html"} @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. (default to true) @option opts [String] :metadata @option opts [BOOLEAN] :exclude_service_ended @option opts [Array<String>] :account_id A list of accountIDs to filter subscriptions on @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 876 def get_all_subscriptions(opts = {}) data, _status_code, _headers = get_all_subscriptions_with_http_info(opts) return data end
Retrieves a collection of all subscriptions. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve all subscriptions","response":"getSubscriptionAll.html"} @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. @option opts [String] :metadata @option opts [BOOLEAN] :exclude_service_ended @option opts [Array<String>] :account_id A list of accountIDs to filter subscriptions on @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 895 def get_all_subscriptions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_all_subscriptions ..." end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'exclude_children'] = opts[:'exclude_children'] if !opts[:'exclude_children'].nil? query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil? query_params[:'exclude_service_ended'] = opts[:'exclude_service_ended'] if !opts[:'exclude_service_ended'].nil? query_params[:'accountID'] = @api_client.build_collection_param(opts[:'account_id'], :multi) if !opts[:'account_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_all_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of the coupons which can be applied to this subscription. { "nickname" : "Retrieve applicable coupons","response" : "getApplicableCoupons.html" } @param subscription_id ID of the subscription. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @return [CouponPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 955 def get_applicable_coupons_for_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_applicable_coupons_for_subscription_with_http_info(subscription_id, opts) return data end
Retrieves a collection of the coupons which can be applied to this subscription. { "nickname" : "Retrieve applicable coupons","response" : "getApplicableCoupons.html" } @param subscription_id ID of the subscription. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @return [Array<(CouponPagedMetadata
, Fixnum, Hash)>] CouponPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 971 def get_applicable_coupons_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_applicable_coupons_for_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_applicable_coupons_for_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/{subscription-ID}/applicable-coupons".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CouponPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_applicable_coupons_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns all available credit-notes for the specified subscription. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get available credit","response":"getAvailableCreditSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @return [CreditNotePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1031 def get_available_credit_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_available_credit_subscription_with_http_info(subscription_id, opts) return data end
Returns all available credit-notes for the specified subscription. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get available credit","response":"getAvailableCreditSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @return [Array<(CreditNotePagedMetadata
, Fixnum, Hash)>] CreditNotePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1047 def get_available_credit_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_available_credit_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_available_credit_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/{subscription-ID}/credit".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreditNotePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_available_credit_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns all charges for the specified subscription. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get charges","response":"getChargesSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [String] :state Ihe direction of any ordering, either ASC or DESC. @option opts [String] :type Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @return [SubscriptionChargePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1109 def get_charges_on_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_charges_on_subscription_with_http_info(subscription_id, opts) return data end
Returns all charges for the specified subscription. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get charges","response":"getChargesSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [String] :state Ihe direction of any ordering, either ASC or DESC. @option opts [String] :type Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @return [Array<(SubscriptionChargePagedMetadata
, Fixnum, Hash)>] SubscriptionChargePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1127 def get_charges_on_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_charges_on_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_charges_on_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end if @api_client.config.client_side_validation && opts[:'state'] && !['Voided', 'Pending', 'AwaitingPayment', 'Paid', 'Failed'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of Voided, Pending, AwaitingPayment, Paid, Failed' end if @api_client.config.client_side_validation && opts[:'type'] && !['Setup', 'Upgrade', 'Manual', 'ProductRatePlanMigration', 'Arrears', 'Advance', 'Coupon', 'Usage', 'PricingComponent'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of Setup, Upgrade, Manual, ProductRatePlanMigration, Arrears, Advance, Coupon, Usage, PricingComponent' end # resource path local_var_path = "/subscriptions/{subscription-ID}/charges".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionChargePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_charges_on_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Return all entities whose invoices will be aggregated by the specified subscription By default 10 values are returned. Records are returned in natural order. {"nickname":"Get Aggregated Entities","response":"getAggregatedEntities.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1195 def get_children_of_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_children_of_subscription_with_http_info(subscription_id, opts) return data end
Return all entities whose invoices will be aggregated by the specified subscription By default 10 values are returned. Records are returned in natural order. {"nickname":"Get Aggregated Entities","response":"getAggregatedEntities.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1211 def get_children_of_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_children_of_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_children_of_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/{subscription-ID}/children".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_children_of_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of the coupons and the unique codes currently applied to the subscription. {"nickname":"Retrieve coupons","response":"getCoupons.html"} @param subscription_id ID of the subscription. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @return [CouponPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1271 def get_coupons_on_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_coupons_on_subscription_with_http_info(subscription_id, opts) return data end
Retrieves a collection of the coupons and the unique codes currently applied to the subscription. {"nickname":"Retrieve coupons","response":"getCoupons.html"} @param subscription_id ID of the subscription. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @return [Array<(CouponPagedMetadata
, Fixnum, Hash)>] CouponPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1287 def get_coupons_on_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_coupons_on_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_coupons_on_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/{subscription-ID}/coupons".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CouponPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_coupons_on_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoice objects of the specified state for the given subscription. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve invoices by state for subscription","response":"getInvoicesForSubscriptionByState.html"} @param subscription_id The unique id of the subscription. @param state The state of the invoices to retrieve. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. (default to 0) @option opts [Integer] :records The maximum number of taxation-links to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1347 def get_invoices_for_subscription_by_state(subscription_id, state, opts = {}) data, _status_code, _headers = get_invoices_for_subscription_by_state_with_http_info(subscription_id, state, opts) return data end
Retrieves a collection of invoice objects of the specified state for the given subscription. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve invoices by state for subscription","response":"getInvoicesForSubscriptionByState.html"} @param subscription_id The unique id of the subscription. @param state The state of the invoices to retrieve. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. @option opts [Integer] :records The maximum number of taxation-links to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1363 def get_invoices_for_subscription_by_state_with_http_info(subscription_id, state, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_invoices_for_subscription_by_state ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_invoices_for_subscription_by_state" end # verify the required parameter 'state' is set if @api_client.config.client_side_validation && state.nil? fail ArgumentError, "Missing the required parameter 'state' when calling SubscriptionsApi.get_invoices_for_subscription_by_state" end # verify enum value if @api_client.config.client_side_validation && !['Paid', 'Unpaid', 'Pending', 'Voided'].include?(state) fail ArgumentError, "invalid value for 'state', must be one of Paid, Unpaid, Pending, Voided" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/{subscriptionID}/invoices/{state}".sub('{' + 'subscriptionID' + '}', subscription_id.to_s).sub('{' + 'state' + '}', state.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_invoices_for_subscription_by_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve any associated metadata. {"nickname":"Retrieve on subscription","request":"getSubscriptionMetadataRequest.html","response":"getSubscriptionMetadataResponse.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [DynamicMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1425 def get_metadata_for_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_metadata_for_subscription_with_http_info(subscription_id, opts) return data end
Retrieve any associated metadata. {"nickname":"Retrieve on subscription","request":"getSubscriptionMetadataRequest.html","response":"getSubscriptionMetadataResponse.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(DynamicMetadata
, Fixnum, Hash)>] DynamicMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1436 def get_metadata_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_metadata_for_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_metadata_for_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/metadata".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_metadata_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Return the parent of the given subscription. {"nickname":"Get parent","response":"getParentSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1483 def get_parent_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_parent_subscription_with_http_info(subscription_id, opts) return data end
Return the parent of the given subscription. {"nickname":"Get parent","response":"getParentSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1494 def get_parent_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_parent_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_parent_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/parent".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_parent_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets the subscription's current pricing-component values. {"nickname":"Get values","response":"getPricingComponentValues.html"} @param subscription_id ID of the subscription. @param [Hash] opts the optional parameters @return [PricingComponentValuePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1540 def get_pricing_component_values_of_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_pricing_component_values_of_subscription_with_http_info(subscription_id, opts) return data end
Gets the subscription's current pricing-component values. {"nickname":"Get values","response":"getPricingComponentValues.html"} @param subscription_id ID of the subscription. @param [Hash] opts the optional parameters @return [Array<(PricingComponentValuePagedMetadata
, Fixnum, Hash)>] PricingComponentValuePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1550 def get_pricing_component_values_of_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_pricing_component_values_of_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_pricing_component_values_of_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/values".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PricingComponentValuePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_pricing_component_values_of_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscriptions, specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by account","response":"getSubscriptionByAccount.html"} @param account_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. (default to true) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1602 def get_subscription_by_account_id(account_id, opts = {}) data, _status_code, _headers = get_subscription_by_account_id_with_http_info(account_id, opts) return data end
Retrieves a collection of subscriptions, specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by account","response":"getSubscriptionByAccount.html"} @param account_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1619 def get_subscription_by_account_id_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription_by_account_id ..." end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling SubscriptionsApi.get_subscription_by_account_id" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/account/{account-ID}".sub('{' + 'account-ID' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'exclude_children'] = opts[:'exclude_children'] if !opts[:'exclude_children'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription_by_account_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single subscription, specified by the ID parameter. {"nickname":"Retrieve an existing subscription","response":"getSubscriptionByID.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1676 def get_subscription_by_id(subscription_id, opts = {}) data, _status_code, _headers = get_subscription_by_id_with_http_info(subscription_id, opts) return data end
Retrieves a single subscription, specified by the ID parameter. {"nickname":"Retrieve an existing subscription","response":"getSubscriptionByID.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1688 def get_subscription_by_id_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription_by_id ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_subscription_by_id" end # resource path local_var_path = "/subscriptions/{subscription-ID}".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscriptions, specified by the product-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by product","response":"getSubscriptionByProduct.html"} @param product_id ID of the product @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. (default to true) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1742 def get_subscription_by_product_id(product_id, opts = {}) data, _status_code, _headers = get_subscription_by_product_id_with_http_info(product_id, opts) return data end
Retrieves a collection of subscriptions, specified by the product-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by product","response":"getSubscriptionByProduct.html"} @param product_id ID of the product @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1759 def get_subscription_by_product_id_with_http_info(product_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription_by_product_id ..." end # verify the required parameter 'product_id' is set if @api_client.config.client_side_validation && product_id.nil? fail ArgumentError, "Missing the required parameter 'product_id' when calling SubscriptionsApi.get_subscription_by_product_id" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/product/{product-ID}".sub('{' + 'product-ID' + '}', product_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'exclude_children'] = opts[:'exclude_children'] if !opts[:'exclude_children'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription_by_product_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscriptions, specified by the product-rate-plan-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by rate-plan","response":"getSubscriptionByProductRatePlan.html"} @param product_rate_plan_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. (default to true) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1821 def get_subscription_by_product_rate_plan_id(product_rate_plan_id, opts = {}) data, _status_code, _headers = get_subscription_by_product_rate_plan_id_with_http_info(product_rate_plan_id, opts) return data end
Retrieves a collection of subscriptions, specified by the product-rate-plan-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by rate-plan","response":"getSubscriptionByProductRatePlan.html"} @param product_rate_plan_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1838 def get_subscription_by_product_rate_plan_id_with_http_info(product_rate_plan_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription_by_product_rate_plan_id ..." end # verify the required parameter 'product_rate_plan_id' is set if @api_client.config.client_side_validation && product_rate_plan_id.nil? fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling SubscriptionsApi.get_subscription_by_product_rate_plan_id" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/product-rate-plan/{product-rate-plan-ID}".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'exclude_children'] = opts[:'exclude_children'] if !opts[:'exclude_children'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription_by_product_rate_plan_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscriptions, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by state","response":"getSubscriptionByState.html"} @param state The current state of the subscription, either Provisioned, AwaitingPayment, Paid or Cancelled @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. (default to true) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1900 def get_subscription_by_state(state, opts = {}) data, _status_code, _headers = get_subscription_by_state_with_http_info(state, opts) return data end
Retrieves a collection of subscriptions, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by state","response":"getSubscriptionByState.html"} @param state The current state of the subscription, either Provisioned, AwaitingPayment, Paid or Cancelled @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired subscriptions should be returned. @option opts [BOOLEAN] :exclude_children Should child subscriptiosn be excluded. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1917 def get_subscription_by_state_with_http_info(state, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription_by_state ..." end # verify the required parameter 'state' is set if @api_client.config.client_side_validation && state.nil? fail ArgumentError, "Missing the required parameter 'state' when calling SubscriptionsApi.get_subscription_by_state" end # verify enum value if @api_client.config.client_side_validation && !['Trial', 'Provisioned', 'Paid', 'AwaitingPayment', 'Cancelled', 'Failed', 'Expired'].include?(state) fail ArgumentError, "invalid value for 'state', must be one of Trial, Provisioned, Paid, AwaitingPayment, Cancelled, Failed, Expired" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/state/{state}".sub('{' + 'state' + '}', state.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'exclude_children'] = opts[:'exclude_children'] if !opts[:'exclude_children'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription_by_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single subscription, specified by the version-ID parameter. {"nickname":"Retrieve by version","response":"getSubscriptionByVersionID.html"} @param version_id The version-ID of the subscription. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1977 def get_subscription_by_version_id(version_id, opts = {}) data, _status_code, _headers = get_subscription_by_version_id_with_http_info(version_id, opts) return data end
Retrieves a single subscription, specified by the version-ID parameter. {"nickname":"Retrieve by version","response":"getSubscriptionByVersionID.html"} @param version_id The version-ID of the subscription. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 1988 def get_subscription_by_version_id_with_http_info(version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription_by_version_id ..." end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling SubscriptionsApi.get_subscription_by_version_id" end # resource path local_var_path = "/subscriptions/version/{version-ID}".sub('{' + 'version-ID' + '}', version_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription_by_version_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscription objects with period-end times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by initial period-start","response":"getSubscriptionByInitialPeriodStart.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. (default to 0) @option opts [Integer] :records The maximum number of taxation-links to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2040 def get_subscriptions_by_initial_period_start(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_subscriptions_by_initial_period_start_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of subscription objects with period-end times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by initial period-start","response":"getSubscriptionByInitialPeriodStart.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. @option opts [Integer] :records The maximum number of taxation-links to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2056 def get_subscriptions_by_initial_period_start_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscriptions_by_initial_period_start ..." end # verify the required parameter 'lower_threshold' is set if @api_client.config.client_side_validation && lower_threshold.nil? fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling SubscriptionsApi.get_subscriptions_by_initial_period_start" end # verify the required parameter 'upper_threshold' is set if @api_client.config.client_side_validation && upper_threshold.nil? fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling SubscriptionsApi.get_subscriptions_by_initial_period_start" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/initial-period-start/{lower-threshold}/{upper-threshold}".sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscriptions_by_initial_period_start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscription objects with period-end times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by period-end","response":"getSubscriptionByPeriodEnd.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. (default to 0) @option opts [Integer] :records The maximum number of taxation-links to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2119 def get_subscriptions_by_period_end(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_subscriptions_by_period_end_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of subscription objects with period-end times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by period-end","response":"getSubscriptionByPeriodEnd.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. @option opts [Integer] :records The maximum number of taxation-links to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2135 def get_subscriptions_by_period_end_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscriptions_by_period_end ..." end # verify the required parameter 'lower_threshold' is set if @api_client.config.client_side_validation && lower_threshold.nil? fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling SubscriptionsApi.get_subscriptions_by_period_end" end # verify the required parameter 'upper_threshold' is set if @api_client.config.client_side_validation && upper_threshold.nil? fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling SubscriptionsApi.get_subscriptions_by_period_end" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/period-end/{lower-threshold}/{upper-threshold}".sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscriptions_by_period_end\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscription objects with period-start times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by period-start","response":"getSubscriptionByPeriodStart.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. (default to 0) @option opts [Integer] :records The maximum number of taxation-links to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2198 def get_subscriptions_by_period_start(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_subscriptions_by_period_start_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of subscription objects with period-start times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by period-start","response":"getSubscriptionByPeriodStart.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. @option opts [Integer] :records The maximum number of taxation-links to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2214 def get_subscriptions_by_period_start_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscriptions_by_period_start ..." end # verify the required parameter 'lower_threshold' is set if @api_client.config.client_side_validation && lower_threshold.nil? fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling SubscriptionsApi.get_subscriptions_by_period_start" end # verify the required parameter 'upper_threshold' is set if @api_client.config.client_side_validation && upper_threshold.nil? fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling SubscriptionsApi.get_subscriptions_by_period_start" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/period-start/{lower-threshold}/{upper-threshold}".sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscriptions_by_period_start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of subscription objects whose successful periods count falls within the range specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by successful period","response":"getSubscriptionBySuccessfulPeriods.html"} @param lower_threshold The lower threshold of the range @param upper_threshold The upper threshold of the range. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. (default to 0) @option opts [Integer] :records The maximum number of taxation-links to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2277 def get_subscriptions_by_successful_periods(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_subscriptions_by_successful_periods_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of subscription objects whose successful periods count falls within the range specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by successful period","response":"getSubscriptionBySuccessfulPeriods.html"} @param lower_threshold The lower threshold of the range @param upper_threshold The upper threshold of the range. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first taxation-link to return. @option opts [Integer] :records The maximum number of taxation-links to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2293 def get_subscriptions_by_successful_periods_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscriptions_by_successful_periods ..." end # verify the required parameter 'lower_threshold' is set if @api_client.config.client_side_validation && lower_threshold.nil? fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling SubscriptionsApi.get_subscriptions_by_successful_periods" end # verify the required parameter 'upper_threshold' is set if @api_client.config.client_side_validation && upper_threshold.nil? fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling SubscriptionsApi.get_subscriptions_by_successful_periods" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/subscriptions/successful-periods/{lower-threshold}/{upper-threshold}".sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_subscriptions_by_successful_periods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
{ "nickname" : "","response" : ""} @param query_string The query string used to search. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The starting index of the search results. (default to 0) @option opts [Integer] :records The number of search results to return. (default to 10) @option opts [String] :format The response format, either JSON or XML. (default to JSON) @option opts [BOOLEAN] :wildcard Toggle if we search for full words or whether a wildcard is used. (default to false) @option opts [BOOLEAN] :entity Is an entity returned with the search results. (default to false) @return [SwaggerTypeListSubs]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2356 def get_swagger_subscription(query_string, opts = {}) data, _status_code, _headers = get_swagger_subscription_with_http_info(query_string, opts) return data end
{ "nickname" : "","response" : ""} @param query_string The query string used to search. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The starting index of the search results. @option opts [Integer] :records The number of search results to return. @option opts [String] :format The response format, either JSON or XML. @option opts [BOOLEAN] :wildcard Toggle if we search for full words or whether a wildcard is used. @option opts [BOOLEAN] :entity Is an entity returned with the search results. @return [Array<(SwaggerTypeListSubs
, Fixnum, Hash)>] SwaggerTypeListSubs
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2372 def get_swagger_subscription_with_http_info(query_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_swagger_subscription ..." end # verify the required parameter 'query_string' is set if @api_client.config.client_side_validation && query_string.nil? fail ArgumentError, "Missing the required parameter 'query_string' when calling SubscriptionsApi.get_swagger_subscription" end # resource path local_var_path = "/subscriptions/swagger-end-point/{query-string}".sub('{' + 'query-string' + '}', query_string.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil? query_params[:'wildcard'] = opts[:'wildcard'] if !opts[:'wildcard'].nil? query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SwaggerTypeListSubs') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_swagger_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection timer amendments for the specified subscription.. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get Timers","response":"getTimersforSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. (default to 0) @option opts [Integer] :records The maximum number of subscriptions to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [BOOLEAN] :include_retired Whether retired timers should be returned. (default to false) @option opts [String] :state The state of the timer amendment @option opts [String] :event The type of timer event @return [TimerAmendment]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2431 def get_timers_for_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_timers_for_subscription_with_http_info(subscription_id, opts) return data end
Retrieves a collection timer amendments for the specified subscription.. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get Timers","response":"getTimersforSubscription.html"} @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first subscription to return. @option opts [Integer] :records The maximum number of subscriptions to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [BOOLEAN] :include_retired Whether retired timers should be returned. @option opts [String] :state The state of the timer amendment @option opts [String] :event The type of timer event @return [Array<(TimerAmendment
, Fixnum, Hash)>] TimerAmendment
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2449 def get_timers_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.get_timers_for_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.get_timers_for_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end if @api_client.config.client_side_validation && opts[:'state'] && !['Pending', 'Succeeded', 'Failed', 'Discarded'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of Pending, Succeeded, Failed, Discarded' end if @api_client.config.client_side_validation && opts[:'event'] && !['TrialExpiry', 'SubscriptionExpiry', 'PeriodEnd'].include?(opts[:'event']) fail ArgumentError, 'invalid value for "event", must be one of TrialExpiry, SubscriptionExpiry, PeriodEnd' end # resource path local_var_path = "/subscriptions/{subscription-ID}/timer".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimerAmendment') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#get_timers_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Import a subscription. {"nickname":"Import","request":"importSubscriptionRequest.html","response":"importSubscription.html"} @param request The request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2511 def import_subscription(request, opts = {}) data, _status_code, _headers = import_subscription_with_http_info(request, opts) return data end
Import a subscription. {"nickname":"Import","request":"importSubscriptionRequest.html","response":"importSubscription.html"} @param request The request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2521 def import_subscription_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.import_subscription ..." end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.import_subscription" end # resource path local_var_path = "/subscriptions/import" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#import_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Invoice
any outstanding charges for the subscription. {"nickname":"Invoice Charges","request":"invoiceChargesRequest.html","response":"invoiceCharges.html"} @param subscription_id ID of the subscription. @param charge The charge request @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2567 def invoice_charges_on_subscription(subscription_id, charge, opts = {}) data, _status_code, _headers = invoice_charges_on_subscription_with_http_info(subscription_id, charge, opts) return data end
Invoice
any outstanding charges for the subscription. {"nickname":"Invoice Charges","request":"invoiceChargesRequest.html","response":"invoiceCharges.html"} @param subscription_id ID of the subscription. @param charge The charge request @param [Hash] opts the optional parameters @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2578 def invoice_charges_on_subscription_with_http_info(subscription_id, charge, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.invoice_charges_on_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.invoice_charges_on_subscription" end # verify the required parameter 'charge' is set if @api_client.config.client_side_validation && charge.nil? fail ArgumentError, "Missing the required parameter 'charge' when calling SubscriptionsApi.invoice_charges_on_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/invoice-charges".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(charge) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#invoice_charges_on_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Migrate the subscription to a new plan. {"nickname":"Migrate","request":"migrateSubscriptionRequest.html", "response":"migrateSubscription.html"} @param subscription_id ID of the subscription. @param request The migration request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2628 def migrate_subscription(subscription_id, request, opts = {}) data, _status_code, _headers = migrate_subscription_with_http_info(subscription_id, request, opts) return data end
Migrate the subscription to a new plan. {"nickname":"Migrate","request":"migrateSubscriptionRequest.html", "response":"migrateSubscription.html"} @param subscription_id ID of the subscription. @param request The migration request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2639 def migrate_subscription_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.migrate_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.migrate_subscription" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.migrate_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/migrate".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#migrate_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes the coupon from the subscription. {"nickname":"Remove coupon","response":"removeCouponResponse.html"} @param subscription_id @param coupon_code @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [CouponPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2690 def remove_coupon_from_subscription(subscription_id, coupon_code, opts = {}) data, _status_code, _headers = remove_coupon_from_subscription_with_http_info(subscription_id, coupon_code, opts) return data end
Removes the coupon from the subscription. {"nickname":"Remove coupon","response":"removeCouponResponse.html"} @param subscription_id @param coupon_code @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(CouponPagedMetadata
, Fixnum, Hash)>] CouponPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2702 def remove_coupon_from_subscription_with_http_info(subscription_id, coupon_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.remove_coupon_from_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.remove_coupon_from_subscription" end # verify the required parameter 'coupon_code' is set if @api_client.config.client_side_validation && coupon_code.nil? fail ArgumentError, "Missing the required parameter 'coupon_code' when calling SubscriptionsApi.remove_coupon_from_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/coupons/{coupon-code}".sub('{' + 'subscription-ID' + '}', subscription_id.to_s).sub('{' + 'coupon-code' + '}', coupon_code.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CouponPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#remove_coupon_from_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Decrease the amount of credit available to the specified subscription. {"nickname":"Remove Credit","response":"removeCreditForSubscription.html"} @param subscription_id @param value <p>Either a credit note ID or a currency value.</p><p>If a credit note ID is provided any remaining credit will be removed.</p><p>If a decimal is provided this value will be removed from any credit available to the subscription. For example if the subscription is in USD setting the value as 10 will reduce credit by $10 (USD), setting 9.86 would reduce the credit by $9.86 (USD). The value will be reduced from any credit available.</p> @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [CreditNotePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2754 def remove_credit_from_subscription(subscription_id, value, opts = {}) data, _status_code, _headers = remove_credit_from_subscription_with_http_info(subscription_id, value, opts) return data end
Decrease the amount of credit available to the specified subscription. {"nickname":"Remove Credit","response":"removeCreditForSubscription.html"} @param subscription_id @param value <p>Either a credit note ID or a currency value.</p><p>If a credit note ID is provided any remaining credit will be removed.</p><p>If a decimal is provided this value will be removed from any credit available to the subscription. For example if the subscription is in USD setting the value as 10 will reduce credit by $10 (USD), setting 9.86 would reduce the credit by $9.86 (USD). The value will be reduced from any credit available.</p> @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(CreditNotePagedMetadata
, Fixnum, Hash)>] CreditNotePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2766 def remove_credit_from_subscription_with_http_info(subscription_id, value, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.remove_credit_from_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.remove_credit_from_subscription" end # verify the required parameter 'value' is set if @api_client.config.client_side_validation && value.nil? fail ArgumentError, "Missing the required parameter 'value' when calling SubscriptionsApi.remove_credit_from_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/credit/{value}".sub('{' + 'subscription-ID' + '}', subscription_id.to_s).sub('{' + 'value' + '}', value.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreditNotePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#remove_credit_from_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes the specified payment method for the given subscription. {"nickname":"Remove payment-method","response":"removePaymentMethod.html","request":"removePaymentMethod.request.html"} @param subscription_id @param payment_method_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [PaymentMethodPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2818 def remove_payment_method_from_subscription(subscription_id, payment_method_id, opts = {}) data, _status_code, _headers = remove_payment_method_from_subscription_with_http_info(subscription_id, payment_method_id, opts) return data end
Removes the specified payment method for the given subscription. {"nickname":"Remove payment-method","response":"removePaymentMethod.html","request":"removePaymentMethod.request.html"} @param subscription_id @param payment_method_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(PaymentMethodPagedMetadata
, Fixnum, Hash)>] PaymentMethodPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2830 def remove_payment_method_from_subscription_with_http_info(subscription_id, payment_method_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.remove_payment_method_from_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.remove_payment_method_from_subscription" end # verify the required parameter 'payment_method_id' is set if @api_client.config.client_side_validation && payment_method_id.nil? fail ArgumentError, "Missing the required parameter 'payment_method_id' when calling SubscriptionsApi.remove_payment_method_from_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/payment-methods/{payment-method-ID}".sub('{' + 'subscription-ID' + '}', subscription_id.to_s).sub('{' + 'payment-method-ID' + '}', payment_method_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PaymentMethodPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#remove_payment_method_from_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Discards from the subscription any scheduled changes in the value of the specified pricing-component. {"nickname":"Discard value changes","response":"removePricingComponentValueChange.html"} @param subscription_id @param pricing_component @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [PaymentMethodPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2882 def remove_pricing_component_value_change_from_subscription(subscription_id, pricing_component, opts = {}) data, _status_code, _headers = remove_pricing_component_value_change_from_subscription_with_http_info(subscription_id, pricing_component, opts) return data end
Discards from the subscription any scheduled changes in the value of the specified pricing-component. {"nickname":"Discard value changes","response":"removePricingComponentValueChange.html"} @param subscription_id @param pricing_component @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(PaymentMethodPagedMetadata
, Fixnum, Hash)>] PaymentMethodPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2894 def remove_pricing_component_value_change_from_subscription_with_http_info(subscription_id, pricing_component, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.remove_pricing_component_value_change_from_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.remove_pricing_component_value_change_from_subscription" end # verify the required parameter 'pricing_component' is set if @api_client.config.client_side_validation && pricing_component.nil? fail ArgumentError, "Missing the required parameter 'pricing_component' when calling SubscriptionsApi.remove_pricing_component_value_change_from_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/values/{pricing-component}".sub('{' + 'subscription-ID' + '}', subscription_id.to_s).sub('{' + 'pricing-component' + '}', pricing_component.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain', 'application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PaymentMethodPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#remove_pricing_component_value_change_from_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Resume the frozen subscription. {"nickname":"Resume","request":"resumeSubscriptionRequest.html","response":"resumeSubscription.html"} @param subscription_id ID of the subscription. @param request The request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2945 def resume_subscription(subscription_id, request, opts = {}) data, _status_code, _headers = resume_subscription_with_http_info(subscription_id, request, opts) return data end
Resume the frozen subscription. {"nickname":"Resume","request":"resumeSubscriptionRequest.html","response":"resumeSubscription.html"} @param subscription_id ID of the subscription. @param request The request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 2956 def resume_subscription_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.resume_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.resume_subscription" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.resume_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/resume".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#resume_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Revives a cancelled subscription and returns it to its previous state {"nickname":"Revive subscription","request":"reviveSubscriptionRequest.html", "response":"reviveSubscription.html"} @param subscription_id @param request The revive request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3006 def revive_subscription(subscription_id, request, opts = {}) data, _status_code, _headers = revive_subscription_with_http_info(subscription_id, request, opts) return data end
Revives a cancelled subscription and returns it to its previous state {"nickname":"Revive subscription","request":"reviveSubscriptionRequest.html", "response":"reviveSubscription.html"} @param subscription_id @param request The revive request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3017 def revive_subscription_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.revive_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.revive_subscription" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.revive_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/revive".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#revive_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Remove any existing metadata keys and create the provided data. {"nickname":"Set on subscription","request":"setSubscriptionMetadataRequest.html","response":"setSubscriptionMetadataResponse.html"} @param metadata @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [DynamicMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3068 def set_metadata_for_subscription(metadata, subscription_id, opts = {}) data, _status_code, _headers = set_metadata_for_subscription_with_http_info(metadata, subscription_id, opts) return data end
Remove any existing metadata keys and create the provided data. {"nickname":"Set on subscription","request":"setSubscriptionMetadataRequest.html","response":"setSubscriptionMetadataResponse.html"} @param metadata @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(DynamicMetadata
, Fixnum, Hash)>] DynamicMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3080 def set_metadata_for_subscription_with_http_info(metadata, subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.set_metadata_for_subscription ..." end # verify the required parameter 'metadata' is set if @api_client.config.client_side_validation && metadata.nil? fail ArgumentError, "Missing the required parameter 'metadata' when calling SubscriptionsApi.set_metadata_for_subscription" end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.set_metadata_for_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/metadata".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(metadata) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#set_metadata_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Sets upon this subscription a new value for the specified pricing-component without performing an upgrade. {"nickname":"Set values","request":"setPricingComponentValuesRequest.html","response":"setPricingComponentValues.html"} @param subscription_id ID of the subscription. @param pricing_component_value The pricing-component-value request @param [Hash] opts the optional parameters @return [PricingComponentValuePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3131 def set_pricing_component_value_on_subscription(subscription_id, pricing_component_value, opts = {}) data, _status_code, _headers = set_pricing_component_value_on_subscription_with_http_info(subscription_id, pricing_component_value, opts) return data end
Upgrades/downgrades this subscription to some new value for the specified pricing-component. This endpoint can do synchronous (immediate) and asynchronous (delayed) updates. A synchronous update will generate a charge/credit for an UPGRADE or DOWNGRADE. An asynchronous update will generate an amendment scheduled for the end of the billing period. By default each update is considered synchronous, you can make them asynchronous setting 'applyChangeNow' to 'false'. {"nickname":"Set values","request":"setBatchPricingComponentValueRequest.html","response":"setBatchPricingComponentValue.html"} @param subscription_id ID of the subscription @param request The batched update requests. @param [Hash] opts the optional parameters @return [UpdatePricingComponentValueResponsePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3192 def set_pricing_component_value_on_subscription_batch_update(subscription_id, request, opts = {}) data, _status_code, _headers = set_pricing_component_value_on_subscription_batch_update_with_http_info(subscription_id, request, opts) return data end
Upgrades/downgrades this subscription to some new value for the specified pricing-component. This endpoint can do synchronous (immediate) and asynchronous (delayed) updates. A synchronous update will generate a charge/credit for an UPGRADE or DOWNGRADE. An asynchronous update will generate an amendment scheduled for the end of the billing period. By default each update is considered synchronous, you can make them asynchronous setting 'applyChangeNow' to 'false'. {"nickname":"Set values","request":"setBatchPricingComponentValueRequest.html","response":"setBatchPricingComponentValue.html"} @param subscription_id ID of the subscription @param request The batched update requests. @param [Hash] opts the optional parameters @return [Array<(UpdatePricingComponentValueResponsePagedMetadata
, Fixnum, Hash)>] UpdatePricingComponentValueResponsePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3203 def set_pricing_component_value_on_subscription_batch_update_with_http_info(subscription_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.set_pricing_component_value_on_subscription_batch_update ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.set_pricing_component_value_on_subscription_batch_update" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.set_pricing_component_value_on_subscription_batch_update" end # resource path local_var_path = "/subscriptions/{subscription-ID}/values".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UpdatePricingComponentValueResponsePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#set_pricing_component_value_on_subscription_batch_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Upgrades/downgrades this subscription to some new value for the specified pricing-component. {"nickname":"Set value","request":"setPricingComponentValueRequest.html","response":"setPricingComponentValue.html"} @param subscription_id @param pricing_component Name or ID of the pricing-component. @param value The pricing-component-value request @param [Hash] opts the optional parameters @return [PricingComponentValueResponsePagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3254 def set_pricing_component_value_on_subscription_v2(subscription_id, pricing_component, value, opts = {}) data, _status_code, _headers = set_pricing_component_value_on_subscription_v2_with_http_info(subscription_id, pricing_component, value, opts) return data end
Upgrades/downgrades this subscription to some new value for the specified pricing-component. {"nickname":"Set value","request":"setPricingComponentValueRequest.html","response":"setPricingComponentValue.html"} @param subscription_id @param pricing_component Name or ID of the pricing-component. @param value The pricing-component-value request @param [Hash] opts the optional parameters @return [Array<(PricingComponentValueResponsePagedMetadata
, Fixnum, Hash)>] PricingComponentValueResponsePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3266 def set_pricing_component_value_on_subscription_v2_with_http_info(subscription_id, pricing_component, value, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.set_pricing_component_value_on_subscription_v2 ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.set_pricing_component_value_on_subscription_v2" end # verify the required parameter 'pricing_component' is set if @api_client.config.client_side_validation && pricing_component.nil? fail ArgumentError, "Missing the required parameter 'pricing_component' when calling SubscriptionsApi.set_pricing_component_value_on_subscription_v2" end # verify the required parameter 'value' is set if @api_client.config.client_side_validation && value.nil? fail ArgumentError, "Missing the required parameter 'value' when calling SubscriptionsApi.set_pricing_component_value_on_subscription_v2" end # resource path local_var_path = "/subscriptions/{subscription-ID}/values/{pricing-component}".sub('{' + 'subscription-ID' + '}', subscription_id.to_s).sub('{' + 'pricing-component' + '}', pricing_component.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(value) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PricingComponentValueResponsePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#set_pricing_component_value_on_subscription_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Sets upon this subscription a new value for the specified pricing-component without performing an upgrade. {"nickname":"Set values","request":"setPricingComponentValuesRequest.html","response":"setPricingComponentValues.html"} @param subscription_id ID of the subscription. @param pricing_component_value The pricing-component-value request @param [Hash] opts the optional parameters @return [Array<(PricingComponentValuePagedMetadata
, Fixnum, Hash)>] PricingComponentValuePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3142 def set_pricing_component_value_on_subscription_with_http_info(subscription_id, pricing_component_value, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.set_pricing_component_value_on_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.set_pricing_component_value_on_subscription" end # verify the required parameter 'pricing_component_value' is set if @api_client.config.client_side_validation && pricing_component_value.nil? fail ArgumentError, "Missing the required parameter 'pricing_component_value' when calling SubscriptionsApi.set_pricing_component_value_on_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/pricing-component-values".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(pricing_component_value) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PricingComponentValuePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#set_pricing_component_value_on_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a subscription. {"nickname":"Update a subscription","request":"updateSubscriptionRequest.html","response":"updateSubscriptionResponse.html"} @param subscription The subscription object to be updated. @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3319 def update_subscription(subscription, opts = {}) data, _status_code, _headers = update_subscription_with_http_info(subscription, opts) return data end
Update a subscription (V2). {"nickname":"Update subscription (V2)","response":"updateSubscriptionViaHelper.html","request":"updateSubscriptionViaHelper.request.html"} @param request @param [Hash] opts the optional parameters @return [SubscriptionPagedMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3374 def update_subscription_v2(request, opts = {}) data, _status_code, _headers = update_subscription_v2_with_http_info(request, opts) return data end
Update a subscription (V2). {"nickname":"Update subscription (V2)","response":"updateSubscriptionViaHelper.html","request":"updateSubscriptionViaHelper.request.html"} @param request @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3384 def update_subscription_v2_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.update_subscription_v2 ..." end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SubscriptionsApi.update_subscription_v2" end # resource path local_var_path = "/subscriptions/update" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#update_subscription_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a subscription. {"nickname":"Update a subscription","request":"updateSubscriptionRequest.html","response":"updateSubscriptionResponse.html"} @param subscription The subscription object to be updated. @param [Hash] opts the optional parameters @return [Array<(SubscriptionPagedMetadata
, Fixnum, Hash)>] SubscriptionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3329 def update_subscription_with_http_info(subscription, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.update_subscription ..." end # verify the required parameter 'subscription' is set if @api_client.config.client_side_validation && subscription.nil? fail ArgumentError, "Missing the required parameter 'subscription' when calling SubscriptionsApi.update_subscription" end # resource path local_var_path = "/subscriptions" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(subscription) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SubscriptionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#update_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update any existing metadata key-values and insert any new key-values, no keys will be removed. {"nickname":"Upsert on subscription","request":"upsertSubscriptionMetadataRequest.html","response":"upsertSubscriptionMetadataResponse.html"} @param metadata @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [DynamicMetadata]
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3431 def upsert_metadata_for_subscription(metadata, subscription_id, opts = {}) data, _status_code, _headers = upsert_metadata_for_subscription_with_http_info(metadata, subscription_id, opts) return data end
Update any existing metadata key-values and insert any new key-values, no keys will be removed. {"nickname":"Upsert on subscription","request":"upsertSubscriptionMetadataRequest.html","response":"upsertSubscriptionMetadataResponse.html"} @param metadata @param subscription_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(DynamicMetadata
, Fixnum, Hash)>] DynamicMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/subscriptions_api.rb, line 3443 def upsert_metadata_for_subscription_with_http_info(metadata, subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SubscriptionsApi.upsert_metadata_for_subscription ..." end # verify the required parameter 'metadata' is set if @api_client.config.client_side_validation && metadata.nil? fail ArgumentError, "Missing the required parameter 'metadata' when calling SubscriptionsApi.upsert_metadata_for_subscription" end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.upsert_metadata_for_subscription" end # resource path local_var_path = "/subscriptions/{subscription-ID}/metadata".sub('{' + 'subscription-ID' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(metadata) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DynamicMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionsApi#upsert_metadata_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end