Module: Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action

Extended by:
Internal::Type::Union
Defined in:
lib/orb/models/invoice_automation_schedule_step_executed_webhook_event.rb,
sig/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbs

Defined Under Namespace

Classes: RetryPayment, SendEmail

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants, variants

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/invoice_automation_schedule_step_executed_webhook_event.rb', line 239

Instance Method Details

#initialize(actions:, automation_schedule_template_id:, automation_schedule_template_name:, executed_at:, label:, scheduled_at:, step_id:) ⇒ Object

Parameters:



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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/orb/models/invoice_automation_schedule_step_executed_webhook_event.rb', line 200

module Action
  extend Orb::Internal::Type::Union

  discriminator :action_type

  variant :send_email,
          -> { Orb::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::SendEmail }

  variant :retry_payment,
          -> { Orb::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment }

  class SendEmail < Orb::Internal::Type::BaseModel
    # @!attribute recipient
    #
    #   @return [String, nil]
    required :recipient, String, nil?: true

    # @!attribute sent
    #
    #   @return [Boolean]
    required :sent, Orb::Internal::Type::Boolean

    # @!attribute action_type
    #
    #   @return [Symbol, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::SendEmail::ActionType, nil]
    optional :action_type,
             enum: -> { Orb::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::SendEmail::ActionType }

    # @!method initialize(recipient:, sent:, action_type: nil)
    #   @param recipient [String, nil]
    #   @param sent [Boolean]
    #   @param action_type [Symbol, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::SendEmail::ActionType]

    # @see Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::SendEmail#action_type
    module ActionType
      extend Orb::Internal::Type::Enum

      SEND_EMAIL = :send_email

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

  class RetryPayment < Orb::Internal::Type::BaseModel
    # @!attribute amount_attempted
    #
    #   @return [String, nil]
    required :amount_attempted, String, nil?: true

    # @!attribute currency
    #
    #   @return [String, nil]
    required :currency, String, nil?: true

    # @!attribute failure_reason
    #
    #   @return [String, nil]
    required :failure_reason, String, nil?: true

    # @!attribute outcome
    #
    #   @return [Symbol, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment::Outcome]
    required :outcome,
             enum: -> { Orb::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment::Outcome }

    # @!attribute payment_provider
    #
    #   @return [String, nil]
    required :payment_provider, String, nil?: true

    # @!attribute payment_provider_transaction_id
    #
    #   @return [String, nil]
    required :payment_provider_transaction_id, String, nil?: true

    # @!attribute payment_transaction_record_id
    #
    #   @return [String, nil]
    required :payment_transaction_record_id, String, nil?: true

    # @!attribute action_type
    #
    #   @return [Symbol, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment::ActionType, nil]
    optional :action_type,
             enum: -> { Orb::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment::ActionType }

    # @!method initialize(amount_attempted:, currency:, failure_reason:, outcome:, payment_provider:, payment_provider_transaction_id:, payment_transaction_record_id:, action_type: nil)
    #   @param amount_attempted [String, nil]
    #   @param currency [String, nil]
    #   @param failure_reason [String, nil]
    #   @param outcome [Symbol, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment::Outcome]
    #   @param payment_provider [String, nil]
    #   @param payment_provider_transaction_id [String, nil]
    #   @param payment_transaction_record_id [String, nil]
    #   @param action_type [Symbol, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment::ActionType]

    # @see Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment#outcome
    module Outcome
      extend Orb::Internal::Type::Enum

      SUCCEEDED = :succeeded
      FAILED = :failed
      SKIPPED = :skipped

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

    # @see Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment#action_type
    module ActionType
      extend Orb::Internal::Type::Enum

      RETRY_PAYMENT = :retry_payment

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

  # @!method self.variants
  #   @return [Array(Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::SendEmail, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::Action::RetryPayment)]
end

#self?.variants ⇒ ::Array[Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::action]

Returns:

  • (::Array[Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::action])


298
# File 'sig/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbs', line 298

def self?.variants: -> ::Array[Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent::Properties::action]