1- defmodule StripityStripeFork .Account do
1+ defmodule StripeFork .Account do
22 @ moduledoc """
33 Work with Stripe Connect account objects.
44
@@ -12,8 +12,8 @@ defmodule StripityStripeFork.Account do
1212 Stripe API reference: https://stripe.com/docs/api#account
1313 """
1414
15- use StripityStripeFork .Entity
16- import StripityStripeFork .Request
15+ use StripeFork .Entity
16+ import StripeFork .Request
1717
1818 @ type decline_charge_on :: % {
1919 avs_failure: boolean ,
@@ -88,41 +88,41 @@ defmodule StripityStripeFork.Account do
8888 @ type legal_entity_verification :: % {
8989 details: String . t ( ) | nil ,
9090 details_code: String . t ( ) | nil ,
91- document: StripityStripeFork . id ( ) | StripityStripeFork .FileUpload. t ( ) | nil ,
91+ document: StripeFork . id ( ) | StripeFork .FileUpload. t ( ) | nil ,
9292 status: String . t ( )
9393 }
9494
9595 @ type tos_acceptance :: % {
96- date: StripityStripeFork . timestamp ( ) | nil ,
96+ date: StripeFork . timestamp ( ) | nil ,
9797 ip: String . t ( ) | nil ,
9898 user_agent: String . t ( ) | nil
9999 }
100100
101101 @ type verification :: % {
102102 disabled_reason: String . t ( ) | nil ,
103- due_by: StripityStripeFork . timestamp ( ) | nil ,
103+ due_by: StripeFork . timestamp ( ) | nil ,
104104 fields_needed: [ String . t ( ) ]
105105 }
106106
107107 @ type t :: % __MODULE__ {
108- id: StripityStripeFork . id ( ) ,
108+ id: StripeFork . id ( ) ,
109109 object: String . t ( ) ,
110110 business_logo: String . t ( ) | nil ,
111111 business_name: String . t ( ) | nil ,
112112 business_url: String . t ( ) | nil ,
113113 charges_enabled: boolean ,
114- created: StripityStripeFork . timestamp ( ) | nil ,
114+ created: StripeFork . timestamp ( ) | nil ,
115115 country: String . t ( ) ,
116116 debit_negative_balances: boolean ,
117117 decline_charge_on: decline_charge_on ,
118118 default_currency: String . t ( ) ,
119119 details_submitted: boolean ,
120120 display_name: String . t ( ) | nil ,
121121 email: String . t ( ) | nil ,
122- external_accounts: StripityStripeFork .List. t ( StripityStripeFork .BankAccount. t ( ) | StripityStripeFork .Card. t ( ) ) ,
122+ external_accounts: StripeFork .List. t ( StripeFork .BankAccount. t ( ) | StripeFork .Card. t ( ) ) ,
123123 legal_entity: legal_entity ,
124- metadata: StripityStripeFork .Types. metadata ( ) ,
125- payout_schedule: StripityStripeFork .Types. transfer_schedule ( ) ,
124+ metadata: StripeFork .Types. metadata ( ) ,
125+ payout_schedule: StripeFork .Types. transfer_schedule ( ) ,
126126 payout_statement_descriptor: String . t ( ) | nil ,
127127 payouts_enabled: boolean ,
128128 product_description: String . t ( ) | nil ,
@@ -185,8 +185,8 @@ defmodule StripityStripeFork.Account do
185185 optional ( :email ) => String . t ( ) ,
186186 optional ( :external_account ) => String . t ( ) ,
187187 optional ( :legal_entity ) => legal_entity ,
188- optional ( :metadata ) => StripityStripeFork .Types. metadata ( ) ,
189- optional ( :payout_schedule ) => StripityStripeFork .Types. transfer_schedule ( ) ,
188+ optional ( :metadata ) => StripeFork .Types. metadata ( ) ,
189+ optional ( :payout_schedule ) => StripeFork .Types. transfer_schedule ( ) ,
190190 optional ( :payout_statement_descriptor ) => String . t ( ) ,
191191 optional ( :product_description ) => String . t ( ) ,
192192 optional ( :statement_descriptor ) => String . t ( ) ,
@@ -199,7 +199,7 @@ defmodule StripityStripeFork.Account do
199199 @ doc """
200200 Create an account.
201201 """
202- @ spec create ( params , StripityStripeFork . options ( ) ) :: { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
202+ @ spec create ( params , StripeFork . options ( ) ) :: { :ok , t } | { :error , StripeFork .Error. t ( ) }
203203 when params: % {
204204 optional ( :country ) => String . t ( ) ,
205205 optional ( :email ) => String . t ( ) ,
@@ -217,22 +217,22 @@ defmodule StripityStripeFork.Account do
217217 @ doc """
218218 Retrieve your own account without options.
219219 """
220- @ spec retrieve :: { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
220+ @ spec retrieve :: { :ok , t } | { :error , StripeFork .Error. t ( ) }
221221 def retrieve , do: retrieve ( [ ] )
222222
223223 @ doc """
224224 Retrieve your own account with options.
225225 """
226- @ spec retrieve ( list ) :: { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
226+ @ spec retrieve ( list ) :: { :ok , t } | { :error , StripeFork .Error. t ( ) }
227227 def retrieve ( opts ) when is_list ( opts ) , do: do_retrieve ( @ singular_endpoint , opts )
228228
229229 @ doc """
230230 Retrieve an account with a specified `id`.
231231 """
232- @ spec retrieve ( binary , list ) :: { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
232+ @ spec retrieve ( binary , list ) :: { :ok , t } | { :error , StripeFork .Error. t ( ) }
233233 def retrieve ( id , opts \\ [ ] ) , do: do_retrieve ( @ plural_endpoint <> "/" <> id , opts )
234234
235- @ spec do_retrieve ( String . t ( ) , list ) :: { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
235+ @ spec do_retrieve ( String . t ( ) , list ) :: { :ok , t } | { :error , StripeFork .Error. t ( ) }
236236 defp do_retrieve ( endpoint , opts ) do
237237 new_request ( opts )
238238 |> put_endpoint ( endpoint )
@@ -253,8 +253,8 @@ defmodule StripityStripeFork.Account do
253253 optional ( :email ) => String . t ( ) ,
254254 optional ( :external_account ) => String . t ( ) ,
255255 optional ( :legal_entity ) => legal_entity ,
256- optional ( :metadata ) => StripityStripeFork .Types. metadata ( ) ,
257- optional ( :payout_schedule ) => StripityStripeFork .Types. transfer_schedule ( ) ,
256+ optional ( :metadata ) => StripeFork .Types. metadata ( ) ,
257+ optional ( :payout_schedule ) => StripeFork .Types. transfer_schedule ( ) ,
258258 optional ( :payout_statement_descriptor ) => String . t ( ) ,
259259 optional ( :product_description ) => String . t ( ) ,
260260 optional ( :statement_descriptor ) => String . t ( ) ,
@@ -269,7 +269,8 @@ defmodule StripityStripeFork.Account do
269269
270270 Takes the `id` and a map of changes.
271271 """
272- @ spec update ( StripityStripeFork . id ( ) | t , params , StripityStripeFork . options ( ) ) :: { :ok , t } | { :error , StripityStripeFork.Error . t ( ) }
272+ @ spec update ( StripeFork . id ( ) | t , params , StripeFork . options ( ) ) ::
273+ { :ok , t } | { :error , StripeFork.Error . t ( ) }
273274 when params: % {
274275 optional ( :business_logo ) => String . t ( ) ,
275276 optional ( :business_name ) => String . t ( ) ,
@@ -281,8 +282,8 @@ defmodule StripityStripeFork.Account do
281282 optional ( :email ) => String . t ( ) ,
282283 optional ( :external_accounts ) => String . t ( ) ,
283284 optional ( :legal_entity ) => legal_entity ,
284- optional ( :metadata ) => StripityStripeFork .Types. metadata ( ) ,
285- optional ( :payout_schedule ) => StripityStripeFork .Types. transfer_schedule ( ) ,
285+ optional ( :metadata ) => StripeFork .Types. metadata ( ) ,
286+ optional ( :payout_schedule ) => StripeFork .Types. transfer_schedule ( ) ,
286287 optional ( :payout_statement_descriptor ) => String . t ( ) ,
287288 optional ( :product_description ) => String . t ( ) ,
288289 optional ( :statement_descriptor ) => String . t ( ) ,
@@ -302,7 +303,8 @@ defmodule StripityStripeFork.Account do
302303 @ doc """
303304 Delete an account.
304305 """
305- @ spec delete ( StripityStripeFork . id ( ) | t , StripityStripeFork . options ( ) ) :: { :ok , t } | { :error , StripityStripeFork.Error . t ( ) }
306+ @ spec delete ( StripeFork . id ( ) | t , StripeFork . options ( ) ) ::
307+ { :ok , t } | { :error , StripeFork.Error . t ( ) }
306308 def delete ( id , opts \\ [ ] ) do
307309 new_request ( opts )
308310 |> put_endpoint ( @ plural_endpoint <> "/#{ get_id! ( id ) } " )
@@ -315,8 +317,8 @@ defmodule StripityStripeFork.Account do
315317
316318 Takes the `id` and `reason`.
317319 """
318- @ spec reject ( StripityStripeFork . id ( ) | t , String . t ( ) , StripityStripeFork . options ( ) ) ::
319- { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
320+ @ spec reject ( StripeFork . id ( ) | t , String . t ( ) , StripeFork . options ( ) ) ::
321+ { :ok , t } | { :error , StripeFork .Error. t ( ) }
320322 def reject ( id , reason , opts \\ [ ] ) do
321323 params = % {
322324 reason: reason
@@ -333,11 +335,12 @@ defmodule StripityStripeFork.Account do
333335 @ doc """
334336 List all connected accounts.
335337 """
336- @ spec list ( params , StripityStripeFork . options ( ) ) :: { :ok , StripityStripeFork.List . t ( t ) } | { :error , StripityStripeFork.Error . t ( ) }
338+ @ spec list ( params , StripeFork . options ( ) ) ::
339+ { :ok , StripeFork.List . t ( t ) } | { :error , StripeFork.Error . t ( ) }
337340 when params: % {
338- optional ( :ending_before ) => t | StripityStripeFork . id ( ) ,
341+ optional ( :ending_before ) => t | StripeFork . id ( ) ,
339342 optional ( :limit ) => 1 .. 100 ,
340- optional ( :starting_after ) => t | StripityStripeFork . id ( )
343+ optional ( :starting_after ) => t | StripeFork . id ( )
341344 }
342345 def list ( params \\ % { } , opts \\ [ ] ) do
343346 new_request ( opts )
@@ -352,12 +355,12 @@ defmodule StripityStripeFork.Account do
352355 @ doc """
353356 Create a login link.
354357 """
355- @ spec create_login_link ( StripityStripeFork . id ( ) | t , params , StripityStripeFork . options ( ) ) ::
356- { :ok , t } | { :error , StripityStripeFork .Error. t ( ) }
358+ @ spec create_login_link ( StripeFork . id ( ) | t , params , StripeFork . options ( ) ) ::
359+ { :ok , t } | { :error , StripeFork .Error. t ( ) }
357360 when params: % {
358361 optional ( :redirect_url ) => String . t ( )
359362 }
360363 def create_login_link ( id , params , opts \\ [ ] ) do
361- StripityStripeFork .LoginLink. create ( id , params , opts )
364+ StripeFork .LoginLink. create ( id , params , opts )
362365 end
363366end
0 commit comments