Class: Straddle::Models::ChargeRefundParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/straddle/models/charge_refund_params.rb,
sig/straddle/models/charge_refund_params.rbs

Overview

See Also:

  • Straddle::Resources::Charges#refund

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, amount: nil, description: nil, external_id: nil, metadata: nil, payment_date: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Straddle::Models::ChargeRefundParams for more details.

Parameters:

  • id (String)
  • amount (Integer, nil) (defaults to: nil) —

    Refund amount in cents. null refunds the full original amount. A value must be

  • description (String, nil) (defaults to: nil) —

    Description for the refund payout. Defaults to a description that identifies the

  • external_id (String, nil) (defaults to: nil) —

    Your unique identifier for the refund. Defaults to a new value if omitted.

  • metadata (Hash{Symbol=>String}, nil) (defaults to: nil) —

    User-defined string key-value pairs for the refund payout.

  • payment_date (Date, nil) (defaults to: nil) —

    Date when Straddle submits the refund payout for processing. Defaults to today i

  • correlation_id (String) (defaults to: nil) —

    Optional client-generated identifier for tracing a series of related requests.

  • idempotency_key (String) (defaults to: nil) —

    Optional client-generated key for an idempotent request.

  • request_id (String) (defaults to: nil) —

    Optional client-generated identifier for tracing one request.

  • straddle_account_id (String) (defaults to: nil) —

    For platform requests, the embedded account UUID that sets the request scope.

  • request_options (Straddle::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/straddle/models/charge_refund_params.rb', line 72

Instance Attribute Details

#amount ⇒ Integer?

Refund amount in cents. null refunds the full original amount. A value must be greater than zero and no more than the original charge amount.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


20
# File 'lib/straddle/models/charge_refund_params.rb', line 20

optional :amount, Integer, nil?: true

#correlation_id ⇒ String?

Optional client-generated identifier for tracing a series of related requests.

Parameters:

  • (String)

Returns:

  • (String, nil)


52
# File 'lib/straddle/models/charge_refund_params.rb', line 52

optional :correlation_id, String

#description ⇒ String?

Description for the refund payout. Defaults to a description that identifies the original charge.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


27
# File 'lib/straddle/models/charge_refund_params.rb', line 27

optional :description, String, nil?: true

#external_id ⇒ String?

Your unique identifier for the refund. Defaults to a new value if omitted.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/straddle/models/charge_refund_params.rb', line 33

optional :external_id, String, nil?: true

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/straddle/models/charge_refund_params.rb', line 13

required :id, String

#idempotency_key ⇒ String?

Optional client-generated key for an idempotent request.

Parameters:

  • (String)

Returns:

  • (String, nil)


58
# File 'lib/straddle/models/charge_refund_params.rb', line 58

optional :idempotency_key, String

#metadata ⇒ Hash{Symbol=>String}?

User-defined string key-value pairs for the refund payout.

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


39
# File 'lib/straddle/models/charge_refund_params.rb', line 39

optional :metadata, Straddle::Internal::Type::HashOf[String], nil?: true

#payment_date ⇒ Date?

Date when Straddle submits the refund payout for processing. Defaults to today if omitted.

Parameters:

  • value (Date, nil)

Returns:

  • (Date, nil)


46
# File 'lib/straddle/models/charge_refund_params.rb', line 46

optional :payment_date, Date, nil?: true

#request_id ⇒ String?

Optional client-generated identifier for tracing one request.

Parameters:

  • (String)

Returns:

  • (String, nil)


64
# File 'lib/straddle/models/charge_refund_params.rb', line 64

optional :request_id, String

#straddle_account_id ⇒ String?

For platform requests, the embedded account UUID that sets the request scope.

Parameters:

  • (String)

Returns:

  • (String, nil)


70
# File 'lib/straddle/models/charge_refund_params.rb', line 70

optional :straddle_account_id, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


64
# File 'sig/straddle/models/charge_refund_params.rbs', line 64

def to_hash: -> {