View Source StarkInfra.IssuingHolder (starkinfra v0.0.1)
Groups IssuingHolder related functions
Link to this section Summary
Functions
The IssuingHolder describes a card holder that may group several cards.
Same as cancel(), but it will unwrap the error tuple and raise in case of errors.
Cancel an IssuingHolder entity previously created in the Stark Infra API.
Same as create(), but it will unwrap the error tuple and raise in case of errors.
Send a list of IssuingHolder structs for creation in the Stark Infra API.
Same as get(), but it will unwrap the error tuple and raise in case of errors.
Receive a single IssuingHolder struct previously created in the Stark Infra API by its id.
Same as page(), but it will unwrap the error tuple and raise in case of errors.
Receive a list of IssuingHolder structs previously created in the Stark Infra API and the cursor to the next page.
Same as query(), but it will unwrap the error tuple and raise in case of errors.
Receive a stream of IssuingHolder structs previously created in the Stark Infra API
Same as update(), but it will unwrap the error tuple and raise in case of errors.
Update an IssuingHolder by passing id, if it hasn't been paid yet.
Link to this section Types
Link to this section Functions
The IssuingHolder describes a card holder that may group several cards.
parameters-required
Parameters (required):
- `:name` [binary]: card holder's name.
- `:tax_id` [binary]: card holder's tax ID
- `:external_id` [binary] card holder's external ID
parameters-optional
Parameters (optional):
- `:rules` [list of IssuingRule structs, default []]: [EXPANDABLE] list of holder spending rules
- `:tags` [list of binarys, default []]: list of binarys for tagging. ex: ["travel", "food"]
attributes-return-only
Attributes (return-only):
- `:id` [binary]: unique id returned when IssuingHolder is created. ex: "5656565656565656"
- `:status` [binary]: current IssuingHolder status. ex: "active", "blocked" or "canceled"
- `:updated` [DateTime]: latest update DateTime for the IssuingHolder. ex: ~U[2020-3-10 10:30:0:0]
- `:created` [DateTime]: creation datetime for the IssuingHolder. ex: ~U[2020-03-10 10:30:0:0]
Same as cancel(), but it will unwrap the error tuple and raise in case of errors.
Cancel an IssuingHolder entity previously created in the Stark Infra API.
parameters-required
Parameters (required):
- `:id` [string]: IssuingHolder unique id. ex: "5656565656565656"
options
Options:
- `:user` [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.
return
Return:
- canceled IssuingHolder struct
Same as create(), but it will unwrap the error tuple and raise in case of errors.
Send a list of IssuingHolder structs for creation in the Stark Infra API.
parameters-required
Parameters (required):
- `:holders` [list of IssuingHolder structs]: list of IssuingHolder structs to be created in the API
options
Options:
- `:user` [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.
return
Return:
- list of IssuingHolder structs with updated attributes
Same as get(), but it will unwrap the error tuple and raise in case of errors.
Receive a single IssuingHolder struct previously created in the Stark Infra API by its id.
parameters-required
Parameters (required):
- `:id` [binary]: struct unique id. ex: "5656565656565656"
options
Options:
- `:expand` [list of binarys, default nil]: fields to expand information. ex: ["rules"]
- `:user` [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.
return
Return:
- IssuingHolder struct with updated attributes
@spec page!( limit: integer() | nil, after: Date.t() | binary() | nil, before: Date.t() | binary() | nil, status: binary() | nil, tags: [binary()] | nil, ids: [binary()] | nil, expand: [binary()] | nil, cursor: binary() | nil, user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil ) :: any()
Same as page(), but it will unwrap the error tuple and raise in case of errors.
@spec page( limit: integer() | nil, after: Date.t() | binary() | nil, before: Date.t() | binary() | nil, status: binary() | nil, tags: [binary()] | nil, ids: [binary()] | nil, expand: [binary()] | nil, cursor: binary() | nil, user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil ) :: {:cont, {binary(), [t()]}} | {:error, [{:error, StarkInfra.Error.t()}]}
Receive a list of IssuingHolder structs previously created in the Stark Infra API and the cursor to the next page.
options
Options:
- `:limit` [integer, default 100]: maximum number of structs to be retrieved. Unlimited if nil. ex: 35
- `:after` [Date or string, default nil]: date filter for structs created only after specified date. ex: ~D[2020-03-25]
- `:before` [Date or string, default nil]: date filter for structs created only before specified date. ex: ~D[2020-03-25]
- `:status` [string, default nil]: filter for status of retrieved structs. ex: "paid" or "registered"
- `:tags` [list of strings, default nil]: tags to filter retrieved structs. ex: ["tony", "stark"]
- `:ids` [list of strings, default nil]: list of ids to filter retrieved structs. ex: ["5656565656565656", "4545454545454545"]
- `:expand` [string, default nil]: fields to expand information. ex: "rules, securityCode, number, expiration"
- `:cursor` [string, default nil]: cursor returned on the previous page function call
- `:user` [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.
return
Return:
- list of IssuingHolder structs with updated attributes
- cursor to retrieve the next page of IssuingHolder structs
@spec query!( limit: integer() | nil, after: Date.t() | binary() | nil, before: Date.t() | binary() | nil, status: binary() | nil, tags: [binary()] | nil, ids: [binary()] | nil, expand: [binary()] | nil, user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil ) :: any()
Same as query(), but it will unwrap the error tuple and raise in case of errors.
@spec query( limit: integer() | nil, after: Date.t() | binary() | nil, before: Date.t() | binary() | nil, status: binary() | nil, tags: [binary()] | nil, ids: [binary()] | nil, expand: [binary()] | nil, user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil ) :: {:cont, [t()]} | {:error, [{:error, StarkInfra.Error.t()}]}
Receive a stream of IssuingHolder structs previously created in the Stark Infra API
options
Options:
- `:limit` [integer, default 100]: maximum number of structs to be retrieved. Unlimited if nil. ex: 35
- `:after` [Date or string, default nil]: date filter for structs created only after specified date. ex: ~D[2020-03-25]
- `:before` [Date or string, default nil]: date filter for structs created only before specified date. ex: ~D[2020-03-25]
- `:status` [binary, default nil]: filter for status of retrieved structs. ex: "paid" or "registered"
- `:tags` [list of binarys, default nil]: tags to filter retrieved structs. ex: ["tony", "stark"]
- `:ids` [list of binarys, default nil]: list of ids to filter retrieved structs. ex: ["5656565656565656", "4545454545454545"]
- `:expand` [list of binarys, default nil]: fields to expand information. ex: ["rules"]
- `:user` [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.
return
Return:
- stream of IssuingHolder structs with updated attributes
Same as update(), but it will unwrap the error tuple and raise in case of errors.
Update an IssuingHolder by passing id, if it hasn't been paid yet.
parameters-required
Parameters (required):
- `:id` [string]: IssuingHolder id. ex: '5656565656565656'
parameters-optional
Parameters (optional):
- `:status` [string, default nil]: You may block the IssuingHolder by passing 'blocked' in the status.
- `:name` [string, default nil]: card holder name.
- `:tags` [list of strings, default nil]: list of strings for tagging.
- `:rules` [list of dictionaries, default nil]: list of dictionaries with "amount": int, "currencyCode": string, "id": string, "interval": string, "name": string pairs
- `:user` [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.
return
Return:
- target IssuingHolder with updated attributes