@@ -34,8 +34,8 @@ def create_direct_charge(self,
3434 price (int): Price of the charge defined in cents.
3535 quantity (int): Number of the accounts within the organization.
3636 return_url (str): Redirection url for the client.
37- per_account (bool): Whether or not the app is sold in ppa account model.
38- test (str): Whether or not the direct charge is for test.
37+ per_account (bool): Whether or not the app is sold in ppa account model. Default: False.
38+ test (str): Whether or not the direct charge is for test. Default: False.
3939 payload (dict): Custom payload to be used as request's data.
4040 It overrides all other parameters provided for the method.
4141 headers (dict): Custom headers to be used with session headers.
@@ -82,7 +82,7 @@ def list_direct_charges(self,
8282 headers : dict = None ) -> httpx .Response :
8383 ''' Lists all direct charges.
8484 Args:
85- page (int): Navigate to page number.
85+ page (int): Navigate to page number. Default: 1.
8686 status (str): Filter charges by status. One of pending, accepted, active, declined, processed, failed or success.
8787 order_client_id (str): Filter by specific `order_client_id`.
8888 params (dict): Custom params to be used in request's query string.
@@ -119,17 +119,20 @@ def activate_direct_charge(self,
119119 if payload is None :
120120 payload = prepare_payload (locals ())
121121 del payload ['charge_id' ]
122- return self .session .put (f'{ self .api_url } /direct_charge/{ charge_id } ' ,
123- json = payload ,
124- headers = headers )
122+ return self .session .put (
123+ f'{ self .api_url } /direct_charge/{ charge_id } /activate' ,
124+ json = payload ,
125+ headers = headers )
125126
126127# ledger
127128
128129 def get_ledger (self ,
130+ page : int = None ,
129131 params : dict = None ,
130132 headers : dict = None ) -> httpx .Response :
131133 ''' Returns current ledger.
132134 Args:
135+ page (int): Navigate to page number. Default: 1.
133136 params (dict): Custom params to be used in request's query string.
134137 It overrides all other parameters provided for the method.
135138 headers (dict): Custom headers to be used with session headers.
@@ -148,7 +151,7 @@ def get_ledger(self,
148151 def get_ledger_balance (self ,
149152 params : dict = None ,
150153 headers : dict = None ) -> httpx .Response :
151- ''' Returns current ledger balance.
154+ ''' Returns current ledger balance in cents .
152155 Args:
153156 params (dict): Custom params to be used in request's query string.
154157 It overrides all other parameters provided for the method.
@@ -178,15 +181,15 @@ def create_recurrent_charge(self,
178181 test : bool = True ,
179182 payload : dict = None ,
180183 headers : dict = None ) -> httpx .Response :
181- ''' Creates a new reccurent charge for the user (periodic payment).
184+ ''' Creates a new recurrent charge for the user (periodic payment).
182185 Args:
183- name (str): Name of the reccurent charge.
186+ name (str): Name of the recurrent charge.
184187 price (int): Price of the charge defined in cents.
185188 return_url (str): Redirection url for the client.
186- per_account (bool): Whether or not the app is sold in ppa account model.
187- trial_days (int): Number of granted trial days.
188- months (int): Charge frequency expressed in months.
189- test (str): Whether or not the direct charge is for test.
189+ per_account (bool): Whether or not the app is sold in ppa account model. Default: False.
190+ trial_days (int): Number of granted trial days. Default: 0.
191+ months (int): Charge frequency expressed in months. Default: 1.
192+ test (str): Whether or not the direct charge is for test. Default: False.
190193 payload (dict): Custom payload to be used as request's data.
191194 It overrides all other parameters provided for the method.
192195 headers (dict): Custom headers to be used with session headers.
@@ -206,7 +209,7 @@ def get_recurrent_charge(self,
206209 charge_id : str ,
207210 params : dict = None ,
208211 headers : dict = None ) -> httpx .Response :
209- ''' Gets specific reccurent charge.
212+ ''' Gets specific recurrent charge.
210213 Args:
211214 charge_id (str): ID of the recurrent charge.
212215 params (dict): Custom params to be used in request's query string.
@@ -233,7 +236,7 @@ def list_recurrent_charges(self,
233236 headers : dict = None ) -> httpx .Response :
234237 ''' Lists all recurrent charges.
235238 Args:
236- page (int): Navigate to specific page number.
239+ page (int): Navigate to specific page number. Default: 1.
237240 status (str): Filter charges by status. One of pending, accepted, active, declined, processed, failed or success.
238241 order_client_id (str): Filter by specific `order_client_id`.
239242 params (dict): Custom params to be used in request's query string.
@@ -255,7 +258,7 @@ def accept_recurrent_charge(self,
255258 charge_id : str ,
256259 payload : dict = None ,
257260 headers : dict = None ) -> httpx .Response :
258- ''' Accpets specific reccurent charge.
261+ ''' Accepets specific recurrent charge.
259262 Args:
260263 charge_id (str): ID of the recurrent charge.
261264 payload (dict): Custom payload to be used as request's data.
@@ -279,7 +282,7 @@ def decline_recurrent_charge(self,
279282 charge_id : str ,
280283 payload : dict = None ,
281284 headers : dict = None ) -> httpx .Response :
282- ''' Declines specific reccurent charge.
285+ ''' Declines specific recurrent charge.
283286 Args:
284287 charge_id (str): ID of the recurrent charge.
285288 payload (dict): Custom payload to be used as request's data.
@@ -303,7 +306,7 @@ def activate_recurrent_charge(self,
303306 charge_id : str ,
304307 payload : dict = None ,
305308 headers : dict = None ) -> httpx .Response :
306- ''' Activates specific reccurent charge.
309+ ''' Activates specific recurrent charge.
307310 Args:
308311 charge_id (str): ID of the recurrent charge.
309312 payload (dict): Custom payload to be used as request's data.
@@ -327,7 +330,7 @@ def cancel_recurrent_charge(self,
327330 charge_id : str ,
328331 payload : dict = None ,
329332 headers : dict = None ) -> httpx .Response :
330- ''' Cancels specific reccurent charge.
333+ ''' Cancels specific recurrent charge.
331334 Args:
332335 charge_id (str): ID of the recurrent charge.
333336 payload (dict): Custom payload to be used as request's data.
0 commit comments