Repository navigation
Resolve VCSWP-23775 #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
37e2cc8
Update SDK with latest spec changes
amahadaya 4277cdc
Update format package to work for all Python3 versions
amahadaya 53e5775
Add changelog entry to SDK PR
amahadaya 0e348c9
Update latest changelog entry date
amahadaya 3f13951
Resolve MR comments
amahadaya 8a4238d
Update Python SDK version
amahadaya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # TFNCampaign | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| Name | Type | Description | Notes | ||
| ------------ | ------------- | ------------- | ------------- | ||
| **account_id** | **str** | ID of the account that created this participant. | | ||
| **campaign_id** | **str** | TFNCampaignId | | ||
| **use_case** | **str** | | | ||
| **registration_status** | [**SMSTollFreeCampaignRegistrationStatus**](SMSTollFreeCampaignRegistrationStatus.md) | | | ||
| **date_created** | **str** | | | ||
| **date_updated** | **str** | | | ||
| **date_created_iso** | **str** | | | ||
| **date_updated_iso** | **str** | | | ||
| **revision** | **int** | | | ||
|
|
||
| ## Example | ||
|
|
||
| ```python | ||
| from freeclimb.models.tfn_campaign import TFNCampaign | ||
|
|
||
| # TODO update the JSON string below | ||
| json = "{}" | ||
| # create an instance of TFNCampaign from a JSON string | ||
| tfn_campaign_instance = TFNCampaign.from_json(json) | ||
| # print the JSON string representation of the object | ||
| print(TFNCampaign.to_json()) | ||
|
|
||
| # convert the object into a dict | ||
| tfn_campaign_dict = tfn_campaign_instance.to_dict() | ||
| # create an instance of TFNCampaign from a dict | ||
| tfn_campaign_from_dict = TFNCampaign.from_dict(tfn_campaign_dict) | ||
| ``` | ||
| [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| # coding: utf-8 | ||
|
|
||
| """ | ||
| FreeClimb API | ||
|
|
||
| FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. | ||
|
|
||
| The version of the OpenAPI document: 1.0.0 | ||
| Contact: support@freeclimb.com | ||
| Generated by OpenAPI Generator (https://openapi-generator.tech) | ||
|
|
||
| Do not edit the class manually. | ||
| """ # noqa: E501 | ||
|
|
||
|
|
||
| from __future__ import annotations | ||
| import pprint | ||
| import re # noqa: F401 | ||
| import json | ||
|
|
||
| from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator | ||
| from typing import Any, ClassVar, Dict, List, Optional | ||
| from typing_extensions import Annotated | ||
| from freeclimb.models.sms_toll_free_campaign_registration_status import ( | ||
| SMSTollFreeCampaignRegistrationStatus, | ||
| ) | ||
| from pydantic import StrictStr | ||
| from typing import Optional, Set | ||
| from typing_extensions import Self | ||
|
|
||
|
|
||
| class TFNCampaign( | ||
| BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() | ||
| ): | ||
| """ | ||
| TFNCampaign | ||
| """ # noqa: E501 | ||
|
|
||
| account_id: Optional[StrictStr] = Field( | ||
| description="ID of the account that created this participant.", | ||
| alias="accountId", | ||
| ) | ||
| campaign_id: Annotated[str, Field(strict=True)] = Field( | ||
| description="TFNCampaignId", alias="campaignId" | ||
| ) | ||
| use_case: StrictStr = Field(alias="useCase") | ||
| registration_status: SMSTollFreeCampaignRegistrationStatus = Field( | ||
| alias="registrationStatus" | ||
| ) | ||
| date_created: StrictStr = Field(alias="dateCreated") | ||
| date_updated: StrictStr = Field(alias="dateUpdated") | ||
| date_created_iso: StrictStr = Field(alias="dateCreatedISO") | ||
| date_updated_iso: StrictStr = Field(alias="dateUpdatedISO") | ||
| revision: StrictInt | ||
|
|
||
| __properties: ClassVar[List[str]] = [ | ||
| "accountId", | ||
| "campaignId", | ||
| "useCase", | ||
| "registrationStatus", | ||
| "dateCreated", | ||
| "dateUpdated", | ||
| "dateCreatedISO", | ||
| "dateUpdatedISO", | ||
| "revision", | ||
| ] | ||
|
|
||
| @field_validator("campaign_id") | ||
| def campaign_id_validate_regular_expression(cls, value): | ||
| """Validates the regular expression""" | ||
| if not re.match(r"cmptfn_[a-fA-F0-9]{40}", value): | ||
| raise ValueError( | ||
| r"must validate the regular expression /cmptfn_[a-fA-F0-9]{40}/" | ||
| ) | ||
| return value | ||
|
|
||
| def to_str(self) -> str: | ||
| """Returns the string representation of the model using alias""" | ||
| return pprint.pformat(self.model_dump(by_alias=True)) | ||
|
|
||
| def to_json(self) -> str: | ||
| """Returns the JSON representation of the model using alias""" | ||
| # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead | ||
| return json.dumps(self.to_dict()) | ||
|
|
||
| @classmethod | ||
| def from_json(cls, json_str: str) -> Optional[Self]: | ||
| """Create an instance of TFNCampaign from a JSON string""" | ||
| return cls.from_dict(json.loads(json_str)) | ||
|
|
||
| def to_dict(self) -> Dict[str, Any]: | ||
| """Return the dictionary representation of the model using alias. | ||
|
|
||
| This has the following differences from calling pydantic's | ||
| `self.model_dump(by_alias=True)`: | ||
|
|
||
| * `None` is only added to the output dict for nullable fields that | ||
| were set at model initialization. Other fields with value `None` | ||
| are ignored. | ||
| """ | ||
| excluded_fields: Set[str] = set([]) | ||
|
|
||
| _dict = self.model_dump( | ||
| by_alias=True, | ||
| exclude=excluded_fields, | ||
| exclude_none=True, | ||
| ) | ||
| # set to None if account_id (nullable) is None | ||
| # and model_fields_set contains the field | ||
| if self.account_id is None and "account_id" in self.model_fields_set: | ||
| _dict["accountId"] = None | ||
|
|
||
| return _dict | ||
|
|
||
| @classmethod | ||
| def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: | ||
| """Create an instance of TFNCampaign from a dict""" | ||
| if obj is None: | ||
| return None | ||
|
|
||
| if not isinstance(obj, dict): | ||
| return cls.model_validate(obj) | ||
|
|
||
| _obj = cls.model_validate( | ||
| { | ||
| "accountId": obj.get("accountId"), | ||
| "campaignId": obj.get("campaignId"), | ||
| "useCase": obj.get("useCase"), | ||
| "registrationStatus": obj.get("registrationStatus"), | ||
| "dateCreated": obj.get("dateCreated"), | ||
| "dateUpdated": obj.get("dateUpdated"), | ||
| "dateCreatedISO": obj.get("dateCreatedISO"), | ||
| "dateUpdatedISO": obj.get("dateUpdatedISO"), | ||
| "revision": obj.get("revision"), | ||
| } | ||
| ) | ||
| return _obj |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.