pluggy-sdk 1.0.0.post34__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pluggy_sdk/__init__.py +200 -0
- pluggy_sdk/api/__init__.py +25 -0
- pluggy_sdk/api/account_api.py +588 -0
- pluggy_sdk/api/acquirer_anticipation_api.py +664 -0
- pluggy_sdk/api/acquirer_receivable_api.py +664 -0
- pluggy_sdk/api/acquirer_sale_api.py +664 -0
- pluggy_sdk/api/auth_api.py +605 -0
- pluggy_sdk/api/benefit_api.py +567 -0
- pluggy_sdk/api/bill_api.py +567 -0
- pluggy_sdk/api/bulk_payment_api.py +1127 -0
- pluggy_sdk/api/category_api.py +1096 -0
- pluggy_sdk/api/connector_api.py +979 -0
- pluggy_sdk/api/consent_api.py +576 -0
- pluggy_sdk/api/identity_api.py +581 -0
- pluggy_sdk/api/income_report_api.py +311 -0
- pluggy_sdk/api/investment_api.py +918 -0
- pluggy_sdk/api/items_api.py +1456 -0
- pluggy_sdk/api/loan_api.py +567 -0
- pluggy_sdk/api/payment_customer_api.py +1414 -0
- pluggy_sdk/api/payment_intent_api.py +842 -0
- pluggy_sdk/api/payment_receipts_api.py +842 -0
- pluggy_sdk/api/payment_recipient_api.py +1997 -0
- pluggy_sdk/api/payment_request_api.py +2739 -0
- pluggy_sdk/api/payment_schedule_api.py +823 -0
- pluggy_sdk/api/payroll_loan_api.py +561 -0
- pluggy_sdk/api/portfolio_yield_api.py +580 -0
- pluggy_sdk/api/smart_account_api.py +1704 -0
- pluggy_sdk/api/smart_account_transfer_api.py +610 -0
- pluggy_sdk/api/smart_transfer_api.py +1406 -0
- pluggy_sdk/api/transaction_api.py +963 -0
- pluggy_sdk/api/webhook_api.py +1406 -0
- pluggy_sdk/api_client.py +798 -0
- pluggy_sdk/api_response.py +21 -0
- pluggy_sdk/configuration.py +596 -0
- pluggy_sdk/exceptions.py +217 -0
- pluggy_sdk/models/__init__.py +163 -0
- pluggy_sdk/models/account.py +134 -0
- pluggy_sdk/models/accounts_list200_response.py +102 -0
- pluggy_sdk/models/acquirer_anticipation.py +117 -0
- pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
- pluggy_sdk/models/acquirer_data.py +113 -0
- pluggy_sdk/models/acquirer_receivable.py +143 -0
- pluggy_sdk/models/acquirer_receivable_data.py +108 -0
- pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
- pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
- pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
- pluggy_sdk/models/acquirer_sale.py +171 -0
- pluggy_sdk/models/acquirer_sale_data.py +150 -0
- pluggy_sdk/models/acquirer_sale_installment.py +93 -0
- pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
- pluggy_sdk/models/address.py +110 -0
- pluggy_sdk/models/aggregated_portfolio.py +120 -0
- pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
- pluggy_sdk/models/asset_distribution.py +88 -0
- pluggy_sdk/models/auth_request.py +90 -0
- pluggy_sdk/models/auth_response.py +88 -0
- pluggy_sdk/models/bank_data.py +92 -0
- pluggy_sdk/models/benefit_loan.py +121 -0
- pluggy_sdk/models/benefit_loan_client.py +102 -0
- pluggy_sdk/models/benefit_response.py +118 -0
- pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
- pluggy_sdk/models/benefits_list200_response.py +102 -0
- pluggy_sdk/models/bill.py +109 -0
- pluggy_sdk/models/bill_finance_charge.py +103 -0
- pluggy_sdk/models/bills_list200_response.py +102 -0
- pluggy_sdk/models/boleto.py +121 -0
- pluggy_sdk/models/boleto_payer.py +90 -0
- pluggy_sdk/models/boleto_recipient.py +90 -0
- pluggy_sdk/models/bulk_payment.py +128 -0
- pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
- pluggy_sdk/models/category.py +96 -0
- pluggy_sdk/models/client_category_rule.py +98 -0
- pluggy_sdk/models/company.py +90 -0
- pluggy_sdk/models/connect_token_request.py +94 -0
- pluggy_sdk/models/connect_token_response.py +88 -0
- pluggy_sdk/models/connector.py +145 -0
- pluggy_sdk/models/connector_credential.py +121 -0
- pluggy_sdk/models/connector_health.py +96 -0
- pluggy_sdk/models/connector_health_details.py +90 -0
- pluggy_sdk/models/connector_list_response.py +102 -0
- pluggy_sdk/models/connector_user_action.py +93 -0
- pluggy_sdk/models/consent.py +120 -0
- pluggy_sdk/models/create_boleto_payment_request.py +98 -0
- pluggy_sdk/models/create_bulk_payment.py +96 -0
- pluggy_sdk/models/create_client_category_rule.py +96 -0
- pluggy_sdk/models/create_item.py +115 -0
- pluggy_sdk/models/create_item_parameters.py +144 -0
- pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
- pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
- pluggy_sdk/models/create_payment_intent.py +110 -0
- pluggy_sdk/models/create_payment_recipient.py +104 -0
- pluggy_sdk/models/create_payment_request.py +115 -0
- pluggy_sdk/models/create_payment_request_schedule.py +189 -0
- pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
- pluggy_sdk/models/create_smart_account_request.py +104 -0
- pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
- pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
- pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
- pluggy_sdk/models/create_webhook.py +99 -0
- pluggy_sdk/models/credential_select_option.py +90 -0
- pluggy_sdk/models/credit_card_metadata.py +101 -0
- pluggy_sdk/models/credit_data.py +127 -0
- pluggy_sdk/models/custom.py +100 -0
- pluggy_sdk/models/daily.py +101 -0
- pluggy_sdk/models/document.py +100 -0
- pluggy_sdk/models/email.py +100 -0
- pluggy_sdk/models/global_error_response.py +94 -0
- pluggy_sdk/models/i_count_response.py +88 -0
- pluggy_sdk/models/identity_relation.py +102 -0
- pluggy_sdk/models/identity_response.py +173 -0
- pluggy_sdk/models/identity_response_financial_relationships.py +111 -0
- pluggy_sdk/models/identity_response_financial_relationships_accounts_inner.py +98 -0
- pluggy_sdk/models/identity_response_financial_relationships_procurators_inner.py +101 -0
- pluggy_sdk/models/identity_response_qualifications.py +112 -0
- pluggy_sdk/models/identity_response_qualifications_informed_income.py +100 -0
- pluggy_sdk/models/identity_response_qualifications_informed_patrimony.py +90 -0
- pluggy_sdk/models/income_report.py +90 -0
- pluggy_sdk/models/income_reports_response.py +102 -0
- pluggy_sdk/models/investment.py +192 -0
- pluggy_sdk/models/investment_expenses.py +108 -0
- pluggy_sdk/models/investment_metadata.py +100 -0
- pluggy_sdk/models/investment_transaction.py +124 -0
- pluggy_sdk/models/investments_list200_response.py +102 -0
- pluggy_sdk/models/item.py +150 -0
- pluggy_sdk/models/item_creation_error_response.py +102 -0
- pluggy_sdk/models/item_error.py +94 -0
- pluggy_sdk/models/item_options.py +94 -0
- pluggy_sdk/models/loan.py +199 -0
- pluggy_sdk/models/loan_contracted_fee.py +118 -0
- pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
- pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
- pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
- pluggy_sdk/models/loan_installments.py +130 -0
- pluggy_sdk/models/loan_interest_rate.py +136 -0
- pluggy_sdk/models/loan_payment_release.py +103 -0
- pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
- pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
- pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
- pluggy_sdk/models/loan_payments.py +98 -0
- pluggy_sdk/models/loan_warranty.py +94 -0
- pluggy_sdk/models/loans_list200_response.py +102 -0
- pluggy_sdk/models/merchant.py +96 -0
- pluggy_sdk/models/monthly.py +103 -0
- pluggy_sdk/models/monthly_portfolio.py +100 -0
- pluggy_sdk/models/monthly_portfolio_response.py +102 -0
- pluggy_sdk/models/not_authenticated_response.py +90 -0
- pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
- pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
- pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
- pluggy_sdk/models/page_response_category_rules.py +102 -0
- pluggy_sdk/models/page_response_consents.py +102 -0
- pluggy_sdk/models/page_response_investment_transactions.py +102 -0
- pluggy_sdk/models/page_response_transactions.py +102 -0
- pluggy_sdk/models/parameter_validation_error.py +92 -0
- pluggy_sdk/models/parameter_validation_response.py +98 -0
- pluggy_sdk/models/payment_customer.py +105 -0
- pluggy_sdk/models/payment_customers_list200_response.py +102 -0
- pluggy_sdk/models/payment_data.py +111 -0
- pluggy_sdk/models/payment_data_boleto_metadata.py +98 -0
- pluggy_sdk/models/payment_data_participant.py +102 -0
- pluggy_sdk/models/payment_institution.py +101 -0
- pluggy_sdk/models/payment_intent.py +145 -0
- pluggy_sdk/models/payment_intent_parameter.py +90 -0
- pluggy_sdk/models/payment_intents_list200_response.py +102 -0
- pluggy_sdk/models/payment_receipt.py +120 -0
- pluggy_sdk/models/payment_receipt_bank_account.py +92 -0
- pluggy_sdk/models/payment_receipt_person.py +96 -0
- pluggy_sdk/models/payment_recipient.py +110 -0
- pluggy_sdk/models/payment_recipient_account.py +92 -0
- pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
- pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
- pluggy_sdk/models/payment_request.py +132 -0
- pluggy_sdk/models/payment_request_callback_urls.py +92 -0
- pluggy_sdk/models/payment_request_receipt_list200_response.py +102 -0
- pluggy_sdk/models/payment_request_schedule.py +183 -0
- pluggy_sdk/models/payment_requests_list200_response.py +102 -0
- pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
- pluggy_sdk/models/payroll_loan.py +121 -0
- pluggy_sdk/models/payroll_loan_client.py +102 -0
- pluggy_sdk/models/payroll_loan_response.py +125 -0
- pluggy_sdk/models/payroll_loan_response_client.py +102 -0
- pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
- pluggy_sdk/models/percentage_over_index.py +90 -0
- pluggy_sdk/models/phone_number.py +100 -0
- pluggy_sdk/models/pix_data.py +90 -0
- pluggy_sdk/models/schedule_payment.py +102 -0
- pluggy_sdk/models/schedule_type_custom.py +100 -0
- pluggy_sdk/models/schedule_type_daily.py +101 -0
- pluggy_sdk/models/schedule_type_monthly.py +103 -0
- pluggy_sdk/models/schedule_type_single.py +98 -0
- pluggy_sdk/models/schedule_type_weekly.py +110 -0
- pluggy_sdk/models/single.py +98 -0
- pluggy_sdk/models/smart_account.py +107 -0
- pluggy_sdk/models/smart_account_address.py +112 -0
- pluggy_sdk/models/smart_account_balance.py +95 -0
- pluggy_sdk/models/smart_account_transfer.py +123 -0
- pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
- pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
- pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
- pluggy_sdk/models/smart_transfer_payment.py +116 -0
- pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
- pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
- pluggy_sdk/models/status_detail.py +127 -0
- pluggy_sdk/models/status_detail_product.py +101 -0
- pluggy_sdk/models/status_detail_product_warning.py +92 -0
- pluggy_sdk/models/transaction.py +141 -0
- pluggy_sdk/models/update_item.py +109 -0
- pluggy_sdk/models/update_item_parameters.py +144 -0
- pluggy_sdk/models/update_payment_recipient.py +102 -0
- pluggy_sdk/models/update_payment_request.py +102 -0
- pluggy_sdk/models/update_transaction.py +88 -0
- pluggy_sdk/models/webhook.py +106 -0
- pluggy_sdk/models/webhook_creation_error_response.py +90 -0
- pluggy_sdk/models/webhooks_list200_response.py +102 -0
- pluggy_sdk/models/weekly.py +110 -0
- pluggy_sdk/py.typed +0 -0
- pluggy_sdk/rest.py +258 -0
- pluggy_sdk-1.0.0.post34.dist-info/METADATA +373 -0
- pluggy_sdk-1.0.0.post34.dist-info/RECORD +221 -0
- pluggy_sdk-1.0.0.post34.dist-info/WHEEL +5 -0
- pluggy_sdk-1.0.0.post34.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1096 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
import warnings
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
18
|
+
from typing_extensions import Annotated
|
19
|
+
|
20
|
+
from pydantic import Field, StrictStr
|
21
|
+
from typing import List, Optional
|
22
|
+
from typing_extensions import Annotated
|
23
|
+
from pluggy_sdk.models.category import Category
|
24
|
+
from pluggy_sdk.models.client_category_rule import ClientCategoryRule
|
25
|
+
from pluggy_sdk.models.create_client_category_rule import CreateClientCategoryRule
|
26
|
+
from pluggy_sdk.models.page_response_category_rules import PageResponseCategoryRules
|
27
|
+
|
28
|
+
from pluggy_sdk.api_client import ApiClient, RequestSerialized
|
29
|
+
from pluggy_sdk.api_response import ApiResponse
|
30
|
+
from pluggy_sdk.rest import RESTResponseType
|
31
|
+
|
32
|
+
|
33
|
+
class CategoryApi:
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
35
|
+
Ref: https://openapi-generator.tech
|
36
|
+
|
37
|
+
Do not edit the class manually.
|
38
|
+
"""
|
39
|
+
|
40
|
+
def __init__(self, api_client=None) -> None:
|
41
|
+
if api_client is None:
|
42
|
+
api_client = ApiClient.get_default()
|
43
|
+
self.api_client = api_client
|
44
|
+
|
45
|
+
|
46
|
+
@validate_call
|
47
|
+
def categories_list(
|
48
|
+
self,
|
49
|
+
parent_id: Annotated[Optional[StrictStr], Field(description="Parent's primary identifier")] = None,
|
50
|
+
_request_timeout: Union[
|
51
|
+
None,
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
53
|
+
Tuple[
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
56
|
+
]
|
57
|
+
] = None,
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
62
|
+
) -> List[Category]:
|
63
|
+
"""List
|
64
|
+
|
65
|
+
Recovers all categories active from the data categorization. Can be filtered by the parentId of the category.
|
66
|
+
|
67
|
+
:param parent_id: Parent's primary identifier
|
68
|
+
:type parent_id: str
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
70
|
+
number provided, it will be total request
|
71
|
+
timeout. It can also be a pair (tuple) of
|
72
|
+
(connection, read) timeouts.
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
75
|
+
request; this effectively ignores the
|
76
|
+
authentication in the spec for a single request.
|
77
|
+
:type _request_auth: dict, optional
|
78
|
+
:param _content_type: force content-type for the request.
|
79
|
+
:type _content_type: str, Optional
|
80
|
+
:param _headers: set to override the headers for a single
|
81
|
+
request; this effectively ignores the headers
|
82
|
+
in the spec for a single request.
|
83
|
+
:type _headers: dict, optional
|
84
|
+
:param _host_index: set to override the host_index for a single
|
85
|
+
request; this effectively ignores the host_index
|
86
|
+
in the spec for a single request.
|
87
|
+
:type _host_index: int, optional
|
88
|
+
:return: Returns the result object.
|
89
|
+
""" # noqa: E501
|
90
|
+
|
91
|
+
_param = self._categories_list_serialize(
|
92
|
+
parent_id=parent_id,
|
93
|
+
_request_auth=_request_auth,
|
94
|
+
_content_type=_content_type,
|
95
|
+
_headers=_headers,
|
96
|
+
_host_index=_host_index
|
97
|
+
)
|
98
|
+
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
100
|
+
'200': "List[Category]",
|
101
|
+
}
|
102
|
+
response_data = self.api_client.call_api(
|
103
|
+
*_param,
|
104
|
+
_request_timeout=_request_timeout
|
105
|
+
)
|
106
|
+
response_data.read()
|
107
|
+
return self.api_client.response_deserialize(
|
108
|
+
response_data=response_data,
|
109
|
+
response_types_map=_response_types_map,
|
110
|
+
).data
|
111
|
+
|
112
|
+
|
113
|
+
@validate_call
|
114
|
+
def categories_list_with_http_info(
|
115
|
+
self,
|
116
|
+
parent_id: Annotated[Optional[StrictStr], Field(description="Parent's primary identifier")] = None,
|
117
|
+
_request_timeout: Union[
|
118
|
+
None,
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
120
|
+
Tuple[
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
122
|
+
Annotated[StrictFloat, Field(gt=0)]
|
123
|
+
]
|
124
|
+
] = None,
|
125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
126
|
+
_content_type: Optional[StrictStr] = None,
|
127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
129
|
+
) -> ApiResponse[List[Category]]:
|
130
|
+
"""List
|
131
|
+
|
132
|
+
Recovers all categories active from the data categorization. Can be filtered by the parentId of the category.
|
133
|
+
|
134
|
+
:param parent_id: Parent's primary identifier
|
135
|
+
:type parent_id: str
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
137
|
+
number provided, it will be total request
|
138
|
+
timeout. It can also be a pair (tuple) of
|
139
|
+
(connection, read) timeouts.
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
142
|
+
request; this effectively ignores the
|
143
|
+
authentication in the spec for a single request.
|
144
|
+
:type _request_auth: dict, optional
|
145
|
+
:param _content_type: force content-type for the request.
|
146
|
+
:type _content_type: str, Optional
|
147
|
+
:param _headers: set to override the headers for a single
|
148
|
+
request; this effectively ignores the headers
|
149
|
+
in the spec for a single request.
|
150
|
+
:type _headers: dict, optional
|
151
|
+
:param _host_index: set to override the host_index for a single
|
152
|
+
request; this effectively ignores the host_index
|
153
|
+
in the spec for a single request.
|
154
|
+
:type _host_index: int, optional
|
155
|
+
:return: Returns the result object.
|
156
|
+
""" # noqa: E501
|
157
|
+
|
158
|
+
_param = self._categories_list_serialize(
|
159
|
+
parent_id=parent_id,
|
160
|
+
_request_auth=_request_auth,
|
161
|
+
_content_type=_content_type,
|
162
|
+
_headers=_headers,
|
163
|
+
_host_index=_host_index
|
164
|
+
)
|
165
|
+
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
167
|
+
'200': "List[Category]",
|
168
|
+
}
|
169
|
+
response_data = self.api_client.call_api(
|
170
|
+
*_param,
|
171
|
+
_request_timeout=_request_timeout
|
172
|
+
)
|
173
|
+
response_data.read()
|
174
|
+
return self.api_client.response_deserialize(
|
175
|
+
response_data=response_data,
|
176
|
+
response_types_map=_response_types_map,
|
177
|
+
)
|
178
|
+
|
179
|
+
|
180
|
+
@validate_call
|
181
|
+
def categories_list_without_preload_content(
|
182
|
+
self,
|
183
|
+
parent_id: Annotated[Optional[StrictStr], Field(description="Parent's primary identifier")] = None,
|
184
|
+
_request_timeout: Union[
|
185
|
+
None,
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
187
|
+
Tuple[
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
190
|
+
]
|
191
|
+
] = None,
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
196
|
+
) -> RESTResponseType:
|
197
|
+
"""List
|
198
|
+
|
199
|
+
Recovers all categories active from the data categorization. Can be filtered by the parentId of the category.
|
200
|
+
|
201
|
+
:param parent_id: Parent's primary identifier
|
202
|
+
:type parent_id: str
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
204
|
+
number provided, it will be total request
|
205
|
+
timeout. It can also be a pair (tuple) of
|
206
|
+
(connection, read) timeouts.
|
207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
209
|
+
request; this effectively ignores the
|
210
|
+
authentication in the spec for a single request.
|
211
|
+
:type _request_auth: dict, optional
|
212
|
+
:param _content_type: force content-type for the request.
|
213
|
+
:type _content_type: str, Optional
|
214
|
+
:param _headers: set to override the headers for a single
|
215
|
+
request; this effectively ignores the headers
|
216
|
+
in the spec for a single request.
|
217
|
+
:type _headers: dict, optional
|
218
|
+
:param _host_index: set to override the host_index for a single
|
219
|
+
request; this effectively ignores the host_index
|
220
|
+
in the spec for a single request.
|
221
|
+
:type _host_index: int, optional
|
222
|
+
:return: Returns the result object.
|
223
|
+
""" # noqa: E501
|
224
|
+
|
225
|
+
_param = self._categories_list_serialize(
|
226
|
+
parent_id=parent_id,
|
227
|
+
_request_auth=_request_auth,
|
228
|
+
_content_type=_content_type,
|
229
|
+
_headers=_headers,
|
230
|
+
_host_index=_host_index
|
231
|
+
)
|
232
|
+
|
233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
234
|
+
'200': "List[Category]",
|
235
|
+
}
|
236
|
+
response_data = self.api_client.call_api(
|
237
|
+
*_param,
|
238
|
+
_request_timeout=_request_timeout
|
239
|
+
)
|
240
|
+
return response_data.response
|
241
|
+
|
242
|
+
|
243
|
+
def _categories_list_serialize(
|
244
|
+
self,
|
245
|
+
parent_id,
|
246
|
+
_request_auth,
|
247
|
+
_content_type,
|
248
|
+
_headers,
|
249
|
+
_host_index,
|
250
|
+
) -> RequestSerialized:
|
251
|
+
|
252
|
+
_host = None
|
253
|
+
|
254
|
+
_collection_formats: Dict[str, str] = {
|
255
|
+
}
|
256
|
+
|
257
|
+
_path_params: Dict[str, str] = {}
|
258
|
+
_query_params: List[Tuple[str, str]] = []
|
259
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
260
|
+
_form_params: List[Tuple[str, str]] = []
|
261
|
+
_files: Dict[
|
262
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
263
|
+
] = {}
|
264
|
+
_body_params: Optional[bytes] = None
|
265
|
+
|
266
|
+
# process the path parameters
|
267
|
+
# process the query parameters
|
268
|
+
if parent_id is not None:
|
269
|
+
|
270
|
+
_query_params.append(('parentId', parent_id))
|
271
|
+
|
272
|
+
# process the header parameters
|
273
|
+
# process the form parameters
|
274
|
+
# process the body parameter
|
275
|
+
|
276
|
+
|
277
|
+
# set the HTTP header `Accept`
|
278
|
+
if 'Accept' not in _header_params:
|
279
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
280
|
+
[
|
281
|
+
'application/json'
|
282
|
+
]
|
283
|
+
)
|
284
|
+
|
285
|
+
|
286
|
+
# authentication setting
|
287
|
+
_auth_settings: List[str] = [
|
288
|
+
'default'
|
289
|
+
]
|
290
|
+
|
291
|
+
return self.api_client.param_serialize(
|
292
|
+
method='GET',
|
293
|
+
resource_path='/categories',
|
294
|
+
path_params=_path_params,
|
295
|
+
query_params=_query_params,
|
296
|
+
header_params=_header_params,
|
297
|
+
body=_body_params,
|
298
|
+
post_params=_form_params,
|
299
|
+
files=_files,
|
300
|
+
auth_settings=_auth_settings,
|
301
|
+
collection_formats=_collection_formats,
|
302
|
+
_host=_host,
|
303
|
+
_request_auth=_request_auth
|
304
|
+
)
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
@validate_call
|
310
|
+
def categories_retrieve(
|
311
|
+
self,
|
312
|
+
id: Annotated[StrictStr, Field(description="category primary identifier")],
|
313
|
+
_request_timeout: Union[
|
314
|
+
None,
|
315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
316
|
+
Tuple[
|
317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
318
|
+
Annotated[StrictFloat, Field(gt=0)]
|
319
|
+
]
|
320
|
+
] = None,
|
321
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
322
|
+
_content_type: Optional[StrictStr] = None,
|
323
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
324
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
325
|
+
) -> Category:
|
326
|
+
"""Retrieve
|
327
|
+
|
328
|
+
Recovers the category resource by its id
|
329
|
+
|
330
|
+
:param id: category primary identifier (required)
|
331
|
+
:type id: str
|
332
|
+
:param _request_timeout: timeout setting for this request. If one
|
333
|
+
number provided, it will be total request
|
334
|
+
timeout. It can also be a pair (tuple) of
|
335
|
+
(connection, read) timeouts.
|
336
|
+
:type _request_timeout: int, tuple(int, int), optional
|
337
|
+
:param _request_auth: set to override the auth_settings for an a single
|
338
|
+
request; this effectively ignores the
|
339
|
+
authentication in the spec for a single request.
|
340
|
+
:type _request_auth: dict, optional
|
341
|
+
:param _content_type: force content-type for the request.
|
342
|
+
:type _content_type: str, Optional
|
343
|
+
:param _headers: set to override the headers for a single
|
344
|
+
request; this effectively ignores the headers
|
345
|
+
in the spec for a single request.
|
346
|
+
:type _headers: dict, optional
|
347
|
+
:param _host_index: set to override the host_index for a single
|
348
|
+
request; this effectively ignores the host_index
|
349
|
+
in the spec for a single request.
|
350
|
+
:type _host_index: int, optional
|
351
|
+
:return: Returns the result object.
|
352
|
+
""" # noqa: E501
|
353
|
+
|
354
|
+
_param = self._categories_retrieve_serialize(
|
355
|
+
id=id,
|
356
|
+
_request_auth=_request_auth,
|
357
|
+
_content_type=_content_type,
|
358
|
+
_headers=_headers,
|
359
|
+
_host_index=_host_index
|
360
|
+
)
|
361
|
+
|
362
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
363
|
+
'200': "Category",
|
364
|
+
'404': "GlobalErrorResponse",
|
365
|
+
}
|
366
|
+
response_data = self.api_client.call_api(
|
367
|
+
*_param,
|
368
|
+
_request_timeout=_request_timeout
|
369
|
+
)
|
370
|
+
response_data.read()
|
371
|
+
return self.api_client.response_deserialize(
|
372
|
+
response_data=response_data,
|
373
|
+
response_types_map=_response_types_map,
|
374
|
+
).data
|
375
|
+
|
376
|
+
|
377
|
+
@validate_call
|
378
|
+
def categories_retrieve_with_http_info(
|
379
|
+
self,
|
380
|
+
id: Annotated[StrictStr, Field(description="category primary identifier")],
|
381
|
+
_request_timeout: Union[
|
382
|
+
None,
|
383
|
+
Annotated[StrictFloat, Field(gt=0)],
|
384
|
+
Tuple[
|
385
|
+
Annotated[StrictFloat, Field(gt=0)],
|
386
|
+
Annotated[StrictFloat, Field(gt=0)]
|
387
|
+
]
|
388
|
+
] = None,
|
389
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
390
|
+
_content_type: Optional[StrictStr] = None,
|
391
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
392
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
393
|
+
) -> ApiResponse[Category]:
|
394
|
+
"""Retrieve
|
395
|
+
|
396
|
+
Recovers the category resource by its id
|
397
|
+
|
398
|
+
:param id: category primary identifier (required)
|
399
|
+
:type id: str
|
400
|
+
:param _request_timeout: timeout setting for this request. If one
|
401
|
+
number provided, it will be total request
|
402
|
+
timeout. It can also be a pair (tuple) of
|
403
|
+
(connection, read) timeouts.
|
404
|
+
:type _request_timeout: int, tuple(int, int), optional
|
405
|
+
:param _request_auth: set to override the auth_settings for an a single
|
406
|
+
request; this effectively ignores the
|
407
|
+
authentication in the spec for a single request.
|
408
|
+
:type _request_auth: dict, optional
|
409
|
+
:param _content_type: force content-type for the request.
|
410
|
+
:type _content_type: str, Optional
|
411
|
+
:param _headers: set to override the headers for a single
|
412
|
+
request; this effectively ignores the headers
|
413
|
+
in the spec for a single request.
|
414
|
+
:type _headers: dict, optional
|
415
|
+
:param _host_index: set to override the host_index for a single
|
416
|
+
request; this effectively ignores the host_index
|
417
|
+
in the spec for a single request.
|
418
|
+
:type _host_index: int, optional
|
419
|
+
:return: Returns the result object.
|
420
|
+
""" # noqa: E501
|
421
|
+
|
422
|
+
_param = self._categories_retrieve_serialize(
|
423
|
+
id=id,
|
424
|
+
_request_auth=_request_auth,
|
425
|
+
_content_type=_content_type,
|
426
|
+
_headers=_headers,
|
427
|
+
_host_index=_host_index
|
428
|
+
)
|
429
|
+
|
430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
431
|
+
'200': "Category",
|
432
|
+
'404': "GlobalErrorResponse",
|
433
|
+
}
|
434
|
+
response_data = self.api_client.call_api(
|
435
|
+
*_param,
|
436
|
+
_request_timeout=_request_timeout
|
437
|
+
)
|
438
|
+
response_data.read()
|
439
|
+
return self.api_client.response_deserialize(
|
440
|
+
response_data=response_data,
|
441
|
+
response_types_map=_response_types_map,
|
442
|
+
)
|
443
|
+
|
444
|
+
|
445
|
+
@validate_call
|
446
|
+
def categories_retrieve_without_preload_content(
|
447
|
+
self,
|
448
|
+
id: Annotated[StrictStr, Field(description="category primary identifier")],
|
449
|
+
_request_timeout: Union[
|
450
|
+
None,
|
451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
452
|
+
Tuple[
|
453
|
+
Annotated[StrictFloat, Field(gt=0)],
|
454
|
+
Annotated[StrictFloat, Field(gt=0)]
|
455
|
+
]
|
456
|
+
] = None,
|
457
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
458
|
+
_content_type: Optional[StrictStr] = None,
|
459
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
460
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
461
|
+
) -> RESTResponseType:
|
462
|
+
"""Retrieve
|
463
|
+
|
464
|
+
Recovers the category resource by its id
|
465
|
+
|
466
|
+
:param id: category primary identifier (required)
|
467
|
+
:type id: str
|
468
|
+
:param _request_timeout: timeout setting for this request. If one
|
469
|
+
number provided, it will be total request
|
470
|
+
timeout. It can also be a pair (tuple) of
|
471
|
+
(connection, read) timeouts.
|
472
|
+
:type _request_timeout: int, tuple(int, int), optional
|
473
|
+
:param _request_auth: set to override the auth_settings for an a single
|
474
|
+
request; this effectively ignores the
|
475
|
+
authentication in the spec for a single request.
|
476
|
+
:type _request_auth: dict, optional
|
477
|
+
:param _content_type: force content-type for the request.
|
478
|
+
:type _content_type: str, Optional
|
479
|
+
:param _headers: set to override the headers for a single
|
480
|
+
request; this effectively ignores the headers
|
481
|
+
in the spec for a single request.
|
482
|
+
:type _headers: dict, optional
|
483
|
+
:param _host_index: set to override the host_index for a single
|
484
|
+
request; this effectively ignores the host_index
|
485
|
+
in the spec for a single request.
|
486
|
+
:type _host_index: int, optional
|
487
|
+
:return: Returns the result object.
|
488
|
+
""" # noqa: E501
|
489
|
+
|
490
|
+
_param = self._categories_retrieve_serialize(
|
491
|
+
id=id,
|
492
|
+
_request_auth=_request_auth,
|
493
|
+
_content_type=_content_type,
|
494
|
+
_headers=_headers,
|
495
|
+
_host_index=_host_index
|
496
|
+
)
|
497
|
+
|
498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
499
|
+
'200': "Category",
|
500
|
+
'404': "GlobalErrorResponse",
|
501
|
+
}
|
502
|
+
response_data = self.api_client.call_api(
|
503
|
+
*_param,
|
504
|
+
_request_timeout=_request_timeout
|
505
|
+
)
|
506
|
+
return response_data.response
|
507
|
+
|
508
|
+
|
509
|
+
def _categories_retrieve_serialize(
|
510
|
+
self,
|
511
|
+
id,
|
512
|
+
_request_auth,
|
513
|
+
_content_type,
|
514
|
+
_headers,
|
515
|
+
_host_index,
|
516
|
+
) -> RequestSerialized:
|
517
|
+
|
518
|
+
_host = None
|
519
|
+
|
520
|
+
_collection_formats: Dict[str, str] = {
|
521
|
+
}
|
522
|
+
|
523
|
+
_path_params: Dict[str, str] = {}
|
524
|
+
_query_params: List[Tuple[str, str]] = []
|
525
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
526
|
+
_form_params: List[Tuple[str, str]] = []
|
527
|
+
_files: Dict[
|
528
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
529
|
+
] = {}
|
530
|
+
_body_params: Optional[bytes] = None
|
531
|
+
|
532
|
+
# process the path parameters
|
533
|
+
if id is not None:
|
534
|
+
_path_params['id'] = id
|
535
|
+
# process the query parameters
|
536
|
+
# process the header parameters
|
537
|
+
# process the form parameters
|
538
|
+
# process the body parameter
|
539
|
+
|
540
|
+
|
541
|
+
# set the HTTP header `Accept`
|
542
|
+
if 'Accept' not in _header_params:
|
543
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
544
|
+
[
|
545
|
+
'application/json'
|
546
|
+
]
|
547
|
+
)
|
548
|
+
|
549
|
+
|
550
|
+
# authentication setting
|
551
|
+
_auth_settings: List[str] = [
|
552
|
+
'default'
|
553
|
+
]
|
554
|
+
|
555
|
+
return self.api_client.param_serialize(
|
556
|
+
method='GET',
|
557
|
+
resource_path='/categories/{id}',
|
558
|
+
path_params=_path_params,
|
559
|
+
query_params=_query_params,
|
560
|
+
header_params=_header_params,
|
561
|
+
body=_body_params,
|
562
|
+
post_params=_form_params,
|
563
|
+
files=_files,
|
564
|
+
auth_settings=_auth_settings,
|
565
|
+
collection_formats=_collection_formats,
|
566
|
+
_host=_host,
|
567
|
+
_request_auth=_request_auth
|
568
|
+
)
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
@validate_call
|
574
|
+
def client_category_rules_create(
|
575
|
+
self,
|
576
|
+
create_client_category_rule: CreateClientCategoryRule,
|
577
|
+
_request_timeout: Union[
|
578
|
+
None,
|
579
|
+
Annotated[StrictFloat, Field(gt=0)],
|
580
|
+
Tuple[
|
581
|
+
Annotated[StrictFloat, Field(gt=0)],
|
582
|
+
Annotated[StrictFloat, Field(gt=0)]
|
583
|
+
]
|
584
|
+
] = None,
|
585
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
586
|
+
_content_type: Optional[StrictStr] = None,
|
587
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
588
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
589
|
+
) -> ClientCategoryRule:
|
590
|
+
"""Create Category Rule
|
591
|
+
|
592
|
+
Create a single category rule
|
593
|
+
|
594
|
+
:param create_client_category_rule: (required)
|
595
|
+
:type create_client_category_rule: CreateClientCategoryRule
|
596
|
+
:param _request_timeout: timeout setting for this request. If one
|
597
|
+
number provided, it will be total request
|
598
|
+
timeout. It can also be a pair (tuple) of
|
599
|
+
(connection, read) timeouts.
|
600
|
+
:type _request_timeout: int, tuple(int, int), optional
|
601
|
+
:param _request_auth: set to override the auth_settings for an a single
|
602
|
+
request; this effectively ignores the
|
603
|
+
authentication in the spec for a single request.
|
604
|
+
:type _request_auth: dict, optional
|
605
|
+
:param _content_type: force content-type for the request.
|
606
|
+
:type _content_type: str, Optional
|
607
|
+
:param _headers: set to override the headers for a single
|
608
|
+
request; this effectively ignores the headers
|
609
|
+
in the spec for a single request.
|
610
|
+
:type _headers: dict, optional
|
611
|
+
:param _host_index: set to override the host_index for a single
|
612
|
+
request; this effectively ignores the host_index
|
613
|
+
in the spec for a single request.
|
614
|
+
:type _host_index: int, optional
|
615
|
+
:return: Returns the result object.
|
616
|
+
""" # noqa: E501
|
617
|
+
|
618
|
+
_param = self._client_category_rules_create_serialize(
|
619
|
+
create_client_category_rule=create_client_category_rule,
|
620
|
+
_request_auth=_request_auth,
|
621
|
+
_content_type=_content_type,
|
622
|
+
_headers=_headers,
|
623
|
+
_host_index=_host_index
|
624
|
+
)
|
625
|
+
|
626
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
627
|
+
'200': "ClientCategoryRule",
|
628
|
+
'404': "GlobalErrorResponse",
|
629
|
+
'400': "GlobalErrorResponse",
|
630
|
+
}
|
631
|
+
response_data = self.api_client.call_api(
|
632
|
+
*_param,
|
633
|
+
_request_timeout=_request_timeout
|
634
|
+
)
|
635
|
+
response_data.read()
|
636
|
+
return self.api_client.response_deserialize(
|
637
|
+
response_data=response_data,
|
638
|
+
response_types_map=_response_types_map,
|
639
|
+
).data
|
640
|
+
|
641
|
+
|
642
|
+
@validate_call
|
643
|
+
def client_category_rules_create_with_http_info(
|
644
|
+
self,
|
645
|
+
create_client_category_rule: CreateClientCategoryRule,
|
646
|
+
_request_timeout: Union[
|
647
|
+
None,
|
648
|
+
Annotated[StrictFloat, Field(gt=0)],
|
649
|
+
Tuple[
|
650
|
+
Annotated[StrictFloat, Field(gt=0)],
|
651
|
+
Annotated[StrictFloat, Field(gt=0)]
|
652
|
+
]
|
653
|
+
] = None,
|
654
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
655
|
+
_content_type: Optional[StrictStr] = None,
|
656
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
657
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
658
|
+
) -> ApiResponse[ClientCategoryRule]:
|
659
|
+
"""Create Category Rule
|
660
|
+
|
661
|
+
Create a single category rule
|
662
|
+
|
663
|
+
:param create_client_category_rule: (required)
|
664
|
+
:type create_client_category_rule: CreateClientCategoryRule
|
665
|
+
:param _request_timeout: timeout setting for this request. If one
|
666
|
+
number provided, it will be total request
|
667
|
+
timeout. It can also be a pair (tuple) of
|
668
|
+
(connection, read) timeouts.
|
669
|
+
:type _request_timeout: int, tuple(int, int), optional
|
670
|
+
:param _request_auth: set to override the auth_settings for an a single
|
671
|
+
request; this effectively ignores the
|
672
|
+
authentication in the spec for a single request.
|
673
|
+
:type _request_auth: dict, optional
|
674
|
+
:param _content_type: force content-type for the request.
|
675
|
+
:type _content_type: str, Optional
|
676
|
+
:param _headers: set to override the headers for a single
|
677
|
+
request; this effectively ignores the headers
|
678
|
+
in the spec for a single request.
|
679
|
+
:type _headers: dict, optional
|
680
|
+
:param _host_index: set to override the host_index for a single
|
681
|
+
request; this effectively ignores the host_index
|
682
|
+
in the spec for a single request.
|
683
|
+
:type _host_index: int, optional
|
684
|
+
:return: Returns the result object.
|
685
|
+
""" # noqa: E501
|
686
|
+
|
687
|
+
_param = self._client_category_rules_create_serialize(
|
688
|
+
create_client_category_rule=create_client_category_rule,
|
689
|
+
_request_auth=_request_auth,
|
690
|
+
_content_type=_content_type,
|
691
|
+
_headers=_headers,
|
692
|
+
_host_index=_host_index
|
693
|
+
)
|
694
|
+
|
695
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
696
|
+
'200': "ClientCategoryRule",
|
697
|
+
'404': "GlobalErrorResponse",
|
698
|
+
'400': "GlobalErrorResponse",
|
699
|
+
}
|
700
|
+
response_data = self.api_client.call_api(
|
701
|
+
*_param,
|
702
|
+
_request_timeout=_request_timeout
|
703
|
+
)
|
704
|
+
response_data.read()
|
705
|
+
return self.api_client.response_deserialize(
|
706
|
+
response_data=response_data,
|
707
|
+
response_types_map=_response_types_map,
|
708
|
+
)
|
709
|
+
|
710
|
+
|
711
|
+
@validate_call
|
712
|
+
def client_category_rules_create_without_preload_content(
|
713
|
+
self,
|
714
|
+
create_client_category_rule: CreateClientCategoryRule,
|
715
|
+
_request_timeout: Union[
|
716
|
+
None,
|
717
|
+
Annotated[StrictFloat, Field(gt=0)],
|
718
|
+
Tuple[
|
719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
720
|
+
Annotated[StrictFloat, Field(gt=0)]
|
721
|
+
]
|
722
|
+
] = None,
|
723
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
724
|
+
_content_type: Optional[StrictStr] = None,
|
725
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
726
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
727
|
+
) -> RESTResponseType:
|
728
|
+
"""Create Category Rule
|
729
|
+
|
730
|
+
Create a single category rule
|
731
|
+
|
732
|
+
:param create_client_category_rule: (required)
|
733
|
+
:type create_client_category_rule: CreateClientCategoryRule
|
734
|
+
:param _request_timeout: timeout setting for this request. If one
|
735
|
+
number provided, it will be total request
|
736
|
+
timeout. It can also be a pair (tuple) of
|
737
|
+
(connection, read) timeouts.
|
738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
740
|
+
request; this effectively ignores the
|
741
|
+
authentication in the spec for a single request.
|
742
|
+
:type _request_auth: dict, optional
|
743
|
+
:param _content_type: force content-type for the request.
|
744
|
+
:type _content_type: str, Optional
|
745
|
+
:param _headers: set to override the headers for a single
|
746
|
+
request; this effectively ignores the headers
|
747
|
+
in the spec for a single request.
|
748
|
+
:type _headers: dict, optional
|
749
|
+
:param _host_index: set to override the host_index for a single
|
750
|
+
request; this effectively ignores the host_index
|
751
|
+
in the spec for a single request.
|
752
|
+
:type _host_index: int, optional
|
753
|
+
:return: Returns the result object.
|
754
|
+
""" # noqa: E501
|
755
|
+
|
756
|
+
_param = self._client_category_rules_create_serialize(
|
757
|
+
create_client_category_rule=create_client_category_rule,
|
758
|
+
_request_auth=_request_auth,
|
759
|
+
_content_type=_content_type,
|
760
|
+
_headers=_headers,
|
761
|
+
_host_index=_host_index
|
762
|
+
)
|
763
|
+
|
764
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
765
|
+
'200': "ClientCategoryRule",
|
766
|
+
'404': "GlobalErrorResponse",
|
767
|
+
'400': "GlobalErrorResponse",
|
768
|
+
}
|
769
|
+
response_data = self.api_client.call_api(
|
770
|
+
*_param,
|
771
|
+
_request_timeout=_request_timeout
|
772
|
+
)
|
773
|
+
return response_data.response
|
774
|
+
|
775
|
+
|
776
|
+
def _client_category_rules_create_serialize(
|
777
|
+
self,
|
778
|
+
create_client_category_rule,
|
779
|
+
_request_auth,
|
780
|
+
_content_type,
|
781
|
+
_headers,
|
782
|
+
_host_index,
|
783
|
+
) -> RequestSerialized:
|
784
|
+
|
785
|
+
_host = None
|
786
|
+
|
787
|
+
_collection_formats: Dict[str, str] = {
|
788
|
+
}
|
789
|
+
|
790
|
+
_path_params: Dict[str, str] = {}
|
791
|
+
_query_params: List[Tuple[str, str]] = []
|
792
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
793
|
+
_form_params: List[Tuple[str, str]] = []
|
794
|
+
_files: Dict[
|
795
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
796
|
+
] = {}
|
797
|
+
_body_params: Optional[bytes] = None
|
798
|
+
|
799
|
+
# process the path parameters
|
800
|
+
# process the query parameters
|
801
|
+
# process the header parameters
|
802
|
+
# process the form parameters
|
803
|
+
# process the body parameter
|
804
|
+
if create_client_category_rule is not None:
|
805
|
+
_body_params = create_client_category_rule
|
806
|
+
|
807
|
+
|
808
|
+
# set the HTTP header `Accept`
|
809
|
+
if 'Accept' not in _header_params:
|
810
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
811
|
+
[
|
812
|
+
'application/json'
|
813
|
+
]
|
814
|
+
)
|
815
|
+
|
816
|
+
# set the HTTP header `Content-Type`
|
817
|
+
if _content_type:
|
818
|
+
_header_params['Content-Type'] = _content_type
|
819
|
+
else:
|
820
|
+
_default_content_type = (
|
821
|
+
self.api_client.select_header_content_type(
|
822
|
+
[
|
823
|
+
'application/json'
|
824
|
+
]
|
825
|
+
)
|
826
|
+
)
|
827
|
+
if _default_content_type is not None:
|
828
|
+
_header_params['Content-Type'] = _default_content_type
|
829
|
+
|
830
|
+
# authentication setting
|
831
|
+
_auth_settings: List[str] = [
|
832
|
+
'default'
|
833
|
+
]
|
834
|
+
|
835
|
+
return self.api_client.param_serialize(
|
836
|
+
method='POST',
|
837
|
+
resource_path='/categories/rules',
|
838
|
+
path_params=_path_params,
|
839
|
+
query_params=_query_params,
|
840
|
+
header_params=_header_params,
|
841
|
+
body=_body_params,
|
842
|
+
post_params=_form_params,
|
843
|
+
files=_files,
|
844
|
+
auth_settings=_auth_settings,
|
845
|
+
collection_formats=_collection_formats,
|
846
|
+
_host=_host,
|
847
|
+
_request_auth=_request_auth
|
848
|
+
)
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
@validate_call
|
854
|
+
def client_category_rules_list(
|
855
|
+
self,
|
856
|
+
_request_timeout: Union[
|
857
|
+
None,
|
858
|
+
Annotated[StrictFloat, Field(gt=0)],
|
859
|
+
Tuple[
|
860
|
+
Annotated[StrictFloat, Field(gt=0)],
|
861
|
+
Annotated[StrictFloat, Field(gt=0)]
|
862
|
+
]
|
863
|
+
] = None,
|
864
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
865
|
+
_content_type: Optional[StrictStr] = None,
|
866
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
867
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
868
|
+
) -> List[PageResponseCategoryRules]:
|
869
|
+
"""List Category Rules
|
870
|
+
|
871
|
+
Recovers category rules
|
872
|
+
|
873
|
+
:param _request_timeout: timeout setting for this request. If one
|
874
|
+
number provided, it will be total request
|
875
|
+
timeout. It can also be a pair (tuple) of
|
876
|
+
(connection, read) timeouts.
|
877
|
+
:type _request_timeout: int, tuple(int, int), optional
|
878
|
+
:param _request_auth: set to override the auth_settings for an a single
|
879
|
+
request; this effectively ignores the
|
880
|
+
authentication in the spec for a single request.
|
881
|
+
:type _request_auth: dict, optional
|
882
|
+
:param _content_type: force content-type for the request.
|
883
|
+
:type _content_type: str, Optional
|
884
|
+
:param _headers: set to override the headers for a single
|
885
|
+
request; this effectively ignores the headers
|
886
|
+
in the spec for a single request.
|
887
|
+
:type _headers: dict, optional
|
888
|
+
:param _host_index: set to override the host_index for a single
|
889
|
+
request; this effectively ignores the host_index
|
890
|
+
in the spec for a single request.
|
891
|
+
:type _host_index: int, optional
|
892
|
+
:return: Returns the result object.
|
893
|
+
""" # noqa: E501
|
894
|
+
|
895
|
+
_param = self._client_category_rules_list_serialize(
|
896
|
+
_request_auth=_request_auth,
|
897
|
+
_content_type=_content_type,
|
898
|
+
_headers=_headers,
|
899
|
+
_host_index=_host_index
|
900
|
+
)
|
901
|
+
|
902
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
903
|
+
'200': "List[PageResponseCategoryRules]",
|
904
|
+
}
|
905
|
+
response_data = self.api_client.call_api(
|
906
|
+
*_param,
|
907
|
+
_request_timeout=_request_timeout
|
908
|
+
)
|
909
|
+
response_data.read()
|
910
|
+
return self.api_client.response_deserialize(
|
911
|
+
response_data=response_data,
|
912
|
+
response_types_map=_response_types_map,
|
913
|
+
).data
|
914
|
+
|
915
|
+
|
916
|
+
@validate_call
|
917
|
+
def client_category_rules_list_with_http_info(
|
918
|
+
self,
|
919
|
+
_request_timeout: Union[
|
920
|
+
None,
|
921
|
+
Annotated[StrictFloat, Field(gt=0)],
|
922
|
+
Tuple[
|
923
|
+
Annotated[StrictFloat, Field(gt=0)],
|
924
|
+
Annotated[StrictFloat, Field(gt=0)]
|
925
|
+
]
|
926
|
+
] = None,
|
927
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
928
|
+
_content_type: Optional[StrictStr] = None,
|
929
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
930
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
931
|
+
) -> ApiResponse[List[PageResponseCategoryRules]]:
|
932
|
+
"""List Category Rules
|
933
|
+
|
934
|
+
Recovers category rules
|
935
|
+
|
936
|
+
:param _request_timeout: timeout setting for this request. If one
|
937
|
+
number provided, it will be total request
|
938
|
+
timeout. It can also be a pair (tuple) of
|
939
|
+
(connection, read) timeouts.
|
940
|
+
:type _request_timeout: int, tuple(int, int), optional
|
941
|
+
:param _request_auth: set to override the auth_settings for an a single
|
942
|
+
request; this effectively ignores the
|
943
|
+
authentication in the spec for a single request.
|
944
|
+
:type _request_auth: dict, optional
|
945
|
+
:param _content_type: force content-type for the request.
|
946
|
+
:type _content_type: str, Optional
|
947
|
+
:param _headers: set to override the headers for a single
|
948
|
+
request; this effectively ignores the headers
|
949
|
+
in the spec for a single request.
|
950
|
+
:type _headers: dict, optional
|
951
|
+
:param _host_index: set to override the host_index for a single
|
952
|
+
request; this effectively ignores the host_index
|
953
|
+
in the spec for a single request.
|
954
|
+
:type _host_index: int, optional
|
955
|
+
:return: Returns the result object.
|
956
|
+
""" # noqa: E501
|
957
|
+
|
958
|
+
_param = self._client_category_rules_list_serialize(
|
959
|
+
_request_auth=_request_auth,
|
960
|
+
_content_type=_content_type,
|
961
|
+
_headers=_headers,
|
962
|
+
_host_index=_host_index
|
963
|
+
)
|
964
|
+
|
965
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
966
|
+
'200': "List[PageResponseCategoryRules]",
|
967
|
+
}
|
968
|
+
response_data = self.api_client.call_api(
|
969
|
+
*_param,
|
970
|
+
_request_timeout=_request_timeout
|
971
|
+
)
|
972
|
+
response_data.read()
|
973
|
+
return self.api_client.response_deserialize(
|
974
|
+
response_data=response_data,
|
975
|
+
response_types_map=_response_types_map,
|
976
|
+
)
|
977
|
+
|
978
|
+
|
979
|
+
@validate_call
|
980
|
+
def client_category_rules_list_without_preload_content(
|
981
|
+
self,
|
982
|
+
_request_timeout: Union[
|
983
|
+
None,
|
984
|
+
Annotated[StrictFloat, Field(gt=0)],
|
985
|
+
Tuple[
|
986
|
+
Annotated[StrictFloat, Field(gt=0)],
|
987
|
+
Annotated[StrictFloat, Field(gt=0)]
|
988
|
+
]
|
989
|
+
] = None,
|
990
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
991
|
+
_content_type: Optional[StrictStr] = None,
|
992
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
993
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
994
|
+
) -> RESTResponseType:
|
995
|
+
"""List Category Rules
|
996
|
+
|
997
|
+
Recovers category rules
|
998
|
+
|
999
|
+
:param _request_timeout: timeout setting for this request. If one
|
1000
|
+
number provided, it will be total request
|
1001
|
+
timeout. It can also be a pair (tuple) of
|
1002
|
+
(connection, read) timeouts.
|
1003
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1004
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1005
|
+
request; this effectively ignores the
|
1006
|
+
authentication in the spec for a single request.
|
1007
|
+
:type _request_auth: dict, optional
|
1008
|
+
:param _content_type: force content-type for the request.
|
1009
|
+
:type _content_type: str, Optional
|
1010
|
+
:param _headers: set to override the headers for a single
|
1011
|
+
request; this effectively ignores the headers
|
1012
|
+
in the spec for a single request.
|
1013
|
+
:type _headers: dict, optional
|
1014
|
+
:param _host_index: set to override the host_index for a single
|
1015
|
+
request; this effectively ignores the host_index
|
1016
|
+
in the spec for a single request.
|
1017
|
+
:type _host_index: int, optional
|
1018
|
+
:return: Returns the result object.
|
1019
|
+
""" # noqa: E501
|
1020
|
+
|
1021
|
+
_param = self._client_category_rules_list_serialize(
|
1022
|
+
_request_auth=_request_auth,
|
1023
|
+
_content_type=_content_type,
|
1024
|
+
_headers=_headers,
|
1025
|
+
_host_index=_host_index
|
1026
|
+
)
|
1027
|
+
|
1028
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1029
|
+
'200': "List[PageResponseCategoryRules]",
|
1030
|
+
}
|
1031
|
+
response_data = self.api_client.call_api(
|
1032
|
+
*_param,
|
1033
|
+
_request_timeout=_request_timeout
|
1034
|
+
)
|
1035
|
+
return response_data.response
|
1036
|
+
|
1037
|
+
|
1038
|
+
def _client_category_rules_list_serialize(
|
1039
|
+
self,
|
1040
|
+
_request_auth,
|
1041
|
+
_content_type,
|
1042
|
+
_headers,
|
1043
|
+
_host_index,
|
1044
|
+
) -> RequestSerialized:
|
1045
|
+
|
1046
|
+
_host = None
|
1047
|
+
|
1048
|
+
_collection_formats: Dict[str, str] = {
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
_path_params: Dict[str, str] = {}
|
1052
|
+
_query_params: List[Tuple[str, str]] = []
|
1053
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1054
|
+
_form_params: List[Tuple[str, str]] = []
|
1055
|
+
_files: Dict[
|
1056
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1057
|
+
] = {}
|
1058
|
+
_body_params: Optional[bytes] = None
|
1059
|
+
|
1060
|
+
# process the path parameters
|
1061
|
+
# process the query parameters
|
1062
|
+
# process the header parameters
|
1063
|
+
# process the form parameters
|
1064
|
+
# process the body parameter
|
1065
|
+
|
1066
|
+
|
1067
|
+
# set the HTTP header `Accept`
|
1068
|
+
if 'Accept' not in _header_params:
|
1069
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1070
|
+
[
|
1071
|
+
'application/json'
|
1072
|
+
]
|
1073
|
+
)
|
1074
|
+
|
1075
|
+
|
1076
|
+
# authentication setting
|
1077
|
+
_auth_settings: List[str] = [
|
1078
|
+
'default'
|
1079
|
+
]
|
1080
|
+
|
1081
|
+
return self.api_client.param_serialize(
|
1082
|
+
method='GET',
|
1083
|
+
resource_path='/categories/rules',
|
1084
|
+
path_params=_path_params,
|
1085
|
+
query_params=_query_params,
|
1086
|
+
header_params=_header_params,
|
1087
|
+
body=_body_params,
|
1088
|
+
post_params=_form_params,
|
1089
|
+
files=_files,
|
1090
|
+
auth_settings=_auth_settings,
|
1091
|
+
collection_formats=_collection_formats,
|
1092
|
+
_host=_host,
|
1093
|
+
_request_auth=_request_auth
|
1094
|
+
)
|
1095
|
+
|
1096
|
+
|