Skip to content

Commit 712403c

Browse files
author
Shashank Mehra
committed
Add api-version as default header. Fix message model.
1 parent e3e406b commit 712403c

File tree

116 files changed

+1177
-1052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1177
-1052
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Karix API lets you interact with the Karix platform (karix.io). It allows you to
55
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
66

77
- API version: 1.0
8-
- Package version: 1.0.0
8+
- Package version: 1.0.1
99
- Build package: io.swagger.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.

docs/CreateMessage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**source** | **str** | Sender ID for the message which will be displayed to the receiver. It should specification E.164 with international calling codes but without the `+` in front. - When sending a message to US/Canada, the Sender ID must be a number which belongs to your Karix Subaccount (or main account). |
6+
**source** | **str** | Sender ID for the message which will be displayed to the receiver. It should specification E.164 with international calling codes. - When sending a message to US/Canada, the Sender ID must be a number which belongs to your Karix Subaccount (or main account). |
77
**destination** | **list[str]** | The destination numbers for the message. |
88
**text** | **str** | |
99
**notification_url** | **str** | URL on which message status change notifications will be sent | [optional]

docs/MessageApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Name | Type | Description | Notes
132132
133133
Send a message to a list of phone numbers
134134

135-
Send a message to a list of destinations. - A successful `202` response means that a message record has been created in Karix. It does not mean that each message was successfully `queued`, `sent` or `delivered`. - To know the status of the message check the parameter `status` of the message record. - Message records might be created with a `failed` state due issues with Karix or validation issues. Please check `error` to know the reason of the failure. No balance is deducted and `total_cost` is always zero for such cases. - Message records might be updated to state `undelivered`. This is due to carrier/operator related issues. Please check `error` to know the reason of the failure. Balance is still deducted for such cases. - Since this is a bulk API the response structure follows the List Response format rather than the Single Response format. - Once queued, the messages for your account are dequeued and processed at a rate set for your account (defaults to 5 messages per second). Contact [sales]([email protected]) to get your rate limit increased. - For fair usage, there is no rate limiting for queueing messages using this API. Dequeue rate would still be applicable as stated.
135+
Send a message to a list of destinations. - A successful `202` response means that a message record has been created in Karix. It does not mean that each message was successfully `queued`, `sent` or `delivered`. - To know the status of the message check the parameter `status` of the message record. - Message records might be created with a `failed` state due issues with Karix or validation issues. Please check `error` to know the reason of the failure. No balance is deducted and `total_cost` is always zero for such cases. - Message records might be updated to state `undelivered`. This is due to carrier/operator related issues. Please check `error` to know the reason of the failure. Balance is still deducted for such cases. - Since this is a bulk API the response structure follows the List Response format rather than the Single Response format. - Once queued, the messages for your account are dequeued and processed at a rate set for your account (defaults to 5 messages per second). Contact [sales]([email protected]) to get your rate limit increased. - For fair usage, there is no rate limiting for queueing messages using this API. Dequeue rate would still be applicable as stated.
136136

