Skip to content

Latest commit

 

History

History
508 lines (377 loc) · 25.7 KB

BillingPlansAPI.md

File metadata and controls

508 lines (377 loc) · 25.7 KB

BillingPlansAPI

All URIs are relative to https://www.docusign.net/restapi

Method HTTP request Description
billingPlanGetBillingPlan GET /v2.1/accounts/{accountId}/billing_plan Get Account Billing Plan
billingPlanGetCreditCardInfo GET /v2.1/accounts/{accountId}/billing_plan/credit_card Get credit card information
billingPlanGetDowngradeRequestBillingInfo GET /v2.1/accounts/{accountId}/billing_plan/downgrade
billingPlanPutBillingPlan PUT /v2.1/accounts/{accountId}/billing_plan Updates an account billing plan.
billingPlanPutDowngradeAccountBillingPlan PUT /v2.1/accounts/{accountId}/billing_plan/downgrade
billingPlansGetBillingPlan GET /v2.1/billing_plans/{billingPlanId} Gets billing plan details.
billingPlansGetBillingPlans GET /v2.1/billing_plans Gets a list of available billing plans.
purchasedEnvelopesPutPurchasedEnvelopes PUT /v2.1/accounts/{accountId}/billing_plan/purchased_envelopes Reserverd: Purchase additional envelopes.

