Skip to content

Files

Latest commit

1a32b3c · Sep 28, 2017

History

History
288 lines (212 loc) · 10.8 KB

SWGSubaccountpricingApi.md

File metadata and controls

288 lines (212 loc) · 10.8 KB

SWGSubaccountpricingApi

All URIs are relative to https://api.phone.com/v4

Method HTTP request Description
createAccountSubaccountPricing POST /accounts/{account_id}/subaccounts/{subaccount_id}/pricing Add a pricing plan to a subaccount.
deleteAccountSubaccountPricing DELETE /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} Delete a pricing plan from a subaccount.
getAccountSubaccountPricing GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} Get the details of a pricing plan for a subaccount.
listAccountSubaccountPricing GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing Get a list of pricing plans for a subaccount.

createAccountSubaccountPricing

-(NSURLSessionTask*) createAccountSubaccountPricingWithAccountId: (NSNumber*) accountId
    subaccountId: (NSNumber*) subaccountId
    data: (SWGCreatePricingParams*) data
        completionHandler: (void (^)(SWGPricingFull* output, NSError* error)) handler;

Add a pricing plan to a subaccount.

Add a pricing plan to a subaccount. See Account Subaccount Pricing for more info on the properties.

Example

SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSNumber* accountId = @56; // Account ID
NSNumber* subaccountId = @56; // Subaccount ID
SWGCreatePricingParams* data = [[SWGCreatePricingParams alloc] init]; // Subaccount pricing data

SWGSubaccountpricingApi*apiInstance = [[SWGSubaccountpricingApi alloc] init];

// Add a pricing plan to a subaccount.
[apiInstance createAccountSubaccountPricingWithAccountId:accountId
              subaccountId:subaccountId
              data:data
          completionHandler: ^(SWGPricingFull* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGSubaccountpricingApi->createAccountSubaccountPricing: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
accountId NSNumber* Account ID
subaccountId NSNumber* Subaccount ID
data SWGCreatePricingParams* Subaccount pricing data

Return type

SWGPricingFull*

Authorization

apiKey

HTTP request headers

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

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

deleteAccountSubaccountPricing

-(NSURLSessionTask*) deleteAccountSubaccountPricingWithAccountId: (NSNumber*) accountId
    subaccountId: (NSNumber*) subaccountId
    pricingId: (NSNumber*) pricingId
        completionHandler: (void (^)(SWGDeleteEntry* output, NSError* error)) handler;

Delete a pricing plan from a subaccount.

Delete a pricing plan from a subaccount. See Account Subaccount Pricing for more info on the properties.

Example

SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSNumber* accountId = @56; // Account ID
NSNumber* subaccountId = @56; // Subaccount ID
NSNumber* pricingId = @56; // Pricing Object ID

SWGSubaccountpricingApi*apiInstance = [[SWGSubaccountpricingApi alloc] init];

// Delete a pricing plan from a subaccount.
[apiInstance deleteAccountSubaccountPricingWithAccountId:accountId
              subaccountId:subaccountId
              pricingId:pricingId
          completionHandler: ^(SWGDeleteEntry* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGSubaccountpricingApi->deleteAccountSubaccountPricing: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
accountId NSNumber* Account ID
subaccountId NSNumber* Subaccount ID
pricingId NSNumber* Pricing Object ID

Return type

SWGDeleteEntry*

Authorization

apiKey

HTTP request headers

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

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

getAccountSubaccountPricing

-(NSURLSessionTask*) getAccountSubaccountPricingWithAccountId: (NSNumber*) accountId
    subaccountId: (NSNumber*) subaccountId
    pricingId: (NSNumber*) pricingId
        completionHandler: (void (^)(SWGPricingFull* output, NSError* error)) handler;

Get the details of a pricing plan for a subaccount.

Get the details of a pricing plan for a subaccount. See Account Subaccount Pricing for more info on the properties.

Example

SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSNumber* accountId = @56; // Account ID
NSNumber* subaccountId = @56; // Subaccount ID
NSNumber* pricingId = @56; // Pricing Object ID

SWGSubaccountpricingApi*apiInstance = [[SWGSubaccountpricingApi alloc] init];

// Get the details of a pricing plan for a subaccount.
[apiInstance getAccountSubaccountPricingWithAccountId:accountId
              subaccountId:subaccountId
              pricingId:pricingId
          completionHandler: ^(SWGPricingFull* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGSubaccountpricingApi->getAccountSubaccountPricing: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
accountId NSNumber* Account ID
subaccountId NSNumber* Subaccount ID
pricingId NSNumber* Pricing Object ID

Return type

SWGPricingFull*

Authorization

apiKey

HTTP request headers

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

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

listAccountSubaccountPricing

-(NSURLSessionTask*) listAccountSubaccountPricingWithAccountId: (NSNumber*) accountId
    subaccountId: (NSNumber*) subaccountId
    filtersId: (NSArray<NSString*>*) filtersId
    sortId: (NSString*) sortId
    limit: (NSNumber*) limit
    offset: (NSNumber*) offset
    fields: (NSString*) fields
        completionHandler: (void (^)(SWGListPricings* output, NSError* error)) handler;

Get a list of pricing plans for a subaccount.

Get a list of pricing plans for a subaccount. See Account Subaccount Pricing for more info on the properties.

Example

SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSNumber* accountId = @56; // Account ID
NSNumber* subaccountId = @56; // Subaccount ID
NSArray<NSString*>* filtersId = @[@"filtersId_example"]; // ID filter (optional)
NSString* sortId = @"sortId_example"; // ID sorting (optional)
NSNumber* limit = @56; // Max results (optional)
NSNumber* offset = @56; // Results to skip (optional)
NSString* fields = @"fields_example"; // Field set (optional)

SWGSubaccountpricingApi*apiInstance = [[SWGSubaccountpricingApi alloc] init];

// Get a list of pricing plans for a subaccount.
[apiInstance listAccountSubaccountPricingWithAccountId:accountId
              subaccountId:subaccountId
              filtersId:filtersId
              sortId:sortId
              limit:limit
              offset:offset
              fields:fields
          completionHandler: ^(SWGListPricings* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGSubaccountpricingApi->listAccountSubaccountPricing: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
accountId NSNumber* Account ID
subaccountId NSNumber* Subaccount ID
filtersId NSArray<NSString>** ID filter [optional]
sortId NSString* ID sorting [optional]
limit NSNumber* Max results [optional]
offset NSNumber* Results to skip [optional]
fields NSString* Field set [optional]

Return type

SWGListPricings*

Authorization

apiKey

HTTP request headers

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

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