pagarmeapisdk/controllers/recipients_controller.py
def create_anticipation(self,
                            recipient_id,
                            request,
                            idempotency_key=None):
        """Does a POST request to /recipients/{recipient_id}/anticipations.

        Creates an anticipation

        Args:
            recipient_id (string): Recipient id
            request (CreateAnticipationRequest): Anticipation data
            idempotency_key (string, optional): TODO: type description here.

        Returns:
            GetAnticipationResponse: Response from the API.

        Raises:
            APIException: When an error occurs while fetching the data from
                the remote API. This exception includes the HTTP Response
                code, an error message, and the HTTP body that was received in
                the request.

        """

        # Prepare query URL
        _url_path = '/recipients/{recipient_id}/anticipations'
        _url_path = APIHelper.append_url_with_template_parameters(_url_path, {
            'recipient_id': {'value': recipient_id, 'encode': True}
        })
        _query_builder = self.config.get_base_uri()
        _query_builder += _url_path
        _query_url = APIHelper.clean_url(_query_builder)

        # Prepare headers
        _headers = {
            'accept': 'application/json',
            'content-type': 'application/json; charset=utf-8',
            'idempotency-key': idempotency_key
        }

        # Prepare and execute request
        _request = self.config.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(request))
        # Apply authentication scheme on request
        self.apply_auth_schemes(_request, 'global')

        _response = self.execute_request(_request)
        self.validate_response(_response)

        decoded = APIHelper.json_deserialize(_response.text, GetAnticipationResponse.from_dictionary)

        return decoded
Does a POST request to /recipients/{recipient_id}/anticipations.

        Creates an anticipation

        Args:
            recipient_id (string): Recipient id
            request (CreateAnticipationRequest): Anticipation data
            idempotency_key (string, optional): TODO: type description here.

        Returns:
            GetAnticipationResponse: Response from the API.

        Raises:
            APIException: When an error occurs while fetching the data from
                the remote API. This exception includes the HTTP Response
                code, an error message, and the HTTP body that was received in
                the request.

        
Does a POST request to /recipients/{recipient_id}/anticipations.
Creates an anticipation
Does a POST request to / recipients / { recipient_id } / anticipations . Creates an anticipation
def create_anticipation(self,
                            recipient_id,
                            request,
                            idempotency_key=None):
        _url_path = '/recipients/{recipient_id}/anticipations'
        _url_path = APIHelper.append_url_with_template_parameters(_url_path, {
            'recipient_id': {'value': recipient_id, 'encode': True}
        })
        _query_builder = self.config.get_base_uri()
        _query_builder += _url_path
        _query_url = APIHelper.clean_url(_query_builder)
        _headers = {
            'accept': 'application/json',
            'content-type': 'application/json; charset=utf-8',
            'idempotency-key': idempotency_key
        }
        _request = self.config.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(request))
        self.apply_auth_schemes(_request, 'global')
        _response = self.execute_request(_request)
        self.validate_response(_response)
        decoded = APIHelper.json_deserialize(_response.text, GetAnticipationResponse.from_dictionary)
        return decoded
def create_anticipation ( self , recipient_id , request , idempotency_key = None ) : _url_path = '/recipients/{recipient_id}/anticipations' _url_path = APIHelper . append_url_with_template_parameters ( _url_path , { 'recipient_id' : { 'value' : recipient_id , 'encode' : True } } ) _query_builder = self . config . get_base_uri ( ) _query_builder += _url_path _query_url = APIHelper . clean_url ( _query_builder ) _headers = { 'accept' : 'application/json' , 'content-type' : 'application/json; charset=utf-8' , 'idempotency-key' : idempotency_key } _request = self . config . http_client . post ( _query_url , headers = _headers , parameters = APIHelper . json_serialize ( request ) ) self . apply_auth_schemes ( _request , 'global' ) _response = self . execute_request ( _request ) self . validate_response ( _response ) decoded = APIHelper . json_deserialize ( _response . text , GetAnticipationResponse . from_dictionary ) return decoded
Does a POST request to /recipients/{recipient_id}/anticipations.
Does a POST request to / recipients / { recipient_id } / anticipations .
"""Does a POST request to /recipients/{recipient_id}/anticipations.

        Creates an anticipation

        Args:
            recipient_id (string): Recipient id
            request (CreateAnticipationRequest): Anticipation data
            idempotency_key (string, optional): TODO: type description here.

        Returns:
            GetAnticipationResponse: Response from the API.

        Raises:
            APIException: When an error occurs while fetching the data from
                the remote API. This exception includes the HTTP Response
                code, an error message, and the HTTP body that was received in
                the request.

        """ # Prepare query URL
 # Prepare headers
 # Prepare and execute request
 # Apply authentication scheme on request

Response from the API.
Response from the API .
GetAnticipationResponse
When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
When an error occurs while fetching the data from the remote API . This exception includes the HTTP Response code an error message and the HTTP body that was received in the request .
APIException
self
recipient_id
None
request
None
idempotency_key
type description here.
type description here .