Class: Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory

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

Defined Under Namespace

Modules: Reason, Status

Instance Attribute Summary collapse

Class Method 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(changed_at:, message:, reason:, source:, status:, code: nil) ⇒ Object

Parameters:



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 151

class StatusHistory < Straddle::Internal::Type::BaseModel
  # @!attribute changed_at
  #   The time the status change occurred.
  #
  #   @return [Time]
  required :changed_at, Time

  # @!attribute message
  #   A human-readable description of the status.
  #
  #   @return [String]
  required :message, String

  # @!attribute reason
  #
  #   @return [Symbol, Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Reason]
  required :reason,
           enum: -> { Straddle::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Reason }

  # @!attribute source
  #
  #   @return [Symbol, Straddle::Models::PaymentStatusSource]
  required :source, enum: -> { Straddle::PaymentStatusSource }

  # @!attribute status
  #
  #   @return [Symbol, Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Status]
  required :status,
           enum: -> { Straddle::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Status }

  # @!attribute code
  #   The status code if applicable.
  #
  #   @return [String, nil]
  optional :code, String, nil?: true

  # @!method initialize(changed_at:, message:, reason:, source:, status:, code: nil)
  #   @param changed_at [Time] The time the status change occurred.
  #
  #   @param message [String] A human-readable description of the status.
  #
  #   @param reason [Symbol, Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Reason]
  #
  #   @param source [Symbol, Straddle::Models::PaymentStatusSource]
  #
  #   @param status [Symbol, Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Status]
  #
  #   @param code [String, nil] The status code if applicable.

  # @see Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory#reason
  module Reason
    extend Straddle::Internal::Type::Enum

    INSUFFICIENT_FUNDS = :insufficient_funds
    CLOSED_BANK_ACCOUNT = :closed_bank_account
    INVALID_BANK_ACCOUNT = :invalid_bank_account
    INVALID_ROUTING = :invalid_routing
    DISPUTED = :disputed
    PAYMENT_STOPPED = :payment_stopped
    OWNER_DECEASED = :owner_deceased
    FROZEN_BANK_ACCOUNT = :frozen_bank_account
    RISK_REVIEW = :risk_review
    FRAUDULENT = :fraudulent
    DUPLICATE_ENTRY = :duplicate_entry
    INVALID_PAYKEY = :invalid_paykey
    PAYMENT_BLOCKED = :payment_blocked
    AMOUNT_TOO_LARGE = :amount_too_large
    TOO_MANY_ATTEMPTS = :too_many_attempts
    INTERNAL_SYSTEM_ERROR = :internal_system_error
    USER_REQUEST = :user_request
    OK = :ok
    OTHER_NETWORK_RETURN = :other_network_return
    PAYOUT_REFUSED = :payout_refused
    VALIDATING = :validating
    AUTO_HOLD = :auto_hold

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory#status
  module Status
    extend Straddle::Internal::Type::Enum

    CREATED = :created
    SCHEDULED = :scheduled
    FAILED = :failed
    CANCELLED = :cancelled
    ON_HOLD = :on_hold
    PENDING = :pending
    PAID = :paid
    REVERSED = :reversed

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#changed_at ⇒ Time

The time the status change occurred.

Parameters:

  • value (Time)

Returns:

  • (Time)


156
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 156

required :changed_at, Time

#code ⇒ String?

The status code if applicable.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


185
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 185

optional :code, String, nil?: true

#message ⇒ String

A human-readable description of the status.

Parameters:

  • value (String)

Returns:

  • (String)


162
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 162

required :message, String

#reason ⇒ Symbol, Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Reason

Parameters:

  • value (Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::reason)

Returns:



167
168
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 167

required :reason,
enum: -> { Straddle::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Reason }

#source ⇒ Symbol, Straddle::Models::PaymentStatusSource

Parameters:

  • value (Straddle::Models::payment_status_source)

Returns:



173
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 173

required :source, enum: -> { Straddle::PaymentStatusSource }

#status ⇒ Symbol, Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Status

Parameters:

  • value (Straddle::Models::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::status)

Returns:



178
179
# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 178

required :status,
enum: -> { Straddle::FundingEventCreatedV1WebhookEvent::Data::StatusHistory::Status }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/straddle/models/funding_event_created_v1_webhook_event.rb', line 227

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


145
# File 'sig/straddle/models/funding_event_created_v1_webhook_event.rbs', line 145

def to_hash: -> {