class Stripe::TopupsApi

Defined in:

stripe/api/topups_api.cr

Constant Summary

GET_TOPUPS_MAX_LENGTH_FOR_ENDING_BEFORE = 5000
GET_TOPUPS_MAX_LENGTH_FOR_STARTING_AFTER = 5000
GET_TOPUPS_MAX_LENGTH_FOR_STATUS = 5000
GET_TOPUPS_TOPUP_MAX_LENGTH_FOR_TOPUP = 5000
GET_TOPUPS_VALID_VALUES_FOR_STATUS = String.static_array("canceled", "failed", "pending", "succeeded")
POST_TOPUPS_MAX_LENGTH_FOR_DESCRIPTION = 5000
POST_TOPUPS_MAX_LENGTH_FOR_SOURCE = 5000
POST_TOPUPS_MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR = 15
POST_TOPUPS_TOPUP_CANCEL_MAX_LENGTH_FOR_TOPUP = 5000
POST_TOPUPS_TOPUP_MAX_LENGTH_FOR_DESCRIPTION = 5000
POST_TOPUPS_TOPUP_MAX_LENGTH_FOR_TOPUP = 5000

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : Stripe::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_get_topups(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, amount : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_topups_topup(*, topup : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_topups(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, transfer_group : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_topups_topup(*, topup : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_topups_topup_cancel(*, topup : String | Nil = nil, expand : Array(String) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation?(*args, **options) #

[View source]
def client_side_validation?(*args, **options, &) #

[View source]
def debugging?(*args, **options) #

[View source]
def debugging?(*args, **options, &) #

[View source]
def get_topups(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, amount : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::TopupList #

Returns a list of top-ups.

@optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param amount [Stripe::GetAccountsCreatedParameter?] A positive integer representing how much to transfer. @optional @param status [String?] Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::TopupList]

[View source]
def get_topups(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, amount : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Returns a list of top-ups.</p> @optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. @optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param amount [Stripe::GetAccountsCreatedParameter?] A positive integer representing how much to transfer. @optional @param status [String?] Only return top-ups that have the given status. One of canceled, failed, pending or succeeded. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil


[View source]
def get_topups_topup(*, topup : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Topup #

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

@required @param topup [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Topup]

[View source]
def get_topups_topup(*, topup : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.</p> @required @param topup [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil


[View source]
def get_topups_topup_with_http_info(*, topup : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Topup, Int32, Hash(String, Array(String) | String)) #

<p>Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.</p> @required @param topup [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Topup, Integer, Hash)] Stripe::Topup, response status code and response headers


[View source]
def get_topups_with_http_info(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, amount : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::TopupList, Int32, Hash(String, Array(String) | String)) #

<p>Returns a list of top-ups.</p> @optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. @optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param amount [Stripe::GetAccountsCreatedParameter?] A positive integer representing how much to transfer. @optional @param status [String?] Only return top-ups that have the given status. One of canceled, failed, pending or succeeded. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::TopupList, Integer, Hash)] Stripe::TopupList, response status code and response headers


[View source]
def post_topups(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, transfer_group : String | Nil = nil) : Stripe::Topup #

Top up the balance of an account

@required @param amount [Int32?] A positive integer representing how much to transfer. @required @param currency [String?] Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param source [String?] The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). @optional @param statement_descriptor [String?] Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. @optional @param transfer_group [String?] A string that identifies this top-up as part of a group. @return [Stripe::Topup]

[View source]
def post_topups(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, transfer_group : String | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Top up the balance of an account</p> @required @param amount [Int32?] A positive integer representing how much to transfer. @required @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency. @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param source [String?] The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see Testing Top-ups). @optional @param statement_descriptor [String?] Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. @optional @param transfer_group [String?] A string that identifies this top-up as part of a group. @return nil


[View source]
def post_topups_topup(*, topup : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Stripe::Topup #

Updates the metadata of a top-up. Other top-up details are not editable by design.

@required @param topup [String?] @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return [Stripe::Topup]

[View source]
def post_topups_topup(*, topup : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Updates the metadata of a top-up. Other top-up details are not editable by design.</p> @required @param topup [String?] @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return nil


[View source]
def post_topups_topup_cancel(*, topup : String | Nil = nil, expand : Array(String) | Nil = nil) : Stripe::Topup #

Cancels a top-up. Only pending top-ups can be canceled.

@required @param topup [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Stripe::Topup]

[View source]
def post_topups_topup_cancel(*, topup : String | Nil = nil, expand : Array(String) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Cancels a top-up. Only pending top-ups can be canceled.</p> @required @param topup [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return nil


[View source]
def post_topups_topup_cancel_with_http_info(*, topup : String | Nil = nil, expand : Array(String) | Nil = nil) : Tuple(Stripe::Topup, Int32, Hash(String, Array(String) | String)) #

<p>Cancels a top-up. Only pending top-ups can be canceled.</p> @required @param topup [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Topup, Integer, Hash)] Stripe::Topup, response status code and response headers


[View source]
def post_topups_topup_with_http_info(*, topup : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Tuple(Stripe::Topup, Int32, Hash(String, Array(String) | String)) #

<p>Updates the metadata of a top-up. Other top-up details are not editable by design.</p> @required @param topup [String?] @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return [Tuple(Stripe::Topup, Integer, Hash)] Stripe::Topup, response status code and response headers


[View source]
def post_topups_with_http_info(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, transfer_group : String | Nil = nil) : Tuple(Stripe::Topup, Int32, Hash(String, Array(String) | String)) #

<p>Top up the balance of an account</p> @required @param amount [Int32?] A positive integer representing how much to transfer. @required @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency. @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param source [String?] The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see Testing Top-ups). @optional @param statement_descriptor [String?] Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. @optional @param transfer_group [String?] A string that identifies this top-up as part of a group. @return [Tuple(Stripe::Topup, Integer, Hash)] Stripe::Topup, response status code and response headers


[View source]