### update_subscription_start_at Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Updates the start date of a subscription. ```APIDOC ## update_subscription_start_at ### Description Updates the start date of a subscription. ### Method PUT ### Endpoint /subscriptions/{subscription_id}/start-at ### Parameters #### Path Parameters - **subscription_id** (string) - Required - The subscription id #### Request Body - **body** (object) - Required - Request for updating the subscription start date - **start_at** (string) - Required - The new start date for the subscription #### Headers - **Idempotency-Key** (string) - Optional - Used to ensure idempotency of the request ### Request Example ```json { "start_at": "2023-02-01T00:00:00Z" } ``` ### Response #### Success Response (200) - **subscription** (object) - The updated subscription object #### Response Example ```json { "id": "subscription_id", "start_at": "2023-02-01T00:00:00Z" } ``` ### Errors - **400** - Invalid request - **401** - Invalid API key - **404** - An informed resource was not found - **412** - Business validation error - **422** - Contract validation error - **500** - Internal server error ``` -------------------------------- ### Update Subscription Start Date Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Updates the start date of a subscription. An optional idempotency key can be provided. ```python def update_subscription_start_at(self, subscription_id, body, idempotency_key=None) ``` ```python subscription_id = 'subscription_id' body = SubscriptionsStartAtRequest() idempotency_key = 'idempotency-key' result = subscriptions_controller.update_subscription_start_at(subscription_id, body, idempotency_key) ``` -------------------------------- ### Example Usage of get_token Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Demonstrates how to call the get_token method with the token ID and public key. The app_id is optional. ```python id = 'id' public_key = 'public_key' app_id = 'appId' result = tokens_controller.get_token(id, public_key, app_id) ``` -------------------------------- ### Get PlansController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the PlansController from the API client to manage plans. ```python plans_controller = client.plans ``` -------------------------------- ### Example Usage of create_token Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Demonstrates how to call the create_token method with required and optional parameters. Ensure the TokensRequest object is properly instantiated. ```python public_key = 'public_key' body = TokensRequest() idempotency_key = 'idempotency-key' app_id = 'appId' result = tokens_controller.create_token(public_key, body, idempotency_key, app_id) ``` -------------------------------- ### Get SubscriptionsController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the SubscriptionsController from the API client. ```python subscriptions_controller = client.subscriptions ``` -------------------------------- ### Get Order Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves the details of a specific order. Requires the order ID. ```python def get_order(self, order_id) ``` ```python order_id = 'order_id' result = orders_controller.get_order(order_id) ``` -------------------------------- ### Get Orders Controller Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves an instance of the OrdersController. This is the first step to interacting with order-related functionalities. ```python orders_controller = client.orders ``` -------------------------------- ### Get Customer Details Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve the details of a specific customer using their customer ID. ```python def get_customer(self, customer_id) ``` ```python customer_id = 'customer_id' result = customers_controller.get_customer(customer_id) ``` -------------------------------- ### Get InvoicesController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the InvoicesController from the API client to manage invoices. ```python invoices_controller = client.invoices ``` -------------------------------- ### Get Plan Item Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves details of a specific plan item. Requires the plan ID and the plan item ID. ```python def get_plan_item( self, plan_id, plan_item_id ) ``` ```python plan_id = 'plan_id' plan_item_id = 'plan_item_id' result = plans_controller.get_plan_item(plan_id, plan_item_id) ``` -------------------------------- ### get_plan_item Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Gets a plan item. Requires the plan ID and plan item ID. ```APIDOC ## get_plan_item ### Description Gets a plan item. ### Method GET ### Endpoint /plans/{plan_id}/items/{plan_item_id} ### Parameters #### Path Parameters - **plan_id** (string) - Required - Plan id - **plan_item_id** (string) - Required - Plan item id ### Request Example ```json { "plan_id": "plan_id", "plan_item_id": "plan_item_id" } ``` ### Response #### Success Response (200) - **Success fields** - Description of success response fields not specified in source. #### Response Example ```json { "example": "Success response example not specified in source." } ``` #### Errors - **400** - Invalid request - **401** - Invalid API key - **404** - An informed resource was not found - **412** - Business validation error - **422** - Contract validation error - **500** - Internal server error ``` -------------------------------- ### Get All Cards for a Customer Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves all cards associated with a specific customer. Supports pagination. ```python def get_cards(self, customer_id, page=None, size=None) ``` ```python customer_id = 'customer_id' page = 191 size = 191 result = customers_controller.get_cards(customer_id, page, size) ``` -------------------------------- ### Get Subscription Details Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves the details of a specific subscription. Requires the subscription ID. ```python def get_subscription(self, subscription_id) ``` ```python subscription_id = 'subscription_id' result = subscriptions_controller.get_subscription(subscription_id) ``` -------------------------------- ### Get CustomersController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the CustomersController from the API client to manage customer-related operations. ```python customers_controller = client.customers ``` -------------------------------- ### Get All Plans Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a paginated list of all plans with optional filtering by name, status, billing type, and creation date range. Ensure datetime objects are used for date filters. ```python def get_plans(self, page=None, size=None, name=None, status=None, billing_type=None, created_since=None, created_until=None) ``` ```python page = 233 size = 233 name = 'name' status = 'status' billing_type = 'billing_type' created_since = datetime.now() created_until = datetime.now() result = plans_controller.get_plans(page, size, name, status, billing_type, created_since, created_until) ``` -------------------------------- ### Get Subscription Cycles Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of cycles for a given subscription. Requires subscription ID, page number, and page size. ```python def get_subscription_cycles(self, subscription_id, page, size) ``` ```python subscription_id = 'subscription_id' page = 'page' size = 'size' result = subscriptions_controller.get_subscription_cycles(subscription_id, page, size) ``` -------------------------------- ### Get Subscription Item Usages Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Lists all usages for a specific subscription item. Optional parameters include page number, page size, and client-defined codes or groups. Can filter by usage time range. ```python def get_usages(self, subscription_id, item_id, page=None, size=None, code=None, group=None, used_since=None, used_until=None) ``` ```python subscription_id = 'subscription_id' item_id = 'item_id' page = 142 size = 142 code = 'code' group = 'group' used_since = datetime.now() used_until = datetime.now() result = subscriptions_controller.get_usages(subscription_id, item_id, page, size, code, group, used_since, used_until) ``` -------------------------------- ### Get Subscription Discounts Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Use this method to retrieve discounts for a specific subscription. You must provide the subscription ID, page number, and page size. ```python def get_discounts(self, subscription_id, page, size) ``` ```python subscription_id = 'subscription_id' page = 142 size = 142 result = subscriptions_controller.get_discounts(subscription_id, page, size) ``` -------------------------------- ### Get All Customers Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of all customers. Supports filtering by name, document, email, and code, as well as pagination. ```python def get_customers(self, name=None, document=None, page=1, size=10, email=None, code=None) ``` ```python name = 'name' document = 'document' page = 1 size = 10 email = 'email' code = 'Code' result = customers_controller.get_customers(name, document, page, size, email, code) ``` -------------------------------- ### Get TokensController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the TokensController from the API client to interact with token-related functionalities. ```python tokens_controller = client.tokens ``` -------------------------------- ### Get Customer Addresses Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves all addresses associated with a customer. Supports pagination with optional page and size parameters. ```python def get_addresses(self, customer_id, page=None, size=None) ``` ```python customer_id = 'customer_id' page = 191 size = 191 result = customers_controller.get_addresses(customer_id, page, size) ``` -------------------------------- ### Get ChargesController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the ChargesController from the API client to interact with charge-related functionalities. ```python charges_controller = client.charges ``` -------------------------------- ### Get Customer Address Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a specific customer's address. Requires customer and address IDs. ```python def get_address(self, customer_id, address_id) ``` ```python customer_id = 'customer_id' address_id = 'address_id' result = customers_controller.get_address(customer_id, address_id) ``` -------------------------------- ### Get Usage Report for Subscription Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Fetches the usage report for a subscription for a specified period. Requires both subscription ID and period ID. ```python def get_usage_report(self, subscription_id, period_id) ``` ```python subscription_id = 'subscription_id' period_id = 'period_id' result = subscriptions_controller.get_usage_report(subscription_id, period_id) ``` -------------------------------- ### Get Transfers Controller Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the TransfersController from the API client. This is the entry point for transfer-related operations. ```python transfers_controller = client.transfers ``` -------------------------------- ### Get Specific Plan by ID Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a single plan by its unique identifier. The plan ID is a required parameter. ```python def get_plan(self, plan_id) ``` ```python plan_id = 'plan_id' result = plans_controller.get_plan(plan_id) ``` -------------------------------- ### Get Subscription Items Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve a list of items associated with a subscription. Optional parameters allow for pagination and filtering by various attributes. ```python def get_subscription_items(self, subscription_id, page=None, size=None, name=None, code=None, status=None, description=None, created_since=None, created_until=None) ``` ```python subscription_id = 'subscription_id' page = 142 size = 142 name = 'name' code = 'code' status = 'status' description = 'description' created_since = 'created_since' created_until = 'created_until' result = subscriptions_controller.get_subscription_items(subscription_id, page, size, name, code, status, description, created_since, created_until) ``` -------------------------------- ### Get Subscription Usage Details Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves detailed usage information for a specific subscription. Optional parameters allow for filtering by cycle, pagination, and item. ```python def get_usages_details(self, subscription_id, cycle_id=None, size=None, page=None, item_id=None, group=None) ``` ```python subscription_id = 'subscription_id' cycle_id = 'cycle_id' size = 142 page = 142 item_id = 'item_id' group = 'group' result = subscriptions_controller.get_usages_details(subscription_id, cycle_id, size, page, item_id, group) ``` -------------------------------- ### Get All Subscriptions Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of all subscriptions. Supports extensive filtering by page, size, code, billing type, customer ID, plan ID, card ID, status, and date ranges for next billing and creation dates. Use datetime objects for date filters. ```python def get_subscriptions(self, page=None, size=None, code=None, billing_type=None, customer_id=None, plan_id=None, card_id=None, status=None, next_billing_since=None, next_billing_until=None, created_since=None, created_until=None) ``` ```python page = 142 size = 142 code = 'code' billing_type = 'billing_type' customer_id = 'customer_id' plan_id = 'plan_id' card_id = 'card_id' status = 'status' next_billing_since = datetime.now() next_billing_until = datetime.now() created_since = datetime.now() created_until = datetime.now() result = subscriptions_controller.get_subscriptions(page, size, code, billing_type, customer_id, plan_id, card_id, status, next_billing_since, next_billing_until, created_since, created_until) ``` -------------------------------- ### Get Transactions Controller Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the TransactionsController from the API client. This is the entry point for transaction-related operations. ```python transactions_controller = client.transactions ``` -------------------------------- ### Get Discount by ID for Subscription Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a specific discount associated with a subscription using its ID. Requires both subscription ID and discount ID. ```python def get_discount_by_id(self, subscription_id, discount_id) ``` ```python subscription_id = 'subscription_id' discount_id = 'discountId' result = subscriptions_controller.get_discount_by_id(subscription_id, discount_id) ``` -------------------------------- ### Get Recipient Anticipation Limits Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves the anticipation limits for a recipient based on a specified timeframe and payment date. ```python def get_anticipation_limits(self, recipient_id, timeframe, payment_date) ``` ```python recipient_id = 'recipient_id' timeframe = 'timeframe' payment_date = datetime.now() result = recipients_controller.get_anticipation_limits(recipient_id, timeframe, payment_date) ``` -------------------------------- ### Get All Access Tokens for a Customer Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve all access tokens associated with a customer. Pagination parameters (page and size) can be specified to control the results. ```python def get_access_tokens(self, customer_id, page=None, size=None) ``` ```python customer_id = 'customer_id' page = 191 size = 191 result = customers_controller.get_access_tokens(customer_id, page, size) ``` -------------------------------- ### Get Anticipation Details Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves the details of a specific anticipation for a recipient. Requires both the recipient ID and the anticipation ID. ```python def get_anticipation(self, recipient_id, anticipation_id) ``` ```python recipient_id = 'recipient_id' anticipation_id = 'anticipation_id' result = recipients_controller.get_anticipation(recipient_id, anticipation_id) ``` -------------------------------- ### Get Charges Summary Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a summary of charges based on status and date range. Ensure datetime objects are used for date parameters. ```python def get_charges_summary(self, status, created_since=None, created_until=None) ``` ```python status = 'status' created_since = datetime.now() created_until = datetime.now() result = charges_controller.get_charges_summary(status, created_since, created_until) ``` -------------------------------- ### Get Customer Access Token Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a specific access token for a customer using both customer ID and token ID. ```python def get_access_token(self, customer_id, token_id) ``` ```python customer_id = 'customer_id' token_id = 'token_id' result = customers_controller.get_access_token(customer_id, token_id) ``` -------------------------------- ### Get Subscription Cycle by ID Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a specific subscription cycle using its ID. Requires both subscription and cycle IDs. ```python def get_subscription_cycle_by_id(self, subscription_id, cycle_id) ``` ```python subscription_id = 'subscription_id' cycle_id = 'cycleId' result = subscriptions_controller.get_subscription_cycle_by_id(subscription_id, cycle_id) ``` -------------------------------- ### Get All Orders in Python Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve a list of all orders. This method supports pagination and filtering by various criteria such as status, creation date, and customer ID. ```python def get_orders(self, page=None, size=None, code=None, status=None, created_since=None, created_until=None, customer_id=None) ``` ```python page = 233 size = 233 code = 'code' status = 'status' created_since = datetime.now() created_until = datetime.now() customer_id = 'customer_id' result = orders_controller.get_orders(page, size, code, status, created_since, created_until, customer_id) ``` -------------------------------- ### Initialize Mundiapi Client with Authentication Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Initialize the Mundiapi client with service referer name and basic authentication credentials. Ensure these parameters are correctly set for authentication. ```Python # Configuration parameters and credentials service_referer_name = 'service_referer_name' basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication basic_auth_password = 'basic_auth_password' # The password to use with basic authentication client = MundiapiClient(service_referer_name, basic_auth_user_name, basic_auth_password) ``` -------------------------------- ### Import Mundiapi Client Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Import the necessary client class from the generated Python library. This is the first step to using the SDK in your project. ```Python from mundiapi.mundiapi_client import MundiapiClient ``` -------------------------------- ### Get Invoices Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of all invoices with optional filtering by page, size, code, customer ID, subscription ID, creation date range, status, due date range, and customer document. ```python def get_invoices(self, page=None, size=None, code=None, customer_id=None, subscription_id=None, created_since=None, created_until=None, status=None, due_since=None, due_until=None, customer_document=None) ``` ```python page = 191 size = 191 code = 'code' customer_id = 'customer_id' subscription_id = 'subscription_id' created_since = datetime.now() created_until = datetime.now() status = 'status' due_since = datetime.now() due_until = datetime.now() customer_document = 'customer_document' result = invoices_controller.get_invoices(page, size, code, customer_id, subscription_id, created_since, created_until, status, due_since, due_until, customer_document) ``` -------------------------------- ### create_plan Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new plan with the provided details and an optional idempotency key. ```APIDOC ## create_plan ### Description Creates a new plan. ### Method POST ### Endpoint /plans ### Parameters #### Request Body - **body** (PlansRequest) - Required - Request for creating a plan - **idempotencyKey** (string) - Optional - Idempotency key for the request ### Request Example ```python plans_controller.create_plan(body=PlansRequest(), idempotency_key='idempotency-key') ``` ### Response #### Success Response (201) - **plan** (object) - The created plan details #### Response Example ```json { "id": "string", "name": "string", "description": "string", "billing_type": "string", "status": "string", "created_at": "string", "updated_at": "string" } ``` ### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### Get All Transfers Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve a list of all transfers associated with the account. This method does not require any parameters. ```python def get_transfers_1(self) ``` ```python result = transfers_controller.get_transfers_1() ``` -------------------------------- ### Create Discount for Subscription Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Use this method to create a discount for a specific subscription. Ensure the subscription ID and discount request body are provided. ```python def create_discount(self, subscription_id, body, idempotency_key=None) ``` ```python subscription_id = 'subscription_id' body = SubscriptionsDiscountsRequest() idempotency_key = 'idempotency-key' result = subscriptions_controller.create_discount(subscription_id, body, idempotency_key) ``` -------------------------------- ### .RecipientsController.get_anticipation_limits Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Gets the anticipation limits for a recipient based on a specified timeframe and payment date. ```APIDOC ## GET /recipients/{recipientId}/anticipation-limits ### Description Gets the anticipation limits for a recipient. ### Method GET ### Endpoint /recipients/{recipientId}/anticipation-limits ### Parameters #### Path Parameters - **recipientId** (string) - Required - Recipient id #### Query Parameters - **timeframe** (string) - Required - Timeframe - **paymentDate** (datetime) - Required - Anticipation payment date ### Response #### Success Response (200) - **limits** (array) - List of anticipation limits #### Response Example { "limits": [ { "date": "2023-10-27", "amount": 5000, "currency": "BRL" } ] } #### Error Handling - 400: Invalid request - 401: Invalid API key - 404: An informed resource was not found - 412: Business validation error - 422: Contract validation error - 500: Internal server error ``` -------------------------------- ### Create New Plan Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new plan using the provided request body. An optional idempotency key can be supplied to prevent duplicate requests. ```python def create_plan(self, body, idempotency_key=None) ``` ```python body = PlansRequest() idempotency_key = 'idempotency-key' result = plans_controller.create_plan(body, idempotency_key) ``` -------------------------------- ### Get Charge Transactions Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of transactions for a specific charge. Supports pagination. ```python def get_charge_transactions(self, charge_id, page=None, size=None) ``` ```python charge_id = 'charge_id' page = 28 size = 28 result = charges_controller.get_charge_transactions(charge_id, page, size) ``` -------------------------------- ### Create Access Token for Customer Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Use this method to create an access token for a specific customer. Ensure the customer ID and request body are provided. An idempotency key is optional but recommended for preventing duplicate requests. ```python def create_access_token(self, customer_id, body, idempotency_key=None) ``` ```python customer_id = 'customer_id' body = CustomersAccessTokensRequest() idempotency_key = 'idempotency-key' result = customers_controller.create_access_token(customer_id, body, idempotency_key) ``` -------------------------------- ### Create a New Customer Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new customer with the provided request body. An idempotency key can be used to ensure the request is processed only once. ```python def create_customer(self, body, idempotency_key=None) ``` ```python body = CustomersRequest1() idempotency_key = 'idempotency-key' result = customers_controller.create_customer(body, idempotency_key) ``` -------------------------------- ### Create Subscription Usage Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a usage record for a subscription item. Requires subscription ID, item ID, and an optional idempotency key. ```python def create_an_usage(self, subscription_id, item_id, idempotency_key=None) ``` ```python subscription_id = 'subscription_id' item_id = 'item_id' idempotency_key = 'idempotency-key' result = subscriptions_controller.create_an_usage(subscription_id, item_id, idempotency_key) ``` -------------------------------- ### .CustomersController.create_customer Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new customer in the system. An idempotency key can be provided to ensure the request is processed only once. ```APIDOC ## POST /customers ### Description Creates a new customer. This endpoint allows for the registration of new customer profiles. ### Method POST ### Endpoint /customers ### Parameters #### Path Parameters None #### Query Parameters - **idempotencyKey** (string) - Optional - Ensures the request is processed only once. #### Request Body - **body** (object) - Required - Request for creating a customer. Contains customer details. ### Request Example ```json { "example": "body = CustomersRequest1()\nidempotency_key = 'idempotency-key'\n\nresult = customers_controller.create_customer(body, idempotency_key)" } ``` ### Response #### Success Response (200) - **customer** (object) - The created customer object. #### Response Example ```json { "example": "{\"customer\": {...}}" } ``` ### Errors - **400** - Invalid request - **401** - Invalid API key - **404** - An informed resource was not found - **412** - Business validation error - **422** - Contract validation error - **500** - Internal server error ``` -------------------------------- ### SubscriptionsController.create_discount Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a discount for a given subscription. Requires subscription ID and a request body, with an optional idempotency key. ```APIDOC ## SubscriptionsController.create_discount ### Description Creates a discount for a specified subscription. ### Method Signature ```python def create_discount(self, subscription_id, body, idempotency_key=None) ``` ### Parameters #### Path Parameters - **subscription_id** (string) - Required - Subscription id - **body** (SubscriptionsDiscountsRequest) - Required - Request for creating a discount - **idempotency_key** (string) - Optional - TODO: Add a parameter description ### Example Usage ```python subscription_id = 'subscription_id' body = SubscriptionsDiscountsRequest() idempotency_key = 'idempotency-key' result = subscriptions_controller.create_discount(subscription_id, body, idempotency_key) ``` ### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### get_transfer Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Gets a specific transfer associated with a recipient. Requires both recipient ID and transfer ID. ```APIDOC ## get_transfer ### Description Gets a transfer. ### Method GET ### Endpoint /recipients/{recipient_id}/transfers/{transfer_id} ### Parameters #### Path Parameters - **recipient_id** (string) - Required - Recipient id - **transfer_id** (string) - Required - Transfer id ``` -------------------------------- ### Create Order in Python Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Use this method to create a new order. Provide the necessary order details in the request body. An idempotency key can be used for safe retries. ```python def create_order(self, body, idempotency_key=None) ``` ```python body = OrdersRequest() idempotency_key = 'idempotency-key' result = orders_controller.create_order(body, idempotency_key) ``` -------------------------------- ### get_withdrawals Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Gets a paginated list of transfers for the recipient. Supports filtering by status and creation date range. ```APIDOC ## get_withdrawals ### Description Gets a paginated list of transfers for the recipient. ### Method GET ### Endpoint /recipients/{recipient_id}/withdrawals ### Parameters #### Path Parameters - **recipient_id** (string) - Required - TODO: Add a parameter description #### Query Parameters - **page** (integer) - Optional - TODO: Add a parameter description - **size** (integer) - Optional - TODO: Add a parameter description - **status** (string) - Optional - TODO: Add a parameter description - **createdSince** (datetime) - Optional - TODO: Add a parameter description - **createdUntil** (datetime) - Optional - TODO: Add a parameter description ### Response #### Success Response (200) - **list** (array) - List of withdrawals #### Response Example { "example": "[ { \"id\": \"wd_123\", \"status\": \"paid\", \"amount\": 10000, \"created_at\": \"2023-10-27T10:00:00Z\" } ]" } ERROR HANDLING: - 400: Invalid request - 401: Invalid API key - 404: An informed resource was not found - 412: Business validation error - 422: Contract validation error - 500: Internal server error ``` -------------------------------- ### get_plans Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a paginated list of all plans, with options to filter by name, status, billing type, and creation date range. ```APIDOC ## get_plans ### Description Gets all plans. Allows filtering by name, status, billing type, and creation date. ### Method GET ### Endpoint /plans ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number - **size** (integer) - Optional - Page size - **name** (string) - Optional - Filter for Plan's name - **status** (string) - Optional - Filter for Plan's status - **billingType** (string) - Optional - Filter for plan's billing type - **createdSince** (datetime) - Optional - Filter for plan's creation date start range - **createdUntil** (datetime) - Optional - Filter for plan's creation date end range ### Request Example ```python plans_controller.get_plans(page=233, size=233, name='name', status='status', billing_type='billing_type', created_since=datetime.now(), created_until=datetime.now()) ``` ### Response #### Success Response (200) - **plans** (array) - List of plans #### Response Example ```json { "plans": [ { "id": "string", "name": "string", "description": "string", "billing_type": "string", "status": "string", "created_at": "string", "updated_at": "string" } ] } ``` ### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### .RecipientsController.get_transfers Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Gets a paginated list of transfers for the recipient. Supports filtering by status and creation date range. ```APIDOC ## GET /recipients/{recipientId}/transfers ### Description Gets a paginated list of transfers for the recipient. ### Method GET ### Endpoint /recipients/{recipientId}/transfers ### Parameters #### Path Parameters - **recipientId** (string) - Required - Recipient id #### Query Parameters - **page** (integer) - Optional - Page number - **size** (integer) - Optional - Page size - **status** (string) - Optional - Filter for transfer status - **createdSince** (datetime) - Optional - Filter for start range of transfer creation date - **createdUntil** (datetime) - Optional - Filter for end range of transfer creation date ### Response #### Success Response (200) - **transfers** (array) - List of transfers #### Response Example { "transfers": [ { "id": "string", "recipient_id": "string", "amount": 0, "status": "string", "created_at": "string", "updated_at": "string" } ] } #### Error Handling - 400: Invalid request - 401: Invalid API key - 404: An informed resource was not found - 412: Business validation error - 422: Contract validation error - 500: Internal server error ``` -------------------------------- ### Get Recipient Information Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves detailed information for a specific recipient using their ID. This is a read-only operation. ```python def get_recipient(self, recipient_id) ``` ```python recipient_id = 'recipient_id' result = recipients_controller.get_recipient(recipient_id) ``` -------------------------------- ### Create New Subscription Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md This method creates a new subscription. Provide the necessary request body containing subscription details. An idempotency key can be supplied to prevent duplicate creations. ```python def create_subscription(self, body, idempotency_key=None) ``` ```python body = SubscriptionsRequest1() idempotency_key = 'idempotency-key' result = subscriptions_controller.create_subscription(body, idempotency_key) ``` -------------------------------- ### get_usages Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Lists all usages from a subscription item. Supports pagination and filtering by code and group. ```APIDOC ## get_usages ### Description Lists all usages from a subscription item. ### Method GET ### Endpoint /subscriptions/{subscription_id}/items/{item_id}/usages ### Parameters #### Path Parameters - **subscription_id** (string) - Required - The subscription id - **item_id** (string) - Required - The subscription item id #### Query Parameters - **page** (integer) - Optional - Page number - **size** (integer) - Optional - Page size - **code** (string) - Optional - Identification code in the client system - **group** (string) - Optional - Identification group in the client system - **usedSince** (datetime) - Optional - TODO: Add a parameter description - **usedUntil** (datetime) - Optional - TODO: Add a parameter description ### Response #### Success Response (200) - **usages** (array) - List of usages #### Response Example { "usages": [ { "id": "usage_id", "code": "usage_code", "group": "usage_group", "quantity": 10, "used_at": "2023-10-27T10:00:00Z" } ] } ### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### Get Specific Transaction Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve details of a specific transaction using its ID. Ensure the transaction ID is valid. ```python def get_transaction(self, transaction_id) ``` ```python transaction_id = 'transaction_id' result = transactions_controller.get_transaction(transaction_id) ``` -------------------------------- ### create_address Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new address for a customer. ```APIDOC ## create_address ### Description Creates a new address for a customer. ### Method POST ### Endpoint /customers/{customerId}/addresses ### Parameters #### Path Parameters - **customerId** (string) - Required - Customer Id #### Request Body - **body** (object) - Required - Request for creating an address - **idempotencyKey** (string) - Optional - TODO: Add a parameter description ### Request Example ```json { "example": "CustomersAddressesRequest()" } ``` ### Response #### Success Response (201) - **address** (object) - The created address #### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### Get Recipient by Code Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves recipient information using their unique code. The recipient code is a required parameter. ```python def get_recipient_by_code(self, code) ``` ```python code = 'code' result = recipients_controller.get_recipient_by_code(code) ``` -------------------------------- ### Create an Anticipation Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Use this snippet to create a new anticipation for a recipient. Provide the recipient ID, anticipation data in the body, and an optional idempotency key. ```python def create_anticipation(self, recipient_id, body, idempotency_key=None) ``` ```python recipient_id = 'recipient_id' body = RecipientsAnticipationsRequest() idempotency_key = 'idempotency-key' result = recipients_controller.create_anticipation(recipient_id, body, idempotency_key) ``` -------------------------------- ### Get Transfer Details Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves the details of a specific transfer associated with a recipient. Requires both recipient and transfer IDs. ```python def get_transfer(self, recipient_id, transfer_id) ``` ```python recipient_id = 'recipient_id' transfer_id = 'transfer_id' result = recipients_controller.get_transfer(recipient_id, transfer_id) ``` -------------------------------- ### .CustomersController.create_card Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new credit card for a customer. ```APIDOC ## create_card ### Description Creates a new card for a customer. ### Method POST ### Endpoint /customers/{customerId}/cards ### Parameters #### Path Parameters - **customerId** (string) - Required - Customer id #### Request Body - **body** (object) - Required - Request for creating a card - **idempotencyKey** (string) - Optional - TODO: Add a parameter description ### Request Example ```python { "example": "customer_id = 'customer_id'\nbody = CustomersCardsRequest()\nidempotency_key = 'idempotency-key'\n\nresult = customers_controller.create_card(customer_id, body, idempotency_key)" } ``` ### Response #### Success Response (201) - **card** (object) - The created card details. #### Response Example ```json { "example": "{\"id\": \"card_id\", \"type\": \"credit\", \"brand\": \"visa\", \"holder_name\": \"John Doe\", \"fingerprint\": \"some_fingerprint\", \"exp_month\": 12, \"exp_year\": 2025, \"last_four_digits\": \"1111\", \"metadata\": {}}" } ``` ### Errors - **400** - Invalid request - **401** - Invalid API key - **404** - An informed resource was not found - **412** - Business validation error - **422** - Contract validation error - **500** - Internal server error ``` -------------------------------- ### Create Customer Address Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new address for a customer. Requires customer ID and address details. An idempotency key can be provided for request uniqueness. ```python def create_address(self, customer_id, body, idempotency_key=None) ``` ```python customer_id = 'customer_id' body = CustomersAddressesRequest() idempotency_key = 'idempotency-key' result = customers_controller.create_address(customer_id, body, idempotency_key) ``` -------------------------------- ### Get Paginated Recipients Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a paginated list of recipients. You can specify the page number and the size of each page for the results. ```python def get_recipients(self, page=None, size=None) ``` ```python page = 28 size = 28 result = recipients_controller.get_recipients(page, size) ``` -------------------------------- ### Create Plan Item Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Adds a new item to an existing plan. Requires the plan ID and the item details. ```python def create_plan_item( self, plan_id, body, idempotency_key=None ) ``` ```python plan_id = 'plan_id' body = PlansItemsRequest1() idempotency_key = 'idempotency-key' result = plans_controller.create_plan_item(plan_id, body, idempotency_key) ``` -------------------------------- ### Get RecipientsController Instance Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Access an instance of the RecipientsController from the API Client. This is the entry point for interacting with recipient-related functionalities. ```python recipients_controller = client.recipients ``` -------------------------------- ### Create Invoice Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Use this method to create a new invoice. Requires subscription ID, cycle ID, and optionally an idempotency key and request body. ```python def create_invoice(self, subscription_id, cycle_id, idempotency_key=None, body=None) ``` ```python subscription_id = 'subscription_id' cycle_id = 'cycle_id' idempotency_key = 'idempotency-key' body = SubscriptionsCyclesPayRequest() result = invoices_controller.create_invoice(subscription_id, cycle_id, idempotency_key, body) ``` -------------------------------- ### create_an_usage Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a usage record for a specific item within a subscription. An idempotency key can be provided. ```APIDOC ## create_an_usage ### Description Creates a usage record for a specific item within a subscription. An idempotency key can be provided. ### Method POST (inferred from SDK method) ### Endpoint /subscriptions/{subscription_id}/usages (inferred from SDK method) ### Parameters #### Path Parameters - **subscription_id** (string) - Required - Subscription id - **item_id** (string) - Required - Item id #### Query Parameters - **idempotency_key** (string) - Optional - TODO: Add a parameter description ### Request Example ```python subscriptions_controller.create_an_usage(subscription_id='subscription_id', item_id='item_id', idempotency_key='idempotency-key') ``` ### Response #### Success Response (200) - **(structure not provided in source)** #### Response Example **(response structure not provided in source)** #### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### Get Order Item Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a specific item within an order. Requires both the order ID and the item ID. ```python def get_order_item(self, order_id, item_id) ``` ```python order_id = 'orderId' item_id = 'itemId' result = orders_controller.get_order_item(order_id, item_id) ``` -------------------------------- ### get_discounts Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of discounts for a given subscription. Requires the subscription ID, page number, and page size. ```APIDOC ## get_discounts ### Description GetDiscounts. ### Method GET ### Endpoint /subscriptions/{subscription_id}/discounts ### Parameters #### Path Parameters - **subscription_id** (string) - Required - The subscription id #### Query Parameters - **page** (integer) - Required - Page number - **size** (integer) - Required - Page size ### Request Example ```python { "example": "subscription_id = 'subscription_id'\npage = 142\nsize = 142" } ``` ### Response #### Success Response (200) - **Success** - A list of discounts for the subscription. #### Response Example ```json { "example": "[Response body containing discounts]" } ``` ### Errors - **400**: Invalid request - **401**: Invalid API key - **404**: An informed resource was not found - **412**: Business validation error - **422**: Contract validation error - **500**: Internal server error ``` -------------------------------- ### Get Subscription Item Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a specific item associated with a subscription. Requires both the subscription ID and the item ID. ```python def get_subscription_item(self, subscription_id, item_id) ``` ```python subscription_id = 'subscription_id' item_id = 'item_id' result = subscriptions_controller.get_subscription_item(subscription_id, item_id) ``` -------------------------------- ### Create Customer Card Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Creates a new card for a customer. Requires customer ID and a request body. An idempotency key can be provided for optional use. ```python def create_card(self, customer_id, body, idempotency_key=None) ``` ```python customer_id = 'customer_id' body = CustomersCardsRequest() idempotency_key = 'idempotency-key' result = customers_controller.create_card(customer_id, body, idempotency_key) ``` -------------------------------- ### Get Transfer by ID Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve a specific transfer using its unique identifier. Ensure the transfer ID is correctly provided. ```python def get_transfer_by_id(self, transfer_id) ``` ```python transfer_id = 'transfer_id' result = transfers_controller.get_transfer_by_id(transfer_id) ``` -------------------------------- ### .CustomersController.get_customers Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieves a list of all customers. Supports filtering by name, document, email, and code, along with pagination. ```APIDOC ## GET /customers ### Description Get all Customers. This endpoint allows searching and retrieving customer records with various filtering and pagination options. ### Method GET ### Endpoint /customers ### Parameters #### Path Parameters None #### Query Parameters - **name** (string) - Optional - Name of the Customer - **document** (string) - Optional - Document of the Customer - **page** (integer) - Optional - Current page of the search. Defaults to 1. - **size** (integer) - Optional - Quantity of items per page for the search. Defaults to 10. - **email** (string) - Optional - Customer's email - **code** (string) - Optional - Customer's code ### Request Example ```json { "example": "name = 'name'\ndocument = 'document'\npage = 1\nsize = 10\nemail = 'email'\ncode = 'Code'\n\nresult = customers_controller.get_customers(name, document, page, size, email, code)" } ``` ### Response #### Success Response (200) - **customers** (array) - List of customer objects. - **paging** (object) - Pagination information. #### Response Example ```json { "example": "{\"customers\": [...], \"paging\": {...}}" } ``` ### Errors - **400** - Invalid request - **401** - Invalid API key - **404** - An informed resource was not found - **412** - Business validation error - **422** - Contract validation error - **500** - Internal server error ``` -------------------------------- ### Get Charge by ID Source: https://github.com/mundipagg/mundiapi-python/blob/master/README.md Retrieve a specific charge using its unique identifier. Ensure the charge ID is correctly provided. ```python def get_charge(self, charge_id) ``` ```python charge_id = 'charge_id' result = charges_controller.get_charge(charge_id) ```