137137
### Example
138138
```python

karix/__init__.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@
3232
from karix.models.edit_account import EditAccount
3333
from karix.models.edit_account_number import EditAccountNumber
3434
from karix.models.edit_webhook import EditWebhook
35-
from karix.models.inline_response_200 import InlineResponse200
36-
from karix.models.inline_response_200_1 import InlineResponse2001
37-
from karix.models.inline_response_200_2 import InlineResponse2002
38-
from karix.models.inline_response_200_3 import InlineResponse2003
39-
from karix.models.inline_response_200_4 import InlineResponse2004
40-
from karix.models.inline_response_200_5 import InlineResponse2005
41-
from karix.models.inline_response_200_6 import InlineResponse2006
42-
from karix.models.inline_response_201 import InlineResponse201
43-
from karix.models.inline_response_201_1 import InlineResponse2011
44-
from karix.models.inline_response_201_2 import InlineResponse2012
45-
from karix.models.inline_response_202 import InlineResponse202
46-
from karix.models.inline_response_402 import InlineResponse402
47-
from karix.models.inline_response_402_error import InlineResponse402Error
48-
from karix.models.inline_response_403 import InlineResponse403
49-
from karix.models.inline_response_403_error import InlineResponse403Error
50-
from karix.models.inline_response_404 import InlineResponse404
51-
from karix.models.inline_response_404_error import InlineResponse404Error
52-
from karix.models.inline_response_500 import InlineResponse500
53-
from karix.models.inline_response_500_error import InlineResponse500Error
35+
from karix.models.inline_response200 import InlineResponse200
36+
from karix.models.inline_response2001 import InlineResponse2001
37+
from karix.models.inline_response2002 import InlineResponse2002
38+
from karix.models.inline_response2003 import InlineResponse2003
39+
from karix.models.inline_response2004 import InlineResponse2004
40+
from karix.models.inline_response2005 import InlineResponse2005
41+
from karix.models.inline_response2006 import InlineResponse2006
42+
from karix.models.inline_response201 import InlineResponse201
43+
from karix.models.inline_response2011 import InlineResponse2011
44+
from karix.models.inline_response2012 import InlineResponse2012
45+
from karix.models.inline_response202 import InlineResponse202
46+
from karix.models.inline_response402 import InlineResponse402
47+
from karix.models.inline_response402_error import InlineResponse402Error
48+
from karix.models.inline_response403 import InlineResponse403
49+
from karix.models.inline_response403_error import InlineResponse403Error
50+
from karix.models.inline_response404 import InlineResponse404
51+
from karix.models.inline_response404_error import InlineResponse404Error
52+
from karix.models.inline_response500 import InlineResponse500
53+
from karix.models.inline_response500_error import InlineResponse500Error
5454
from karix.models.message import Message
5555
from karix.models.message_error import MessageError
5656
from karix.models.meta_response import MetaResponse

karix/api/accounts_api.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ def create_subaccount(self, **kwargs): # noqa: E501
3838
3939
Create a new subaccount under your account # noqa: E501
4040
This method makes a synchronous HTTP request by default. To make an
41-
asynchronous HTTP request, please pass async=True
42-
>>> thread = api.create_subaccount(async=True)
41+
asynchronous HTTP request, please pass async_req=True
42+
>>> thread = api.create_subaccount(async_req=True)
4343
>>> result = thread.get()
4444
45-
:param async bool
45+
:param async_req bool
4646
:param str api_version: API Version. If not specified your pinned verison is used.
4747
:param CreateAccount subaccount: Subaccount object
4848
:return: InlineResponse201
4949
If the method is called asynchronously,
5050
returns the request thread.
5151
"""
5252
kwargs['_return_http_data_only'] = True
53-
if kwargs.get('async'):
53+
if kwargs.get('async_req'):
5454
return self.create_subaccount_with_http_info(**kwargs) # noqa: E501
5555
else:
5656
(data) = self.create_subaccount_with_http_info(**kwargs) # noqa: E501
@@ -61,11 +61,11 @@ def create_subaccount_with_http_info(self, **kwargs): # noqa: E501
6161
6262
Create a new subaccount under your account # noqa: E501
6363
This method makes a synchronous HTTP request by default. To make an
64-
asynchronous HTTP request, please pass async=True
65-
>>> thread = api.create_subaccount_with_http_info(async=True)
64+
asynchronous HTTP request, please pass async_req=True
65+
>>> thread = api.create_subaccount_with_http_info(async_req=True)
6666
>>> result = thread.get()
6767
68-
:param async bool
68+
:param async_req bool
6969
:param str api_version: API Version. If not specified your pinned verison is used.
7070
:param CreateAccount subaccount: Subaccount object
7171
:return: InlineResponse201
@@ -74,7 +74,7 @@ def create_subaccount_with_http_info(self, **kwargs): # noqa: E501
7474
"""
7575

7676
all_params = ['api_version', 'subaccount'] # noqa: E501
77-
all_params.append('async')
77+
all_params.append('async_req')
7878
all_params.append('_return_http_data_only')
7979
all_params.append('_preload_content')
8080
all_params.append('_request_timeout')
@@ -126,7 +126,7 @@ def create_subaccount_with_http_info(self, **kwargs): # noqa: E501
126126
files=local_var_files,
127127
response_type='InlineResponse201', # noqa: E501
128128
auth_settings=auth_settings,
129-
async=params.get('async'),
129+
async_req=params.get('async_req'),
130130
_return_http_data_only=params.get('_return_http_data_only'),
131131
_preload_content=params.get('_preload_content', True),
132132
_request_timeout=params.get('_request_timeout'),
@@ -137,11 +137,11 @@ def get_subaccount(self, **kwargs): # noqa: E501
137137
138138
Get a list of details of all subaccounts, including the main account. Accounts are sorted by last updated time. # noqa: E501
139139
This method makes a synchronous HTTP request by default. To make an
140-
asynchronous HTTP request, please pass async=True
141-
>>> thread = api.get_subaccount(async=True)
140+
asynchronous HTTP request, please pass async_req=True
141+
>>> thread = api.get_subaccount(async_req=True)
142142
>>> result = thread.get()
143143
144-
:param async bool
144+
:param async_req bool
145145
:param str api_version: API Version. If not specified your pinned verison is used.
146146
:param int offset: The number of items to skip before starting to collect the result set.
147147
:param int limit: The numbers of items to return.
@@ -150,7 +150,7 @@ def get_subaccount(self, **kwargs): # noqa: E501
150150
returns the request thread.
151151
"""
152152
kwargs['_return_http_data_only'] = True
153-
if kwargs.get('async'):
153+
if kwargs.get('async_req'):
154154
return self.get_subaccount_with_http_info(**kwargs) # noqa: E501
155155
else:
156156
(data) = self.get_subaccount_with_http_info(**kwargs) # noqa: E501
@@ -161,11 +161,11 @@ def get_subaccount_with_http_info(self, **kwargs): # noqa: E501
161161
162162
Get a list of details of all subaccounts, including the main account. Accounts are sorted by last updated time. # noqa: E501
163163
This method makes a synchronous HTTP request by default. To make an
164-
asynchronous HTTP request, please pass async=True
165-
>>> thread = api.get_subaccount_with_http_info(async=True)
164+
asynchronous HTTP request, please pass async_req=True
165+
>>> thread = api.get_subaccount_with_http_info(async_req=True)
166166
>>> result = thread.get()
167167
168-
:param async bool
168+
:param async_req bool
169169
:param str api_version: API Version. If not specified your pinned verison is used.
170170
:param int offset: The number of items to skip before starting to collect the result set.
171171
:param int limit: The numbers of items to return.
@@ -175,7 +175,7 @@ def get_subaccount_with_http_info(self, **kwargs): # noqa: E501
175175
"""
176176

177177
all_params = ['api_version', 'offset', 'limit'] # noqa: E501
178-
all_params.append('async')
178+
all_params.append('async_req')
179179
all_params.append('_return_http_data_only')
180180
all_params.append('_preload_content')
181181
all_params.append('_request_timeout')
@@ -229,7 +229,7 @@ def get_subaccount_with_http_info(self, **kwargs): # noqa: E501
229229
files=local_var_files,
230230
response_type='InlineResponse200', # noqa: E501
231231
auth_settings=auth_settings,
232-
async=params.get('async'),
232+
async_req=params.get('async_req'),
233233
_return_http_data_only=params.get('_return_http_data_only'),
234234
_preload_content=params.get('_preload_content', True),
235235
_request_timeout=params.get('_request_timeout'),
@@ -240,19 +240,19 @@ def get_subaccount_by_id(self, uid, **kwargs): # noqa: E501
240240
241241
Get details of an account by its uid. Both main account and subaccounts can be fetched using their uids. # noqa: E501
242242
This method makes a synchronous HTTP request by default. To make an
243-
asynchronous HTTP request, please pass async=True
244-
>>> thread = api.get_subaccount_by_id(uid, async=True)
243+
asynchronous HTTP request, please pass async_req=True
244+
>>> thread = api.get_subaccount_by_id(uid, async_req=True)
245245
>>> result = thread.get()
246246
247-
:param async bool
247+
:param async_req bool
248248
:param str uid: Alphanumeric ID of the subaccount to get. (required)
249249
:param str api_version: API Version. If not specified your pinned verison is used.
250250
:return: InlineResponse201
251251
If the method is called asynchronously,
252252
returns the request thread.
253253
"""
254254
kwargs['_return_http_data_only'] = True
255-
if kwargs.get('async'):
255+
if kwargs.get('async_req'):
256256
return self.get_subaccount_by_id_with_http_info(uid, **kwargs) # noqa: E501
257257
else:
258258
(data) = self.get_subaccount_by_id_with_http_info(uid, **kwargs) # noqa: E501
@@ -263,11 +263,11 @@ def get_subaccount_by_id_with_http_info(self, uid, **kwargs): # noqa: E501
263263
264264
Get details of an account by its uid. Both main account and subaccounts can be fetched using their uids. # noqa: E501
265265
This method makes a synchronous HTTP request by default. To make an
266-
asynchronous HTTP request, please pass async=True
267-
>>> thread = api.get_subaccount_by_id_with_http_info(uid, async=True)
266+
asynchronous HTTP request, please pass async_req=True
267+
>>> thread = api.get_subaccount_by_id_with_http_info(uid, async_req=True)
268268
>>> result = thread.get()
269269
270-
:param async bool
270+
:param async_req bool
271271
:param str uid: Alphanumeric ID of the subaccount to get. (required)
272272
:param str api_version: API Version. If not specified your pinned verison is used.
273273
:return: InlineResponse201
@@ -276,7 +276,7 @@ def get_subaccount_by_id_with_http_info(self, uid, **kwargs): # noqa: E501
276276
"""
277277

278278
all_params = ['uid', 'api_version'] # noqa: E501
279-
all_params.append('async')
279+
all_params.append('async_req')
280280
all_params.append('_return_http_data_only')
281281
all_params.append('_preload_content')
282282
all_params.append('_request_timeout')
@@ -332,7 +332,7 @@ def get_subaccount_by_id_with_http_info(self, uid, **kwargs): # noqa: E501
332332
files=local_var_files,
333333
response_type='InlineResponse201', # noqa: E501
334334
auth_settings=auth_settings,
335-
async=params.get('async'),
335+
async_req=params.get('async_req'),
336336
_return_http_data_only=params.get('_return_http_data_only'),
337337
_preload_content=params.get('_preload_content', True),
338338
_request_timeout=params.get('_request_timeout'),
@@ -343,11 +343,11 @@ def patch_subaccount(self, uid, **kwargs): # noqa: E501
343343
344344
Edit details of your account or its subaccount - An account can only change the status of subaccounts under it. It cant change its own status - A parent account can edit its own details and the details of its subaccounts # noqa: E501
345345
This method makes a synchronous HTTP request by default. To make an
346-
asynchronous HTTP request, please pass async=True
347-
>>> thread = api.patch_subaccount(uid, async=True)
346+
asynchronous HTTP request, please pass async_req=True
347+
>>> thread = api.patch_subaccount(uid, async_req=True)
348348
>>> result = thread.get()
349349
350-
:param async bool
350+
:param async_req bool
351351
:param str uid: Alphanumeric ID of the account/subaccount to edit. (required)
352352
:param str api_version: API Version. If not specified your pinned verison is used.
353353
:param EditAccount subaccount: Subaccount object
@@ -356,7 +356,7 @@ def patch_subaccount(self, uid, **kwargs): # noqa: E501
356356
returns the request thread.
357357
"""
358358
kwargs['_return_http_data_only'] = True
359-
if kwargs.get('async'):
359+
if kwargs.get('async_req'):
360360
return self.patch_subaccount_with_http_info(uid, **kwargs) # noqa: E501
361361
else:
362362
(data) = self.patch_subaccount_with_http_info(uid, **kwargs) # noqa: E501
@@ -367,11 +367,11 @@ def patch_subaccount_with_http_info(self, uid, **kwargs): # noqa: E501
367367
368368
Edit details of your account or its subaccount - An account can only change the status of subaccounts under it. It cant change its own status - A parent account can edit its own details and the details of its subaccounts # noqa: E501
369369
This method makes a synchronous HTTP request by default. To make an
370-
asynchronous HTTP request, please pass async=True
371-
>>> thread = api.patch_subaccount_with_http_info(uid, async=True)
370+
asynchronous HTTP request, please pass async_req=True
371+
>>> thread = api.patch_subaccount_with_http_info(uid, async_req=True)
372372
>>> result = thread.get()
373373
374-
:param async bool
374+
:param async_req bool
375375
:param str uid: Alphanumeric ID of the account/subaccount to edit. (required)
376376
:param str api_version: API Version. If not specified your pinned verison is used.
377377
:param EditAccount subaccount: Subaccount object
@@ -381,7 +381,7 @@ def patch_subaccount_with_http_info(self, uid, **kwargs): # noqa: E501
381381
"""
382382

383383
all_params = ['uid', 'api_version', 'subaccount'] # noqa: E501
384-
all_params.append('async')
384+
all_params.append('async_req')
385385
all_params.append('_return_http_data_only')
386386
all_params.append('_preload_content')
387387
all_params.append('_request_timeout')
@@ -439,7 +439,7 @@ def patch_subaccount_with_http_info(self, uid, **kwargs): # noqa: E501
439439
files=local_var_files,
440440
response_type='InlineResponse201', # noqa: E501
441441
auth_settings=auth_settings,
442-
async=params.get('async'),
442+
async_req=params.get('async_req'),
443443
_return_http_data_only=params.get('_return_http_data_only'),
444444
_preload_content=params.get('_preload_content', True),
445445
_request_timeout=params.get('_request_timeout'),

0 commit comments

Comments
 (0)