class Bfwd::InvoicesApi
Attributes
Public Class Methods
# File lib/bf_ruby2/api/invoices_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Creates a charge on the specified invoice. {"nickname":"Add to invoice","response":"addChargeToInvoice.html","request":"addChargeToInvoiceRequest.html"} @param invoice_id ID of the invoice. @param charge The charge request @param [Hash] opts the optional parameters @return [SubscriptionChargePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 29 def add_charge_to_invoice(invoice_id, charge, opts = {}) data, _status_code, _headers = add_charge_to_invoice_with_http_info(invoice_id, charge, opts) return data end
Creates a charge on the specified invoice. {"nickname":"Add to invoice","response":"addChargeToInvoice.html","request":"addChargeToInvoiceRequest.html"} @param invoice_id ID of the invoice. @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/invoices_api.rb, line 40 def add_charge_to_invoice_with_http_info(invoice_id, charge, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.add_charge_to_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.add_charge_to_invoice" 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 InvoicesApi.add_charge_to_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/charges".sub('{' + 'invoice-ID' + '}', invoice_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: InvoicesApi#add_charge_to_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Aggregate Invoices into to one parent Invoice
{"nickname":"Aggregate invoices","response":"AggregateResponse.html","request":"AggregateRequest.html"} @param request @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 89 def aggregate_invoices(request, opts = {}) data, _status_code, _headers = aggregate_invoices_with_http_info(request, opts) return data end
Aggregate Invoices into to one parent Invoice
{"nickname":"Aggregate invoices","response":"AggregateResponse.html","request":"AggregateRequest.html"} @param 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/invoices_api.rb, line 99 def aggregate_invoices_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.aggregate_invoices ..." 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 InvoicesApi.aggregate_invoices" end # resource path local_var_path = "/invoices/aggregate" # 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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#aggregate_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Attempt payment for the outstanding value of an invoice {"nickname":"Execute invoice","response":"executeInvoiceResponse.html","request":"ExecuteInvoiceRequest.html"} @param invoice_id @param request @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 145 def execute_invoice(invoice_id, request, opts = {}) data, _status_code, _headers = execute_invoice_with_http_info(invoice_id, request, opts) return data end
Attempt payment for the outstanding value of an invoice {"nickname":"Execute invoice","response":"executeInvoiceResponse.html","request":"ExecuteInvoiceRequest.html"} @param invoice_id @param 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/invoices_api.rb, line 156 def execute_invoice_with_http_info(invoice_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.execute_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.execute_invoice" 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 InvoicesApi.execute_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/execute".sub('{' + 'invoice-ID' + '}', invoice_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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#execute_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Generates InvoiceLinePayments for all existing InvoicePayments. { "nickname" : "Generate InvoiceLinePayments","response" : "Generate InvoiceLinePayments.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. @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 205 def generate_line_payments_for_all_invoices(opts = {}) data, _status_code, _headers = generate_line_payments_for_all_invoices_with_http_info(opts) return data end
Generates InvoiceLinePayments for all existing InvoicePayments. { "nickname" : "Generate InvoiceLinePayments","response" : "Generate InvoiceLinePayments.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. @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 215 def generate_line_payments_for_all_invoices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.generate_line_payments_for_all_invoices ..." end # resource path local_var_path = "/invoices/generate-line-payments" # 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 = nil 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#generate_line_payments_for_all_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of all invoices. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve all invoices","response" : "getInvoiceAll.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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. (default to true) @option opts [String] :metadata @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 264 def get_all_invoices(opts = {}) data, _status_code, _headers = get_all_invoices_with_http_info(opts) return data end
Retrieves a collection of all invoices. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve all invoices","response" : "getInvoiceAll.csv"} @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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 338 def get_all_invoices_as_csv(opts = {}) data, _status_code, _headers = get_all_invoices_as_csv_with_http_info(opts) return data end
Retrieves a collection of all invoices. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve all invoices","response" : "getInvoiceAll.csv"} @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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 353 def get_all_invoices_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_all_invoices_as_csv ..." 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 = "/invoices/all.csv" # 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(['text/csv']) # 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: InvoicesApi#get_all_invoices_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of all invoices. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve all invoices","response" : "getInvoiceAll.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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. @option opts [String] :metadata @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 281 def get_all_invoices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_all_invoices ..." 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 = "/invoices" # 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? # 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: InvoicesApi#get_all_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves (as CSV) all attributions of Invoice
costs to Invoice
lines, bucketed. { "nickname" : "(CSV) Retrieve bucketed revenue attributions","response" : "getBucketedRevenueAttributions.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue attributions will be recognised (example input: 2015-10-13T11:50:24). @return [String]
# File lib/bf_ruby2/api/invoices_api.rb, line 405 def get_bucketed_revenue_attributions_as_csv(opts = {}) data, _status_code, _headers = get_bucketed_revenue_attributions_as_csv_with_http_info(opts) return data end
Retrieves (as CSV) all attributions of Invoice
costs to Invoice
lines, bucketed. { "nickname" : "(CSV) Retrieve bucketed revenue attributions","response" : "getBucketedRevenueAttributions.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue attributions will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 417 def get_bucketed_revenue_attributions_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_bucketed_revenue_attributions_as_csv ..." end # resource path local_var_path = "/invoices/bucketed-revenue-attributions.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_bucketed_revenue_attributions_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns all charges for the specified invoice. By default 10 values are returned. Records are returned in natural order. {"nickname":"List on invoice","response":"getChargesInvoice.html"} @param invoice_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 [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/invoices_api.rb, line 465 def get_charges_on_invoice(invoice_id, opts = {}) data, _status_code, _headers = get_charges_on_invoice_with_http_info(invoice_id, opts) return data end
Returns all charges for the specified invoice. By default 10 values are returned. Records are returned in natural order. {"nickname":"List on invoice","response":"getChargesInvoice.html"} @param invoice_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/invoices_api.rb, line 483 def get_charges_on_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_charges_on_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.get_charges_on_invoice" 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 = "/invoices/{invoice-ID}/charges".sub('{' + 'invoice-ID' + '}', invoice_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: InvoicesApi#get_charges_on_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves credit note-paid from InvoicePayments upon line items, in CSV format. { "nickname" : "Credit InvoiceLinePayments CSV","response" : "Credit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which credit payments will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which credit payments will be recognised (example input: 2015-10-13T11:50:24). @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 547 def get_credit_invoice_line_payments_from_invoices_as_csv(opts = {}) data, _status_code, _headers = get_credit_invoice_line_payments_from_invoices_as_csv_with_http_info(opts) return data end
Retrieves credit note-paid from InvoicePayments upon line items, in CSV format. { "nickname" : "Credit InvoiceLinePayments CSV","response" : "Credit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which credit payments will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which credit payments will be recognised (example input: 2015-10-13T11:50:24). @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 605 def get_credit_invoice_line_payments_from_invoices_as_csv_by_payment_received(opts = {}) data, _status_code, _headers = get_credit_invoice_line_payments_from_invoices_as_csv_by_payment_received_with_http_info(opts) return data end
Retrieves credit note-paid from InvoicePayments upon line items, in CSV format. { "nickname" : "Credit InvoiceLinePayments CSV","response" : "Credit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which credit payments will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which credit payments will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 617 def get_credit_invoice_line_payments_from_invoices_as_csv_by_payment_received_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_credit_invoice_line_payments_from_invoices_as_csv_by_payment_received ..." end # resource path local_var_path = "/invoices/payment-received/credit.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_credit_invoice_line_payments_from_invoices_as_csv_by_payment_received\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves credit note-paid from InvoicePayments upon line items, in CSV format. { "nickname" : "Credit InvoiceLinePayments CSV","response" : "Credit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which credit payments will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which credit payments will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 559 def get_credit_invoice_line_payments_from_invoices_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_credit_invoice_line_payments_from_invoices_as_csv ..." end # resource path local_var_path = "/invoices/credit.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_credit_invoice_line_payments_from_invoices_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves received revenue from InvoicePayments upon line items, in CSV format. { "nickname" : "Debit InvoiceLinePayments CSV","response" : "Debit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue will be recognised (example input: 2015-10-13T11:50:24). @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 663 def get_debit_invoice_line_payments_from_invoices_as_csv(opts = {}) data, _status_code, _headers = get_debit_invoice_line_payments_from_invoices_as_csv_with_http_info(opts) return data end
Retrieves received revenue from InvoicePayments upon line items, in CSV format. { "nickname" : "Debit InvoiceLinePayments CSV","response" : "Debit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue will be recognised (example input: 2015-10-13T11:50:24). @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 721 def get_debit_invoice_line_payments_from_invoices_as_csv_by_payment_received(opts = {}) data, _status_code, _headers = get_debit_invoice_line_payments_from_invoices_as_csv_by_payment_received_with_http_info(opts) return data end
Retrieves received revenue from InvoicePayments upon line items, in CSV format. { "nickname" : "Debit InvoiceLinePayments CSV","response" : "Debit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 733 def get_debit_invoice_line_payments_from_invoices_as_csv_by_payment_received_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_debit_invoice_line_payments_from_invoices_as_csv_by_payment_received ..." end # resource path local_var_path = "/invoices/payment-received/revenue.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_debit_invoice_line_payments_from_invoices_as_csv_by_payment_received\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves received revenue from InvoicePayments upon line items, in CSV format. { "nickname" : "Debit InvoiceLinePayments CSV","response" : "Debit InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 675 def get_debit_invoice_line_payments_from_invoices_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_debit_invoice_line_payments_from_invoices_as_csv ..." end # resource path local_var_path = "/invoices/revenue.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_debit_invoice_line_payments_from_invoices_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice specified by the ID parameter. { "nickname" : "HTML invoice","response" : "getInvoiceByID.HTML.html"} @param id The ID of the invoice. @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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :tier_breakdown Whether to provide a breakdown of charge tiering. (default to false) @option opts [BOOLEAN] :inclusive_end Whether to present in the Invoice
date range only those dates whose entirety are involved in the billing period. In other words: when true, this subtracts 1 from the "period end" date shown to the customer. (default to false) @option opts [BOOLEAN] :show_zero_cost Whether to show zero-cost lines. (default to true) @option opts [BOOLEAN] :show_plan_only_when_ambiguous Whether to state which plan the Invoice
lines came from, regardless of whether there's only one plan involved in this Invoice
. (default to true) @return [String]
# File lib/bf_ruby2/api/invoices_api.rb, line 787 def get_invoice_as_html(id, opts = {}) data, _status_code, _headers = get_invoice_as_html_with_http_info(id, opts) return data end
Retrieves a single invoice specified by the ID parameter. { "nickname" : "HTML invoice","response" : "getInvoiceByID.HTML.html"} @param id The ID of the invoice. @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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :tier_breakdown Whether to provide a breakdown of charge tiering. @option opts [BOOLEAN] :inclusive_end Whether to present in the Invoice
date range only those dates whose entirety are involved in the billing period. In other words: when true, this subtracts 1 from the "period end" date shown to the customer. @option opts [BOOLEAN] :show_zero_cost Whether to show zero-cost lines. @option opts [BOOLEAN] :show_plan_only_when_ambiguous Whether to state which plan the Invoice
lines came from, regardless of whether there's only one plan involved in this Invoice
. @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 807 def get_invoice_as_html_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_as_html ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.get_invoice_as_html" 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 = "/invoices/{ID}.html".sub('{' + 'ID' + '}', 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[:'tier_breakdown'] = opts[:'tier_breakdown'] if !opts[:'tier_breakdown'].nil? query_params[:'inclusive_end'] = opts[:'inclusive_end'] if !opts[:'inclusive_end'].nil? query_params[:'show_zero_cost'] = opts[:'show_zero_cost'] if !opts[:'show_zero_cost'].nil? query_params[:'show_plan_only_when_ambiguous'] = opts[:'show_plan_only_when_ambiguous'] if !opts[:'show_plan_only_when_ambiguous'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/html']) # 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoice_as_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice specified by the ID parameter. { "nickname" : "PDF Invoice","response" : "getInvoiceByID.pdf"} @param id The ID of the invoice. @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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :tier_breakdown Whether to provide a breakdown of charge tiering. (default to false) @option opts [BOOLEAN] :inclusive_end Whether to present in the Invoice
date range only those dates whose entirety are involved in the billing period. In other words: when true, this subtracts 1 from the "period end" date shown to the customer. (default to false) @option opts [BOOLEAN] :show_zero_cost Whether to show zero-cost lines. (default to true) @option opts [BOOLEAN] :show_plan_only_when_ambiguous Whether to state which plan the Invoice
lines came from, regardless of whether there's only one plan involved in this Invoice
. (default to true) @option opts [BOOLEAN] :include_footer @option opts [String] :group_line_items_by @return [File]
# File lib/bf_ruby2/api/invoices_api.rb, line 877 def get_invoice_as_pdf(id, opts = {}) data, _status_code, _headers = get_invoice_as_pdf_with_http_info(id, opts) return data end
Retrieves a single invoice specified by the ID parameter. { "nickname" : "PDF Invoice","response" : "getInvoiceByID.pdf"} @param id The ID of the invoice. @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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :tier_breakdown Whether to provide a breakdown of charge tiering. @option opts [BOOLEAN] :inclusive_end Whether to present in the Invoice
date range only those dates whose entirety are involved in the billing period. In other words: when true, this subtracts 1 from the "period end" date shown to the customer. @option opts [BOOLEAN] :show_zero_cost Whether to show zero-cost lines. @option opts [BOOLEAN] :show_plan_only_when_ambiguous Whether to state which plan the Invoice
lines came from, regardless of whether there's only one plan involved in this Invoice
. @option opts [BOOLEAN] :include_footer @option opts [String] :group_line_items_by @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 899 def get_invoice_as_pdf_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_as_pdf ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.get_invoice_as_pdf" 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[:'group_line_items_by'] && !['Product', 'RatePlan', 'ProductAndRatePlan'].include?(opts[:'group_line_items_by']) fail ArgumentError, 'invalid value for "group_line_items_by", must be one of Product, RatePlan, ProductAndRatePlan' end # resource path local_var_path = "/invoices/{ID}.pdf".sub('{' + 'ID' + '}', 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[:'tier_breakdown'] = opts[:'tier_breakdown'] if !opts[:'tier_breakdown'].nil? query_params[:'inclusive_end'] = opts[:'inclusive_end'] if !opts[:'inclusive_end'].nil? query_params[:'show_zero_cost'] = opts[:'show_zero_cost'] if !opts[:'show_zero_cost'].nil? query_params[:'show_plan_only_when_ambiguous'] = opts[:'show_plan_only_when_ambiguous'] if !opts[:'show_plan_only_when_ambiguous'].nil? query_params[:'include_footer'] = opts[:'include_footer'] if !opts[:'include_footer'].nil? query_params[:'group_line_items_by'] = opts[:'group_line_items_by'] if !opts[:'group_line_items_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf']) # 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoice_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice specified by the invoice-ID parameter. { "nickname" : "Retrieve an existing invoice","response" : "getInvoiceByID.html"} @param invoice_id The ID of the invoice. @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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. (default to true) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 969 def get_invoice_by_id(invoice_id, opts = {}) data, _status_code, _headers = get_invoice_by_id_with_http_info(invoice_id, opts) return data end
Retrieves a single invoice specified by the ID parameter. { "nickname" : "CSV invoice","response" : "getInvoiceByID.csv"} @param id The ID of the invoice. @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 [String]
# File lib/bf_ruby2/api/invoices_api.rb, line 1042 def get_invoice_by_id_as_csv(id, opts = {}) data, _status_code, _headers = get_invoice_by_id_as_csv_with_http_info(id, opts) return data end
Retrieves a single invoice specified by the ID parameter. { "nickname" : "CSV invoice","response" : "getInvoiceByID.csv"} @param id The ID of the invoice. @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<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1053 def get_invoice_by_id_as_csv_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_by_id_as_csv ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.get_invoice_by_id_as_csv" end # resource path local_var_path = "/invoices/{ID}.csv".sub('{' + 'ID' + '}', 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(['text/csv']) # 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoice_by_id_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice specified by the invoice-ID parameter. { "nickname" : "Retrieve an existing invoice","response" : "getInvoiceByID.html"} @param invoice_id The ID of the invoice. @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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 986 def get_invoice_by_id_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_by_id ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.get_invoice_by_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 = "/invoices/{invoice-ID}".sub('{' + 'invoice-ID' + '}', invoice_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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoice_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoices specified by the subscription-ID parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by subscription","response" : "getInvoiceBySubscriptionID.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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. (default to true) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1106 def get_invoice_by_subscription_id(subscription_id, opts = {}) data, _status_code, _headers = get_invoice_by_subscription_id_with_http_info(subscription_id, opts) return data end
Retrieves a collection of invoices specified by the subscription-ID parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by subscription","response" : "getInvoiceBySubscriptionID.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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1123 def get_invoice_by_subscription_id_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_by_subscription_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 InvoicesApi.get_invoice_by_subscription_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 = "/invoices/subscription/{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[:'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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoice_by_subscription_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoices specified by the subscription-version-ID parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by subscription version","response" : "getInvoiceBySubscriptionVersionID.html"} @param subscription_version_id 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. @option opts [Integer] :offset The offset from the first invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. (default to true) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1185 def get_invoice_by_subscription_version_id(subscription_version_id, opts = {}) data, _status_code, _headers = get_invoice_by_subscription_version_id_with_http_info(subscription_version_id, opts) return data end
Retrieves a collection of invoices specified by the subscription-version-ID parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by subscription version","response" : "getInvoiceBySubscriptionVersionID.html"} @param subscription_version_id 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. @option opts [Integer] :offset The offset from the first invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1202 def get_invoice_by_subscription_version_id_with_http_info(subscription_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_by_subscription_version_id ..." end # verify the required parameter 'subscription_version_id' is set if @api_client.config.client_side_validation && subscription_version_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_version_id' when calling InvoicesApi.get_invoice_by_subscription_version_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 = "/invoices/subscription/version/{subscription-version-ID}".sub('{' + 'subscription-version-ID' + '}', subscription_version_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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoice_by_subscription_version_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getInvoiceByVersionID.html"} @param version_id The version-ID of the invoice. @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 [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1258 def get_invoice_by_version_id(version_id, opts = {}) data, _status_code, _headers = get_invoice_by_version_id_with_http_info(version_id, opts) return data end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getInvoiceByVersionID.html"} @param version_id The version-ID of the invoice. @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<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1269 def get_invoice_by_version_id_with_http_info(version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoice_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 InvoicesApi.get_invoice_by_version_id" end # resource path local_var_path = "/invoices/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', 'text/xml']) # 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: InvoicesApi#get_invoice_by_version_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoices specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by account","response" : "getInvoiceByAccountID.html"} @param account_id ID of the account. @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 invoice to return. (default to 0) @option opts [Integer] :records The maximum number of invoices 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 products should be returned. (default to false) @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. (default to true) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1322 def get_invoices_by_account_id(account_id, opts = {}) data, _status_code, _headers = get_invoices_by_account_id_with_http_info(account_id, opts) return data end
Retrieves a collection of invoices specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by account","response" : "getInvoiceByAccountID.html"} @param account_id ID of the account. @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 invoice to return. @option opts [Integer] :records The maximum number of invoices 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 products should be returned. @option opts [BOOLEAN] :exclude_children Should child invoices be excluded. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1339 def get_invoices_by_account_id_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_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 InvoicesApi.get_invoices_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 = "/invoices/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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoices_by_account_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoice 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" : "getInvoiceByPeriodEnd.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) @option opts [BOOLEAN] :include_retired Whether retired products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1401 def get_invoices_by_period_end(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_invoices_by_period_end_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of invoice 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" : "getInvoiceByPeriodEnd.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. @option opts [BOOLEAN] :include_retired Whether retired products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1418 def get_invoices_by_period_end_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_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 InvoicesApi.get_invoices_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 InvoicesApi.get_invoices_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 = "/invoices/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? 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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoices_by_period_end\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoice 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" : "getInvoiceByPeriodStart.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) @option opts [BOOLEAN] :include_retired Whether retired products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1483 def get_invoices_by_period_start(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_invoices_by_period_start_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of invoice 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" : "getInvoiceByPeriodStart.csv"} @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) @option opts [BOOLEAN] :include_retired Whether retired products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1565 def get_invoices_by_period_start_as_csv(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_invoices_by_period_start_as_csv_with_http_info(lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of invoice 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" : "getInvoiceByPeriodStart.csv"} @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. @option opts [BOOLEAN] :include_retired Whether retired products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1582 def get_invoices_by_period_start_as_csv_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_by_period_start_as_csv ..." 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 InvoicesApi.get_invoices_by_period_start_as_csv" 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 InvoicesApi.get_invoices_by_period_start_as_csv" 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 = "/invoices/period-start/{lower-threshold}/{upper-threshold}.csv".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? 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(['text/csv']) # 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: InvoicesApi#get_invoices_by_period_start_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoice 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" : "getInvoiceByPeriodStart.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. @option opts [BOOLEAN] :include_retired Whether retired products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1500 def get_invoices_by_period_start_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_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 InvoicesApi.get_invoices_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 InvoicesApi.get_invoices_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 = "/invoices/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? 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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoices_by_period_start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoices, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by state","response" : "getInvoiceByState.html"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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 products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1646 def get_invoices_by_state(state, opts = {}) data, _status_code, _headers = get_invoices_by_state_with_http_info(state, opts) return data end
Retrieves a collection of invoice objects specified by the state parameter and 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 state and period-start","response" : "getInvoiceByStateAndPeriodStart.html"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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) @option opts [BOOLEAN] :include_retired Whether retired products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1736 def get_invoices_by_state_and_period_start(state, lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_invoices_by_state_and_period_start_with_http_info(state, lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of invoice objects specified by the state parameter and 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 state and period-start","response" : "getInvoiceByStateAndPeriodStart.csv"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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) @option opts [BOOLEAN] :include_retired Whether retired products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1828 def get_invoices_by_state_and_period_start_as_csv(state, lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_invoices_by_state_and_period_start_as_csv_with_http_info(state, lower_threshold, upper_threshold, opts) return data end
Retrieves a collection of invoice objects specified by the state parameter and 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 state and period-start","response" : "getInvoiceByStateAndPeriodStart.csv"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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. @option opts [BOOLEAN] :include_retired Whether retired products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1846 def get_invoices_by_state_and_period_start_as_csv_with_http_info(state, lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_by_state_and_period_start_as_csv ..." 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 InvoicesApi.get_invoices_by_state_and_period_start_as_csv" 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 # 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 InvoicesApi.get_invoices_by_state_and_period_start_as_csv" 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 InvoicesApi.get_invoices_by_state_and_period_start_as_csv" 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 = "/invoices/state/{state}/period-start/{lower-threshold}/{upper-threshold}.csv".sub('{' + 'state' + '}', state.to_s).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? 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(['text/csv']) # 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: InvoicesApi#get_invoices_by_state_and_period_start_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoice objects specified by the state parameter and 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 state and period-start","response" : "getInvoiceByStateAndPeriodStart.html"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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. @option opts [BOOLEAN] :include_retired Whether retired products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1754 def get_invoices_by_state_and_period_start_with_http_info(state, lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_by_state_and_period_start ..." 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 InvoicesApi.get_invoices_by_state_and_period_start" 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 # 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 InvoicesApi.get_invoices_by_state_and_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 InvoicesApi.get_invoices_by_state_and_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 = "/invoices/state/{state}/period-start/{lower-threshold}/{upper-threshold}".sub('{' + 'state' + '}', state.to_s).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? 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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_invoices_by_state_and_period_start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoices, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by state","response" : "getInvoiceByState.csv"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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 products should be returned. (default to false) @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 1918 def get_invoices_by_state_as_csv(state, opts = {}) data, _status_code, _headers = get_invoices_by_state_as_csv_with_http_info(state, opts) return data end
Retrieves a collection of invoices, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by state","response" : "getInvoiceByState.csv"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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 products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1934 def get_invoices_by_state_as_csv_with_http_info(state, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_by_state_as_csv ..." 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 InvoicesApi.get_invoices_by_state_as_csv" 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 && state.length > 2147483647 fail ArgumentError, 'invalid value for "state" when calling InvoicesApi.get_invoices_by_state_as_csv, number of items must be less than or equal to 2147483647.' end if @api_client.config.client_side_validation && state.length < 5 fail ArgumentError, 'invalid value for "state" when calling InvoicesApi.get_invoices_by_state_as_csv, number of items must be greater than or equal to 5.' 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 = "/invoices/state/{state}.csv".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? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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: InvoicesApi#get_invoices_by_state_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a collection of invoices, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Retrieve by state","response" : "getInvoiceByState.html"} @param state The current state of the invoice, either Paid, Pending, Unpaid or Voided. @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 products should be returned. @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 1662 def get_invoices_by_state_with_http_info(state, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_invoices_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 InvoicesApi.get_invoices_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 && state.length > 2147483647 fail ArgumentError, 'invalid value for "state" when calling InvoicesApi.get_invoices_by_state, number of items must be less than or equal to 2147483647.' end if @api_client.config.client_side_validation && state.length < 5 fail ArgumentError, 'invalid value for "state" when calling InvoicesApi.get_invoices_by_state, number of items must be greater than or equal to 5.' 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 = "/invoices/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? # 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: InvoicesApi#get_invoices_by_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all InvoiceLine
payment attributions. { "nickname" : "Retrieve InvoiceLine
payment attributions","response" : "getInvoiceLinePayments.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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which line payment attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which line payment attributions will be recognised (example input: 2015-10-13T11:50:24). @option opts [Array<String>] :include_gateway Include attributions only from payments made via these payment gateways. Takes precedence over `exclude_gateway` param (if both are provided). @option opts [Array<String>] :exclude_gateway Include attributions from payments made via all payment gateways, except these. @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2004 def get_line_payments(opts = {}) data, _status_code, _headers = get_line_payments_with_http_info(opts) return data end
Retrieves (as CSV) all InvoiceLine
payment attributions. { "nickname" : "(CSV) Retrieve InvoiceLine
payment attributions","response" : "getInvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which line payment attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which line payment attributions will be recognised (example input: 2015-10-13T11:50:24). @option opts [Array<String>] :include_gateway Include attributions only from payments made via these payment gateways. Takes precedence over `exclude_gateway` param (if both are provided). @option opts [Array<String>] :exclude_gateway Include attributions from payments made via all payment gateways, except these. @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2070 def get_line_payments_as_csv(opts = {}) data, _status_code, _headers = get_line_payments_as_csv_with_http_info(opts) return data end
Retrieves (as CSV) all InvoiceLine
payment attributions. { "nickname" : "(CSV) Retrieve InvoiceLine
payment attributions","response" : "getInvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which line payment attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which line payment attributions will be recognised (example input: 2015-10-13T11:50:24). @option opts [Array<String>] :include_gateway Include attributions only from payments made via these payment gateways. Takes precedence over `exclude_gateway` param (if both are provided). @option opts [Array<String>] :exclude_gateway Include attributions from payments made via all payment gateways, except these. @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2084 def get_line_payments_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_line_payments_as_csv ..." end if @api_client.config.client_side_validation && opts[:'include_gateway'] && !opts[:'include_gateway'].all?{|item| ['cybersource_token', 'card_vault', 'paypal_simple', 'locustworld', 'free', 'coupon', 'credit_note', 'stripe', 'braintree', 'balanced', 'paypal', 'billforward_test', 'offline', 'trial', 'stripeACH', 'authorizeNet', 'spreedly', 'sagePay', 'trustCommerce', 'payvision', 'kash'].include?(item)} fail ArgumentError, 'invalid value for "include_gateway", must include one of cybersource_token, card_vault, paypal_simple, locustworld, free, coupon, credit_note, stripe, braintree, balanced, paypal, billforward_test, offline, trial, stripeACH, authorizeNet, spreedly, sagePay, trustCommerce, payvision, kash' end if @api_client.config.client_side_validation && opts[:'exclude_gateway'] && !opts[:'exclude_gateway'].all?{|item| ['cybersource_token', 'card_vault', 'paypal_simple', 'locustworld', 'free', 'coupon', 'credit_note', 'stripe', 'braintree', 'balanced', 'paypal', 'billforward_test', 'offline', 'trial', 'stripeACH', 'authorizeNet', 'spreedly', 'sagePay', 'trustCommerce', 'payvision', 'kash'].include?(item)} fail ArgumentError, 'invalid value for "exclude_gateway", must include one of cybersource_token, card_vault, paypal_simple, locustworld, free, coupon, credit_note, stripe, braintree, balanced, paypal, billforward_test, offline, trial, stripeACH, authorizeNet, spreedly, sagePay, trustCommerce, payvision, kash' end # resource path local_var_path = "/invoices/line-payments.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? query_params[:'include_gateway'] = @api_client.build_collection_param(opts[:'include_gateway'], :multi) if !opts[:'include_gateway'].nil? query_params[:'exclude_gateway'] = @api_client.build_collection_param(opts[:'exclude_gateway'], :multi) if !opts[:'exclude_gateway'].nil? # header parameters header_params = {} # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_line_payments_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all InvoiceLine
payment attributions. { "nickname" : "Retrieve InvoiceLine
payment attributions","response" : "getInvoiceLinePayments.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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which line payment attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which line payment attributions will be recognised (example input: 2015-10-13T11:50:24). @option opts [Array<String>] :include_gateway Include attributions only from payments made via these payment gateways. Takes precedence over `exclude_gateway` param (if both are provided). @option opts [Array<String>] :exclude_gateway Include attributions from payments made via all payment gateways, except these. @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2018 def get_line_payments_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_line_payments ..." end if @api_client.config.client_side_validation && opts[:'include_gateway'] && !opts[:'include_gateway'].all?{|item| ['cybersource_token', 'card_vault', 'paypal_simple', 'locustworld', 'free', 'coupon', 'credit_note', 'stripe', 'braintree', 'balanced', 'paypal', 'billforward_test', 'offline', 'trial', 'stripeACH', 'authorizeNet', 'spreedly', 'sagePay', 'trustCommerce', 'payvision', 'kash'].include?(item)} fail ArgumentError, 'invalid value for "include_gateway", must include one of cybersource_token, card_vault, paypal_simple, locustworld, free, coupon, credit_note, stripe, braintree, balanced, paypal, billforward_test, offline, trial, stripeACH, authorizeNet, spreedly, sagePay, trustCommerce, payvision, kash' end if @api_client.config.client_side_validation && opts[:'exclude_gateway'] && !opts[:'exclude_gateway'].all?{|item| ['cybersource_token', 'card_vault', 'paypal_simple', 'locustworld', 'free', 'coupon', 'credit_note', 'stripe', 'braintree', 'balanced', 'paypal', 'billforward_test', 'offline', 'trial', 'stripeACH', 'authorizeNet', 'spreedly', 'sagePay', 'trustCommerce', 'payvision', 'kash'].include?(item)} fail ArgumentError, 'invalid value for "exclude_gateway", must include one of cybersource_token, card_vault, paypal_simple, locustworld, free, coupon, credit_note, stripe, braintree, balanced, paypal, billforward_test, offline, trial, stripeACH, authorizeNet, spreedly, sagePay, trustCommerce, payvision, kash' end # resource path local_var_path = "/invoices/line-payments" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? query_params[:'include_gateway'] = @api_client.build_collection_param(opts[:'include_gateway'], :multi) if !opts[:'include_gateway'].nil? query_params[:'exclude_gateway'] = @api_client.build_collection_param(opts[:'exclude_gateway'], :multi) if !opts[:'exclude_gateway'].nil? # header parameters header_params = {} # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_line_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve any associated metadata. {"nickname":"Retrieve metadata on invoice","request":"getInvoiceMetadataRequest.html","response":"getInvoiceMetadataResponse.html"} @param invoice_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/invoices_api.rb, line 2133 def get_metadata_for_invoice(invoice_id, opts = {}) data, _status_code, _headers = get_metadata_for_invoice_with_http_info(invoice_id, opts) return data end
Retrieve any associated metadata. {"nickname":"Retrieve metadata on invoice","request":"getInvoiceMetadataRequest.html","response":"getInvoiceMetadataResponse.html"} @param invoice_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/invoices_api.rb, line 2144 def get_metadata_for_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_metadata_for_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.get_metadata_for_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/metadata".sub('{' + 'invoice-ID' + '}', invoice_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: InvoicesApi#get_metadata_for_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves awarded refunds from InvoicePayments upon line items, in CSV format. { "nickname" : "Refund InvoiceLinePayments CSV","response" : "Refund InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which refunds will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which refunds will be recognised (example input: 2015-10-13T11:50:24). @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2192 def get_refund_invoice_line_payments_from_invoices_as_csv(opts = {}) data, _status_code, _headers = get_refund_invoice_line_payments_from_invoices_as_csv_with_http_info(opts) return data end
Retrieves awarded refunds from InvoicePayments upon line items, in CSV format. { "nickname" : "Refund InvoiceLinePayments CSV","response" : "Refund InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which refunds will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which refunds will be recognised (example input: 2015-10-13T11:50:24). @return [InvoiceLinePaymentPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2250 def get_refund_invoice_line_payments_from_invoices_as_csv_by_refund_received(opts = {}) data, _status_code, _headers = get_refund_invoice_line_payments_from_invoices_as_csv_by_refund_received_with_http_info(opts) return data end
Retrieves awarded refunds from InvoicePayments upon line items, in CSV format. { "nickname" : "Refund InvoiceLinePayments CSV","response" : "Refund InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which refunds will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which refunds will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2262 def get_refund_invoice_line_payments_from_invoices_as_csv_by_refund_received_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_refund_invoice_line_payments_from_invoices_as_csv_by_refund_received ..." end # resource path local_var_path = "/invoices/payment-received/refund.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_refund_invoice_line_payments_from_invoices_as_csv_by_refund_received\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves awarded refunds from InvoicePayments upon line items, in CSV format. { "nickname" : "Refund InvoiceLinePayments CSV","response" : "Refund InvoiceLinePayments.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which refunds will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which refunds will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(InvoiceLinePaymentPagedMetadata
, Fixnum, Hash)>] InvoiceLinePaymentPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2204 def get_refund_invoice_line_payments_from_invoices_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_refund_invoice_line_payments_from_invoices_as_csv ..." end # resource path local_var_path = "/invoices/refund.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # 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 => 'InvoiceLinePaymentPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_refund_invoice_line_payments_from_invoices_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all attributions of Invoice
costs to Invoice
lines. { "nickname" : "Retrieve revenue attributions","response" : "getRevenueAttributions.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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue attributions will be recognised (example input: 2015-10-13T11:50:24). @return [RevenueAttributionPagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2308 def get_revenue_attributions(opts = {}) data, _status_code, _headers = get_revenue_attributions_with_http_info(opts) return data end
Retrieves (as CSV) all attributions of Invoice
costs to Invoice
lines. { "nickname" : "(CSV) Retrieve revenue attributions","response" : "getRevenueAttributions.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue attributions will be recognised (example input: 2015-10-13T11:50:24). @return [String]
# File lib/bf_ruby2/api/invoices_api.rb, line 2362 def get_revenue_attributions_as_csv(opts = {}) data, _status_code, _headers = get_revenue_attributions_as_csv_with_http_info(opts) return data end
Retrieves (as CSV) all attributions of Invoice
costs to Invoice
lines. { "nickname" : "(CSV) Retrieve revenue attributions","response" : "getRevenueAttributions.csv"} @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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue attributions will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2374 def get_revenue_attributions_as_csv_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_revenue_attributions_as_csv ..." end # resource path local_var_path = "/invoices/revenue-attributions.csv" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_revenue_attributions_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all attributions of Invoice
costs to Invoice
lines. { "nickname" : "Retrieve revenue attributions","response" : "getRevenueAttributions.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 [String] :recognition_start The UTC DateTime specifying the start of the interval within which revenue attributions will be recognised (example input: 2015-09-13T11:50:24). @option opts [String] :recognition_end The UTC DateTime specifying the end of the interval within which revenue attributions will be recognised (example input: 2015-10-13T11:50:24). @return [Array<(RevenueAttributionPagedMetadata
, Fixnum, Hash)>] RevenueAttributionPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2320 def get_revenue_attributions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_revenue_attributions ..." end # resource path local_var_path = "/invoices/revenue-attributions" # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'recognition_start'] = opts[:'recognition_start'] if !opts[:'recognition_start'].nil? query_params[:'recognition_end'] = opts[:'recognition_end'] if !opts[:'recognition_end'].nil? # header parameters header_params = {} # 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 => 'RevenueAttributionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_revenue_attributions\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 [SwaggerTypeListInv]
# File lib/bf_ruby2/api/invoices_api.rb, line 2420 def get_swagger_for_invoice(query_string, opts = {}) data, _status_code, _headers = get_swagger_for_invoice_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<(SwaggerTypeListInv
, Fixnum, Hash)>] SwaggerTypeListInv
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2436 def get_swagger_for_invoice_with_http_info(query_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.get_swagger_for_invoice ..." 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 InvoicesApi.get_swagger_for_invoice" end # resource path local_var_path = "/invoices/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 => 'SwaggerTypeListInv') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#get_swagger_for_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Import an invoice. {"nickname":"Import invoice","response":"ImportInvoiceResponse.html","request":"ImportInvoiceRequest.html"} @param request @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2487 def import_invoice(request, opts = {}) data, _status_code, _headers = import_invoice_with_http_info(request, opts) return data end
Import an invoice. {"nickname":"Import invoice","response":"ImportInvoiceResponse.html","request":"ImportInvoiceRequest.html"} @param 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/invoices_api.rb, line 2497 def import_invoice_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.import_invoice ..." 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 InvoicesApi.import_invoice" end # resource path local_var_path = "/invoices/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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#import_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Re-calculate an Invoice
. {"nickname":"Re-calculate an invoice","response":"recalculateInvoiceResponse.html","request":"RecalculateInvoiceRequest.html"} @param invoice_id @param request @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2543 def recalculate_invoice(invoice_id, request, opts = {}) data, _status_code, _headers = recalculate_invoice_with_http_info(invoice_id, request, opts) return data end
Re-calculate an Invoice
. {"nickname":"Re-calculate an invoice","response":"recalculateInvoiceResponse.html","request":"RecalculateInvoiceRequest.html"} @param invoice_id @param 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/invoices_api.rb, line 2554 def recalculate_invoice_with_http_info(invoice_id, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.recalculate_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.recalculate_invoice" 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 InvoicesApi.recalculate_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/recalculate".sub('{' + 'invoice-ID' + '}', invoice_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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#recalculate_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes the specified charge from the specified Invoice
. {"nickname":"Remove from invoice","response":"deleteChargesInvoice.html"} @param invoice_id @param charge_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 [SubscriptionChargePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2605 def remove_charge_from_invoice(invoice_id, charge_id, opts = {}) data, _status_code, _headers = remove_charge_from_invoice_with_http_info(invoice_id, charge_id, opts) return data end
Removes the specified charge from the specified Invoice
. {"nickname":"Remove from invoice","response":"deleteChargesInvoice.html"} @param invoice_id @param charge_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<(SubscriptionChargePagedMetadata
, Fixnum, Hash)>] SubscriptionChargePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2617 def remove_charge_from_invoice_with_http_info(invoice_id, charge_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.remove_charge_from_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.remove_charge_from_invoice" end # verify the required parameter 'charge_id' is set if @api_client.config.client_side_validation && charge_id.nil? fail ArgumentError, "Missing the required parameter 'charge_id' when calling InvoicesApi.remove_charge_from_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/charges/{charge-ID}".sub('{' + 'invoice-ID' + '}', invoice_id.to_s).sub('{' + 'charge-ID' + '}', charge_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 => 'SubscriptionChargePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#remove_charge_from_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Remove any associated metadata. {"nickname":"Clear metadata from invoice","request" :"deleteInvoiceMetadataRequest.html","response":"deleteInvoiceMetadataResponse.html"} @param invoice_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/invoices_api.rb, line 2668 def remove_metadata_from_invoice(invoice_id, opts = {}) data, _status_code, _headers = remove_metadata_from_invoice_with_http_info(invoice_id, opts) return data end
Remove any associated metadata. {"nickname":"Clear metadata from invoice","request" :"deleteInvoiceMetadataRequest.html","response":"deleteInvoiceMetadataResponse.html"} @param invoice_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/invoices_api.rb, line 2679 def remove_metadata_from_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.remove_metadata_from_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.remove_metadata_from_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/metadata".sub('{' + 'invoice-ID' + '}', invoice_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: InvoicesApi#remove_metadata_from_invoice\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 metadata on invoice","request":"setInvoiceMetadataRequest.html","response":"setInvoiceMetadataResponse.html"} @param metadata @param invoice_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/invoices_api.rb, line 2727 def set_metadata_for_invoice(metadata, invoice_id, opts = {}) data, _status_code, _headers = set_metadata_for_invoice_with_http_info(metadata, invoice_id, opts) return data end
Remove any existing metadata keys and create the provided data. {"nickname":"Set metadata on invoice","request":"setInvoiceMetadataRequest.html","response":"setInvoiceMetadataResponse.html"} @param metadata @param invoice_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/invoices_api.rb, line 2739 def set_metadata_for_invoice_with_http_info(metadata, invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.set_metadata_for_invoice ..." 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 InvoicesApi.set_metadata_for_invoice" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.set_metadata_for_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/metadata".sub('{' + 'invoice-ID' + '}', invoice_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: InvoicesApi#set_metadata_for_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an Invoice
. {"nickname":"Update an invoice","response":"updateInvoiceResponse.html","request":"updateInvoiceRequest.html"} @param invoice The invoice object to be updated. @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2789 def update_invoice(invoice, opts = {}) data, _status_code, _headers = update_invoice_with_http_info(invoice, opts) return data end
Update an Invoice
. {"nickname":"Update an invoice","response":"updateInvoiceResponse.html","request":"updateInvoiceRequest.html"} @param invoice The invoice object to be updated. @param [Hash] opts the optional parameters @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2799 def update_invoice_with_http_info(invoice, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.update_invoice ..." end # verify the required parameter 'invoice' is set if @api_client.config.client_side_validation && invoice.nil? fail ArgumentError, "Missing the required parameter 'invoice' when calling InvoicesApi.update_invoice" end # resource path local_var_path = "/invoices" # 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(invoice) 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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#update_invoice\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 metadata on invoice","request":"upsertInvoiceMetadataRequest.html","response":"upsertInvoiceMetadataResponse.html"} @param metadata @param invoice_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/invoices_api.rb, line 2846 def upsert_metadata_for_invoice(metadata, invoice_id, opts = {}) data, _status_code, _headers = upsert_metadata_for_invoice_with_http_info(metadata, invoice_id, opts) return data end
Update any existing metadata key-values and insert any new key-values, no keys will be removed. {"nickname":"Upsert metadata on invoice","request":"upsertInvoiceMetadataRequest.html","response":"upsertInvoiceMetadataResponse.html"} @param metadata @param invoice_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/invoices_api.rb, line 2858 def upsert_metadata_for_invoice_with_http_info(metadata, invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.upsert_metadata_for_invoice ..." 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 InvoicesApi.upsert_metadata_for_invoice" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.upsert_metadata_for_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}/metadata".sub('{' + 'invoice-ID' + '}', invoice_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: InvoicesApi#upsert_metadata_for_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Voids the invoice specified by the invoice identifier parameter. { "nickname" : "Void an invoice","response" : "voidInvoice.html"} @param invoice_id ID of the invoice. @param organizations A list of organization-IDs used to restrict the scope of API calls. @param [Hash] opts the optional parameters @return [InvoicePagedMetadata]
# File lib/bf_ruby2/api/invoices_api.rb, line 2909 def void_invoice(invoice_id, organizations, opts = {}) data, _status_code, _headers = void_invoice_with_http_info(invoice_id, organizations, opts) return data end
Voids the invoice specified by the invoice identifier parameter. { "nickname" : "Void an invoice","response" : "voidInvoice.html"} @param invoice_id ID of the invoice. @param organizations A list of organization-IDs used to restrict the scope of API calls. @param [Hash] opts the optional parameters @return [Array<(InvoicePagedMetadata
, Fixnum, Hash)>] InvoicePagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/invoices_api.rb, line 2920 def void_invoice_with_http_info(invoice_id, organizations, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InvoicesApi.void_invoice ..." end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.void_invoice" end # verify the required parameter 'organizations' is set if @api_client.config.client_side_validation && organizations.nil? fail ArgumentError, "Missing the required parameter 'organizations' when calling InvoicesApi.void_invoice" end # resource path local_var_path = "/invoices/{invoice-ID}".sub('{' + 'invoice-ID' + '}', invoice_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(organizations, :multi) # 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 => 'InvoicePagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#void_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end