Class: Straddle::Models::PayoutResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/straddle/models/payout_response.rb,
sig/straddle/models/payout_response.rbs

Overview

See Also:

  • Straddle::Resources::Charges#refund

Instance Attribute Summary collapse

Instance Method Summary collapse

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(data:, meta:, response_type:) ⇒ Object

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

Parameters:



# File 'lib/straddle/models/payout_response.rb', line 29

Instance Attribute Details

#data ⇒ Straddle::Models::Payout

Parameters:

Returns:



10
# File 'lib/straddle/models/payout_response.rb', line 10

required :data, -> { Straddle::Payout }

#meta ⇒ Straddle::Models::ResponseMetadata

Metadata for an API request.



16
# File 'lib/straddle/models/payout_response.rb', line 16

required :meta, -> { Straddle::ResponseMetadata }

#response_type ⇒ Symbol, Straddle::Models::ResponseType

Shape of the response envelope.

  • object means data contains one JSON object.
  • array means data contains an array of JSON objects.
  • error means error contains the error details.
  • none means the response contains no data.

Parameters:

  • value (Straddle::Models::response_type)

Returns:



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

required :response_type, enum: -> { Straddle::ResponseType }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


23
# File 'sig/straddle/models/payout_response.rbs', line 23

def to_hash: -> {