billingPlanGetBillingPlan

    open class func billingPlanGetBillingPlan(accountId: String, includeCreditCardInformation: String? = nil, includeMetadata: String? = nil, includeSuccessorPlans: String? = nil, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlanGetBillingPlan>

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. You can exclude this information from the response by adding the appropriate optional query string and setting it 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 Billing::getBillingPlan reference. the billingAddress and creditCardInformation property values are the same as those shown in the Billing::updatePlan reference. Note: When credit card number information displays, a mask is applied to the response so that only the last 4 digits of the card number are visible.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let accountId = "accountId_example" // String | The external account number (int) or account ID GUID.
let includeCreditCardInformation = "includeCreditCardInformation_example" // String | When set to **true**, payment information including credit card information will show in the return. (optional)
let includeMetadata = "includeMetadata_example" // String | When set to **true**, the `canUpgrade` and `renewalStatus` properities are included the response and an array of `supportedCountries` is added to the `billingAddress` information.  (optional)
let includeSuccessorPlans = "includeSuccessorPlans_example" // String | When set to **true**, excludes successor information from the response. (optional)

// Get Account Billing Plan
BillingPlansAPI.billingPlanGetBillingPlan(accountId: accountId, includeCreditCardInformation: includeCreditCardInformation, includeMetadata: includeMetadata, includeSuccessorPlans: includeSuccessorPlans).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
accountId String The external account number (int) or account ID GUID.
includeCreditCardInformation String When set to true, payment information including credit card information will show in the return. [optional]
includeMetadata String When set to true, the `canUpgrade` and `renewalStatus` properities are included the response and an array of `supportedCountries` is added to the `billingAddress` information. [optional]
includeSuccessorPlans String When set to true, excludes successor information from the response. [optional]

Return type

BillingPlanGetBillingPlan

public enum BillingPlanGetBillingPlan {
    case http200(value: AccountBillingPlanResponse?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: AccountBillingPlanResponse?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

billingPlanGetCreditCardInfo

    open class func billingPlanGetCreditCardInfo(accountId: String, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlanGetCreditCardInfo>

Get credit card information

This method returns information about a credit card associated with an account.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let accountId = "accountId_example" // String | The external account number (int) or account ID GUID.

// Get credit card information
BillingPlansAPI.billingPlanGetCreditCardInfo(accountId: accountId).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
accountId String The external account number (int) or account ID GUID.

Return type

BillingPlanGetCreditCardInfo

public enum BillingPlanGetCreditCardInfo {
    case http200(value: CreditCardInformation?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: CreditCardInformation?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

billingPlanGetDowngradeRequestBillingInfo

    open class func billingPlanGetDowngradeRequestBillingInfo(accountId: String, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlanGetDowngradeRequestBillingInfo>

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let accountId = "accountId_example" // String | The external account number (int) or account ID GUID.

BillingPlansAPI.billingPlanGetDowngradeRequestBillingInfo(accountId: accountId).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
accountId String The external account number (int) or account ID GUID.

Return type

BillingPlanGetDowngradeRequestBillingInfo

public enum BillingPlanGetDowngradeRequestBillingInfo {
    case http200(value: DowngradRequestBillingInfoResponse?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: DowngradRequestBillingInfoResponse?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

billingPlanPutBillingPlan

    open class func billingPlanPutBillingPlan(accountId: String, previewBillingPlan: String? = nil, billingPlanInformation: BillingPlanInformation? = nil, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlanPutBillingPlan>

Updates an account billing plan.

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let accountId = "accountId_example" // String | The external account number (int) or account ID GUID.
let previewBillingPlan = "previewBillingPlan_example" // String | When set to **true**, updates the account using a preview billing plan. (optional)
let billingPlanInformation = billingPlanInformation(appStoreReceipt: appStoreReceipt(productId: "productId_example", receiptData: "receiptData_example"), billingAddress: accountAddress(address1: "address1_example", address2: "address2_example", city: "city_example", country: "country_example", email: "email_example", fax: "fax_example", firstName: "firstName_example", lastName: "lastName_example", phone: "phone_example", postalCode: "postalCode_example", state: "state_example", supportedCountries: [country(isoCode: "isoCode_example", name: "name_example", provinces: [province(isoCode: "isoCode_example", name: "name_example")], provinceValidated: "provinceValidated_example")]), creditCardInformation: creditCardInformation(address: addressInformation(address1: "address1_example", address2: "address2_example", city: "city_example", country: "country_example", fax: "fax_example", phone: "phone_example", postalCode: "postalCode_example", stateOrProvince: "stateOrProvince_example", zipPlus4: "zipPlus4_example"), cardNumber: "cardNumber_example", cardType: "cardType_example", cvNumber: "cvNumber_example", expirationMonth: "expirationMonth_example", expirationYear: "expirationYear_example", nameOnCard: "nameOnCard_example"), directDebitProcessorInformation: directDebitProcessorInformation(bankBranchCode: "bankBranchCode_example", bankCheckDigit: "bankCheckDigit_example", bankCode: "bankCode_example", bankName: "bankName_example", bankTransferAccountName: "bankTransferAccountName_example", bankTransferAccountNumber: "bankTransferAccountNumber_example", bankTransferType: "bankTransferType_example", country: "country_example", email: "email_example", firstName: "firstName_example", iBAN: "iBAN_example", lastName: "lastName_example"), downgradeReason: "downgradeReason_example", enableSupport: "enableSupport_example", includedSeats: "includedSeats_example", incrementalSeats: "incrementalSeats_example", paymentMethod: "paymentMethod_example", paymentProcessorInformation: paymentProcessorInformation(address: nil, billingAgreementId: "billingAgreementId_example", email: "email_example"), planInformation: planInformation(addOns: [addOn(active: "active_example", addOnId: "addOnId_example", id: "id_example", name: "name_example")], currencyCode: "currencyCode_example", freeTrialDaysOverride: "freeTrialDaysOverride_example", planFeatureSets: [featureSet(currencyFeatureSetPrices: [currencyFeatureSetPrice(currencyCode: "currencyCode_example", currencySymbol: "currencySymbol_example", envelopeFee: "envelopeFee_example", fixedFee: "fixedFee_example", seatFee: "seatFee_example")], envelopeFee: "envelopeFee_example", featureSetId: "featureSetId_example", fixedFee: "fixedFee_example", is21CFRPart11: "is21CFRPart11_example", isActive: "isActive_example", isEnabled: "isEnabled_example", name: "name_example", seatFee: "seatFee_example")], planId: "planId_example", recipientDomains: [recipientDomain(active: "active_example", domainCode: "domainCode_example", domainName: "domainName_example", recipientDomainId: "recipientDomainId_example")]), referralInformation: referralInformation(advertisementId: "advertisementId_example", enableSupport: "enableSupport_example", externalOrgId: "externalOrgId_example", groupMemberId: "groupMemberId_example", idType: "idType_example", includedSeats: "includedSeats_example", industry: "industry_example", planStartMonth: "planStartMonth_example", promoCode: "promoCode_example", publisherId: "publisherId_example", referralCode: "referralCode_example", referrerName: "referrerName_example", saleDiscountAmount: "saleDiscountAmount_example", saleDiscountFixedAmount: "saleDiscountFixedAmount_example", saleDiscountPercent: "saleDiscountPercent_example", saleDiscountPeriods: "saleDiscountPeriods_example", saleDiscountSeatPriceOverride: "saleDiscountSeatPriceOverride_example", shopperId: "shopperId_example"), renewalStatus: "renewalStatus_example", saleDiscountAmount: "saleDiscountAmount_example", saleDiscountFixedAmount: "saleDiscountFixedAmount_example", saleDiscountPercent: "saleDiscountPercent_example", saleDiscountPeriods: "saleDiscountPeriods_example", saleDiscountSeatPriceOverride: "saleDiscountSeatPriceOverride_example") // BillingPlanInformation |  (optional)

// Updates an account billing plan.
BillingPlansAPI.billingPlanPutBillingPlan(accountId: accountId, previewBillingPlan: previewBillingPlan, billingPlanInformation: billingPlanInformation).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
accountId String The external account number (int) or account ID GUID.
previewBillingPlan String When set to true, updates the account using a preview billing plan. [optional]
billingPlanInformation BillingPlanInformation [optional]

Return type

BillingPlanPutBillingPlan

public enum BillingPlanPutBillingPlan {
    case http200(value: BillingPlanUpdateResponse?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: BillingPlanUpdateResponse?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

billingPlanPutDowngradeAccountBillingPlan

    open class func billingPlanPutDowngradeAccountBillingPlan(accountId: String, downgradeBillingPlanInformation: DowngradeBillingPlanInformation? = nil, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlanPutDowngradeAccountBillingPlan>

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let accountId = "accountId_example" // String | The external account number (int) or account ID GUID.
let downgradeBillingPlanInformation = downgradeBillingPlanInformation(downgradeEventType: "downgradeEventType_example", planInformation: planInformation(addOns: [addOn(active: "active_example", addOnId: "addOnId_example", id: "id_example", name: "name_example")], currencyCode: "currencyCode_example", freeTrialDaysOverride: "freeTrialDaysOverride_example", planFeatureSets: [featureSet(currencyFeatureSetPrices: [currencyFeatureSetPrice(currencyCode: "currencyCode_example", currencySymbol: "currencySymbol_example", envelopeFee: "envelopeFee_example", fixedFee: "fixedFee_example", seatFee: "seatFee_example")], envelopeFee: "envelopeFee_example", featureSetId: "featureSetId_example", fixedFee: "fixedFee_example", is21CFRPart11: "is21CFRPart11_example", isActive: "isActive_example", isEnabled: "isEnabled_example", name: "name_example", seatFee: "seatFee_example")], planId: "planId_example", recipientDomains: [recipientDomain(active: "active_example", domainCode: "domainCode_example", domainName: "domainName_example", recipientDomainId: "recipientDomainId_example")])) // DowngradeBillingPlanInformation |  (optional)

BillingPlansAPI.billingPlanPutDowngradeAccountBillingPlan(accountId: accountId, downgradeBillingPlanInformation: downgradeBillingPlanInformation).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
accountId String The external account number (int) or account ID GUID.
downgradeBillingPlanInformation DowngradeBillingPlanInformation [optional]

Return type

BillingPlanPutDowngradeAccountBillingPlan

public enum BillingPlanPutDowngradeAccountBillingPlan {
    case http200(value: DowngradePlanUpdateResponse?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: DowngradePlanUpdateResponse?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

billingPlansGetBillingPlan

    open class func billingPlansGetBillingPlan(billingPlanId: String, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlansGetBillingPlan>

Gets billing plan details.

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let billingPlanId = "billingPlanId_example" // String | The ID of the billing plan being accessed.

// Gets billing plan details.
BillingPlansAPI.billingPlansGetBillingPlan(billingPlanId: billingPlanId).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
billingPlanId String The ID of the billing plan being accessed.

Return type

BillingPlansGetBillingPlan

public enum BillingPlansGetBillingPlan {
    case http200(value: BillingPlanResponse?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: BillingPlanResponse?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

billingPlansGetBillingPlans

    open class func billingPlansGetBillingPlans(headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<BillingPlansGetBillingPlans>

Gets a list of available billing plans.

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI


// Gets a list of available billing plans.
BillingPlansAPI.billingPlansGetBillingPlans().whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

BillingPlansGetBillingPlans

public enum BillingPlansGetBillingPlans {
    case http200(value: BillingPlansResponse?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: BillingPlansResponse?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

purchasedEnvelopesPutPurchasedEnvelopes

    open class func purchasedEnvelopesPutPurchasedEnvelopes(accountId: String, purchasedEnvelopesInformation: PurchasedEnvelopesInformation? = nil, headers: HTTPHeaders = DocuSignAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<PurchasedEnvelopesPutPurchasedEnvelopes>

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.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DocuSignAPI

let accountId = "accountId_example" // String | The external account number (int) or account ID GUID.
let purchasedEnvelopesInformation = purchasedEnvelopesInformation(amount: "amount_example", appName: "appName_example", currencyCode: "currencyCode_example", platform: "platform_example", productId: "productId_example", quantity: "quantity_example", receiptData: "receiptData_example", storeName: "storeName_example", transactionId: "transactionId_example") // PurchasedEnvelopesInformation |  (optional)

// Reserverd: Purchase additional envelopes.
BillingPlansAPI.purchasedEnvelopesPutPurchasedEnvelopes(accountId: accountId, purchasedEnvelopesInformation: purchasedEnvelopesInformation).whenComplete { result in
    switch result {
    case .failure(let error):
    // process error
    case .success(let response):
        switch response {
        // process decoded response value or raw ClientResponse
        case .http200(let value, let raw):
        case .http400(let value, let raw):
        case .http0(let value, let raw):
        }
    }
}

Parameters

Name Type Description Notes
accountId String The external account number (int) or account ID GUID.
purchasedEnvelopesInformation PurchasedEnvelopesInformation [optional]

Return type

PurchasedEnvelopesPutPurchasedEnvelopes

public enum PurchasedEnvelopesPutPurchasedEnvelopes {
    case http200(value: Void?, raw: ClientResponse)
    case http400(value: ErrorDetails?, raw: ClientResponse)
    case http0(value: Void?, raw: ClientResponse)
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]