Class: DocuSign_eSign::BillingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/api/billing_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = BillingApi.default) ⇒ BillingApi

Returns a new instance of BillingApi.


69
70
71
# File 'lib/docusign_esign/api/billing_api.rb', line 69

def initialize(api_client = BillingApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client


67
68
69
# File 'lib/docusign_esign/api/billing_api.rb', line 67

def api_client
  @api_client
end

Instance Method Details

#get_billing_plan(billing_plan_id) ⇒ BillingPlanResponse

Get the billing plan details. Retrieves the billing plan details for the specified billing plan ID.

Parameters:

  • billing_plan_id

    The ID of the billing plan being accessed.

Returns:


77
78
79
80
# File 'lib/docusign_esign/api/billing_api.rb', line 77

def get_billing_plan(billing_plan_id)
  data, _status_code, _headers = get_billing_plan_with_http_info(billing_plan_id)
  return data
end

#get_billing_plan_with_http_info(billing_plan_id) ⇒ Array<(BillingPlanResponse, Fixnum, Hash)>

Get the billing plan details. Retrieves the billing plan details for the specified billing plan ID.

Parameters:

  • billing_plan_id

    The ID of the billing plan being accessed.

Returns:

  • (Array<(BillingPlanResponse, Fixnum, Hash)>)

    BillingPlanResponse data, response status code and response headers


86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/docusign_esign/api/billing_api.rb', line 86

def get_billing_plan_with_http_info(billing_plan_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.get_billing_plan ..."
  end
  # verify the required parameter 'billing_plan_id' is set
  fail ArgumentError, "Missing the required parameter 'billing_plan_id' when calling BillingApi.get_billing_plan" if billing_plan_id.nil?
  # resource path
  local_var_path = "/v2.1/billing_plans/{billingPlanId}".sub('{format}','json').sub('{' + 'billingPlanId' + '}', billing_plan_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'])

  # 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 => 'BillingPlanResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#get_billing_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_credit_card_info(account_id) ⇒ CreditCardInformation

Get metadata for a given credit card.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

Returns:


126
127
128
129
# File 'lib/docusign_esign/api/billing_api.rb', line 126

def get_credit_card_info()
  data, _status_code, _headers = get_credit_card_info_with_http_info()
  return data
end

#get_credit_card_info_with_http_info(account_id) ⇒ Array<(CreditCardInformation, Fixnum, Hash)>

Get metadata for a given credit card.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

Returns:

  • (Array<(CreditCardInformation, Fixnum, Hash)>)

    CreditCardInformation data, response status code and response headers


135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/docusign_esign/api/billing_api.rb', line 135

def get_credit_card_info_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.get_credit_card_info ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.get_credit_card_info" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_plan/credit_card".sub('{format}','json').sub('{' + 'accountId' + '}', .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'])

  # 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 => 'CreditCardInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#get_credit_card_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_downgrade_request_billing_info(account_id) ⇒ DowngradRequestBillingInfoResponse

Returns downgrade plan information for the specified account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

Returns:


175
176
177
178
# File 'lib/docusign_esign/api/billing_api.rb', line 175

def get_downgrade_request_billing_info()
  data, _status_code, _headers = get_downgrade_request_billing_info_with_http_info()
  return data
end

#get_downgrade_request_billing_info_with_http_info(account_id) ⇒ Array<(DowngradRequestBillingInfoResponse, Fixnum, Hash)>

Returns downgrade plan information for the specified account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

Returns:


184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/docusign_esign/api/billing_api.rb', line 184

def get_downgrade_request_billing_info_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.get_downgrade_request_billing_info ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.get_downgrade_request_billing_info" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_plan/downgrade".sub('{format}','json').sub('{' + 'accountId' + '}', .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'])

  # 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 => 'DowngradRequestBillingInfoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#get_downgrade_request_billing_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_invoice(account_id, invoice_id) ⇒ BillingInvoice

Retrieves a billing invoice. Retrieves the specified invoice. ###### Note: If the `pdfAvailable` property in the response is set to true, you can download a PDF version of the invoice. To download the PDF, make the call again and change the value of the `Accept` property in the header to `Accept: application/pdf`. Privileges required: account administrator The response returns a list of charges and information about the charges. Quantities are usually shown as 'unlimited' or an integer. Amounts are shown in the currency set for the account. *Response* The following table provides a description of the different `chargeName` property values. The information will grow as more chargeable items are added to the system. | chargeName | Description | | — | — | | id_check | ID Check Charge | | in_person_signing | In Person Signing charge | | envelopes Included | Sent Envelopes for the account | | age_verify | Age verification check | | ofac | OFAC Check | | id_confirm | ID confirmation check | | student_authentication | STAN PIN authentication check | | wet_sign_fax | Pages for returning signed documents by fax | | attachment_fax | Pages for returning attachments by fax | | phone_authentication | Phone authentication charge | | powerforms | PowerForm envelopes sent | | signer_payments | Payment processing charge | | outbound_fax | Send by fax charge | | bulk_recipient_envelopes | Bulk Recipient Envelopes sent | | sms_authentications | SMS authentication charge | | saml_authentications | SAML authentication charge | | express_signer_certificate | DocuSign Express Certificate charge | | personal_signer_certificate | Personal Signer Certificate charge | | safe_certificate | SAFE BioPharma Signer Certificate charge | | seats | Included active seats charge | | open_trust_certificate | OpenTrust Signer Certificate charge |

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • invoice_id

Returns:


225
226
227
228
# File 'lib/docusign_esign/api/billing_api.rb', line 225

def get_invoice(, invoice_id)
  data, _status_code, _headers = get_invoice_with_http_info(, invoice_id)
  return data
end

#get_invoice_with_http_info(account_id, invoice_id) ⇒ Array<(BillingInvoice, Fixnum, Hash)>

Retrieves a billing invoice. Retrieves the specified invoice. ###### Note: If the &#x60;pdfAvailable&#x60; property in the response is set to true, you can download a PDF version of the invoice. To download the PDF, make the call again and change the value of the &#x60;Accept&#x60; property in the header to &#x60;Accept: application/pdf&#x60;. Privileges required: account administrator The response returns a list of charges and information about the charges. Quantities are usually shown as &#39;unlimited&#39; or an integer. Amounts are shown in the currency set for the account. *Response* The following table provides a description of the different &#x60;chargeName&#x60; property values. The information will grow as more chargeable items are added to the system. | chargeName | Description | | — | — | | id_check | ID Check Charge | | in_person_signing | In Person Signing charge | | envelopes Included | Sent Envelopes for the account | | age_verify | Age verification check | | ofac | OFAC Check | | id_confirm | ID confirmation check | | student_authentication | STAN PIN authentication check | | wet_sign_fax | Pages for returning signed documents by fax | | attachment_fax | Pages for returning attachments by fax | | phone_authentication | Phone authentication charge | | powerforms | PowerForm envelopes sent | | signer_payments | Payment processing charge | | outbound_fax | Send by fax charge | | bulk_recipient_envelopes | Bulk Recipient Envelopes sent | | sms_authentications | SMS authentication charge | | saml_authentications | SAML authentication charge | | express_signer_certificate | DocuSign Express Certificate charge | | personal_signer_certificate | Personal Signer Certificate charge | | safe_certificate | SAFE BioPharma Signer Certificate charge | | seats | Included active seats charge | | open_trust_certificate | OpenTrust Signer Certificate charge |

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • invoice_id

Returns:

  • (Array<(BillingInvoice, Fixnum, Hash)>)

    BillingInvoice data, response status code and response headers


235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/docusign_esign/api/billing_api.rb', line 235

def get_invoice_with_http_info(, invoice_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.get_invoice ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.get_invoice" if .nil?
  # verify the required parameter 'invoice_id' is set
  fail ArgumentError, "Missing the required parameter 'invoice_id' when calling BillingApi.get_invoice" if invoice_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_invoices/{invoiceId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'invoiceId' + '}', 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'])

  # 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 => 'BillingInvoice')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_payment(account_id, payment_id) ⇒ BillingPaymentItem

Gets billing payment information for a specific payment. Retrieves the information for a specified payment. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • payment_id

Returns:


278
279
280
281
# File 'lib/docusign_esign/api/billing_api.rb', line 278

def get_payment(, payment_id)
  data, _status_code, _headers = get_payment_with_http_info(, payment_id)
  return data
end

#get_payment_with_http_info(account_id, payment_id) ⇒ Array<(BillingPaymentItem, Fixnum, Hash)>

Gets billing payment information for a specific payment. Retrieves the information for a specified payment. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • payment_id

Returns:

  • (Array<(BillingPaymentItem, Fixnum, Hash)>)

    BillingPaymentItem data, response status code and response headers


288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/docusign_esign/api/billing_api.rb', line 288

def get_payment_with_http_info(, payment_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.get_payment ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.get_payment" if .nil?
  # verify the required parameter 'payment_id' is set
  fail ArgumentError, "Missing the required parameter 'payment_id' when calling BillingApi.get_payment" if payment_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_payments/{paymentId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'paymentId' + '}', payment_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'])

  # 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 => 'BillingPaymentItem')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#get_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_plan(account_id, options = DocuSign_eSign::GetPlanOptions.default) ⇒ AccountBillingPlanResponse

Get Account Billing Plan Retrieves the billing plan information for the specified account, including the current billing plan, successor plans, billing address, and billing credit card. By default the successor plan and credit card information is included in the response. This information can be excluded from the response by adding the appropriate optional query string with the `setting` set to *false*. Response The response returns the billing plan information, including the currency code, for the plan. The `billingPlan` and `succesorPlans` property values are the same as those shown in the [ML:Get Billing Plan Details] reference. the `billingAddress` and `creditCardInformation` property values are the same as those shown in the [ML:Update Billing Plan] reference. ###### Note: When credit card number information is shown, a mask is applied to the response so that only the last 4 digits of the card number are visible.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::GetPlanOptions

    Options for modifying the behavior of the function.

Returns:


331
332
333
334
# File 'lib/docusign_esign/api/billing_api.rb', line 331

def get_plan(, options = DocuSign_eSign::GetPlanOptions.default)
  data, _status_code, _headers = get_plan_with_http_info(, options)
  return data
end

#get_plan_with_http_info(account_id, options = DocuSign_eSign::GetPlanOptions.default) ⇒ Array<(AccountBillingPlanResponse, Fixnum, Hash)>

Get Account Billing Plan Retrieves the billing plan information for the specified account, including the current billing plan, successor plans, billing address, and billing credit card. By default the successor plan and credit card information is included in the response. This information can be excluded from the response by adding the appropriate optional query string with the &#x60;setting&#x60; set to *false*. Response The response returns the billing plan information, including the currency code, for the plan. The &#x60;billingPlan&#x60; and &#x60;succesorPlans&#x60; property values are the same as those shown in the [ML:Get Billing Plan Details] reference. the &#x60;billingAddress&#x60; and &#x60;creditCardInformation&#x60; property values are the same as those shown in the [ML:Update Billing Plan] reference. ###### Note: When credit card number information is shown, a mask is applied to the response so that only the last 4 digits of the card number are visible.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::GetPlanOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(AccountBillingPlanResponse, Fixnum, Hash)>)

    AccountBillingPlanResponse data, response status code and response headers


341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'lib/docusign_esign/api/billing_api.rb', line 341

def get_plan_with_http_info(, options = DocuSign_eSign::GetPlanOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.get_plan ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.get_plan" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_plan".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'include_credit_card_information'] = options.include_credit_card_information if !options.include_credit_card_information.nil?
  query_params[:'include_metadata'] = options. if !options..nil?
  query_params[:'include_successor_plans'] = options.include_successor_plans if !options.include_successor_plans.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # 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 => 'AccountBillingPlanResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#get_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_billing_plansBillingPlansResponse

Gets the list of available billing plans. Retrieves a list of the billing plans associated with a distributor.


383
384
385
386
# File 'lib/docusign_esign/api/billing_api.rb', line 383

def list_billing_plans()
  data, _status_code, _headers = list_billing_plans_with_http_info()
  return data
end

#list_billing_plans_with_http_infoArray<(BillingPlansResponse, Fixnum, Hash)>

Gets the list of available billing plans. Retrieves a list of the billing plans associated with a distributor.

Returns:

  • (Array<(BillingPlansResponse, Fixnum, Hash)>)

    BillingPlansResponse data, response status code and response headers


391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/docusign_esign/api/billing_api.rb', line 391

def list_billing_plans_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.list_billing_plans ..."
  end
  # resource path
  local_var_path = "/v2.1/billing_plans".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # 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 => 'BillingPlansResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#list_billing_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_invoices(account_id, options = DocuSign_eSign::ListInvoicesOptions.default) ⇒ BillingInvoicesResponse

Get a List of Billing Invoices Retrieves a list of invoices for the account. If the from date or to date queries are not specified, the response returns invoices for the last 365 days. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListInvoicesOptions

    Options for modifying the behavior of the function.

Returns:


430
431
432
433
# File 'lib/docusign_esign/api/billing_api.rb', line 430

def list_invoices(, options = DocuSign_eSign::ListInvoicesOptions.default)
  data, _status_code, _headers = list_invoices_with_http_info(, options)
  return data
end

#list_invoices_past_due(account_id) ⇒ BillingInvoicesSummary

Get a list of past due invoices. Returns a list past due invoices for the account and notes if payment can be made through the REST API. Privileges Required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

Returns:


482
483
484
485
# File 'lib/docusign_esign/api/billing_api.rb', line 482

def list_invoices_past_due()
  data, _status_code, _headers = list_invoices_past_due_with_http_info()
  return data
end

#list_invoices_past_due_with_http_info(account_id) ⇒ Array<(BillingInvoicesSummary, Fixnum, Hash)>

Get a list of past due invoices. Returns a list past due invoices for the account and notes if payment can be made through the REST API. Privileges Required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

Returns:

  • (Array<(BillingInvoicesSummary, Fixnum, Hash)>)

    BillingInvoicesSummary data, response status code and response headers


491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/docusign_esign/api/billing_api.rb', line 491

def list_invoices_past_due_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.list_invoices_past_due ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.list_invoices_past_due" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_invoices_past_due".sub('{format}','json').sub('{' + 'accountId' + '}', .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'])

  # 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 => 'BillingInvoicesSummary')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#list_invoices_past_due\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_invoices_with_http_info(account_id, options = DocuSign_eSign::ListInvoicesOptions.default) ⇒ Array<(BillingInvoicesResponse, Fixnum, Hash)>

Get a List of Billing Invoices Retrieves a list of invoices for the account. If the from date or to date queries are not specified, the response returns invoices for the last 365 days. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListInvoicesOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BillingInvoicesResponse, Fixnum, Hash)>)

    BillingInvoicesResponse data, response status code and response headers


440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/docusign_esign/api/billing_api.rb', line 440

def list_invoices_with_http_info(, options = DocuSign_eSign::ListInvoicesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.list_invoices ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.list_invoices" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_invoices".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'to_date'] = options.to_date if !options.to_date.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # 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 => 'BillingInvoicesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#list_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_payments(account_id, options = DocuSign_eSign::ListPaymentsOptions.default) ⇒ BillingPaymentsResponse

Gets payment information for one or more payments. Retrieves a list containing information about one or more payments. If the from date or to date queries are not used, the response returns payment information for the last 365 days. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListPaymentsOptions

    Options for modifying the behavior of the function.

Returns:


532
533
534
535
# File 'lib/docusign_esign/api/billing_api.rb', line 532

def list_payments(, options = DocuSign_eSign::ListPaymentsOptions.default)
  data, _status_code, _headers = list_payments_with_http_info(, options)
  return data
end

#list_payments_with_http_info(account_id, options = DocuSign_eSign::ListPaymentsOptions.default) ⇒ Array<(BillingPaymentsResponse, Fixnum, Hash)>

Gets payment information for one or more payments. Retrieves a list containing information about one or more payments. If the from date or to date queries are not used, the response returns payment information for the last 365 days. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListPaymentsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BillingPaymentsResponse, Fixnum, Hash)>)

    BillingPaymentsResponse data, response status code and response headers


542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/docusign_esign/api/billing_api.rb', line 542

def list_payments_with_http_info(, options = DocuSign_eSign::ListPaymentsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.list_payments ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.list_payments" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_payments".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'to_date'] = options.to_date if !options.to_date.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # 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 => 'BillingPaymentsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#list_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#make_payment(account_id, billing_payment_request) ⇒ BillingPaymentResponse

Posts a payment to a past due invoice. Posts a payment to a past due invoice. ###### Note: This can only be used if the `paymentAllowed` value for a past due invoice is true. This can be determined calling [ML:GetBillingInvoicesPastDue]. The response returns information for a single payment, if a payment ID was used in the endpoint, or a list of payments. If the from date or to date queries or payment ID are not used, the response returns payment information for the last 365 days. If the request was for a single payment ID, the `nextUri` and `previousUri` properties are not returned. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • billing_payment_request (optional parameter)

Returns:


585
586
587
588
# File 'lib/docusign_esign/api/billing_api.rb', line 585

def make_payment(, billing_payment_request)
  data, _status_code, _headers = make_payment_with_http_info(,  billing_payment_request)
  return data
end

#make_payment_with_http_info(account_id, billing_payment_request) ⇒ Array<(BillingPaymentResponse, Fixnum, Hash)>

Posts a payment to a past due invoice. Posts a payment to a past due invoice. ###### Note: This can only be used if the &#x60;paymentAllowed&#x60; value for a past due invoice is true. This can be determined calling [ML:GetBillingInvoicesPastDue]. The response returns information for a single payment, if a payment ID was used in the endpoint, or a list of payments. If the from date or to date queries or payment ID are not used, the response returns payment information for the last 365 days. If the request was for a single payment ID, the &#x60;nextUri&#x60; and &#x60;previousUri&#x60; properties are not returned. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • billing_payment_request (optional parameter)

Returns:

  • (Array<(BillingPaymentResponse, Fixnum, Hash)>)

    BillingPaymentResponse data, response status code and response headers


595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/docusign_esign/api/billing_api.rb', line 595

def make_payment_with_http_info(, billing_payment_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.make_payment ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.make_payment" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_payments".sub('{format}','json').sub('{' + 'accountId' + '}', .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'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(billing_payment_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 => 'BillingPaymentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#make_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#purchase_envelopes(account_id, purchased_envelopes_information) ⇒ nil

Reserverd: Purchase additional envelopes. Reserved: At this time, this endpoint is limited to DocuSign internal use only. Completes the purchase of envelopes for your account. The actual purchase is done as part of an internal workflow interaction with an envelope vendor.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • purchased_envelopes_information (optional parameter)

Returns:

  • (nil)

636
637
638
639
# File 'lib/docusign_esign/api/billing_api.rb', line 636

def purchase_envelopes(, purchased_envelopes_information)
  purchase_envelopes_with_http_info(,  purchased_envelopes_information)
  return nil
end

#purchase_envelopes_with_http_info(account_id, purchased_envelopes_information) ⇒ Array<(nil, Fixnum, Hash)>

Reserverd: Purchase additional envelopes. Reserved: At this time, this endpoint is limited to DocuSign internal use only. Completes the purchase of envelopes for your account. The actual purchase is done as part of an internal workflow interaction with an envelope vendor.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • purchased_envelopes_information (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers


646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'lib/docusign_esign/api/billing_api.rb', line 646

def purchase_envelopes_with_http_info(, purchased_envelopes_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.purchase_envelopes ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.purchase_envelopes" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_plan/purchased_envelopes".sub('{format}','json').sub('{' + 'accountId' + '}', .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'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(purchased_envelopes_information)
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#purchase_envelopes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_downgrade_account_billing_plan(account_id, downgrade_billing_plan_information) ⇒ DowngradePlanUpdateResponse

Queues downgrade billing plan request for an account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • downgrade_billing_plan_information (optional parameter)

Returns:


686
687
688
689
# File 'lib/docusign_esign/api/billing_api.rb', line 686

def (, downgrade_billing_plan_information)
  data, _status_code, _headers = (,  downgrade_billing_plan_information)
  return data
end

#update_downgrade_account_billing_plan_with_http_info(account_id, downgrade_billing_plan_information) ⇒ Array<(DowngradePlanUpdateResponse, Fixnum, Hash)>

Queues downgrade billing plan request for an account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • downgrade_billing_plan_information (optional parameter)

Returns:


696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/docusign_esign/api/billing_api.rb', line 696

def (, downgrade_billing_plan_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.update_downgrade_account_billing_plan ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.update_downgrade_account_billing_plan" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_plan/downgrade".sub('{format}','json').sub('{' + 'accountId' + '}', .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'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(downgrade_billing_plan_information)
  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 => 'DowngradePlanUpdateResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#update_downgrade_account_billing_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_plan(account_id, billing_plan_information, options = DocuSign_eSign::UpdatePlanOptions.default) ⇒ BillingPlanUpdateResponse

Updates the account billing plan. Updates the billing plan information, billing address, and credit card information for the specified account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • billing_plan_information (optional parameter)
  • DocuSign_eSign::UpdatePlanOptions

    Options for modifying the behavior of the function.

Returns:


738
739
740
741
# File 'lib/docusign_esign/api/billing_api.rb', line 738

def update_plan(, billing_plan_information, options = DocuSign_eSign::UpdatePlanOptions.default)
  data, _status_code, _headers = update_plan_with_http_info(,  billing_plan_information, options)
  return data
end

#update_plan_with_http_info(account_id, billing_plan_information, options = DocuSign_eSign::UpdatePlanOptions.default) ⇒ Array<(BillingPlanUpdateResponse, Fixnum, Hash)>

Updates the account billing plan. Updates the billing plan information, billing address, and credit card information for the specified account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • billing_plan_information (optional parameter)
  • DocuSign_eSign::UpdatePlanOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BillingPlanUpdateResponse, Fixnum, Hash)>)

    BillingPlanUpdateResponse data, response status code and response headers


749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
# File 'lib/docusign_esign/api/billing_api.rb', line 749

def update_plan_with_http_info(, billing_plan_information, options = DocuSign_eSign::UpdatePlanOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.update_plan ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.update_plan" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_plan".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'preview_billing_plan'] = options.preview_billing_plan if !options.preview_billing_plan.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(billing_plan_information)
  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 => 'BillingPlanUpdateResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#update_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end