Class: Dodopayments::Models::Payment::Refund

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/payment.rb

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(billing: , brand_id: , business_id: , created_at: , currency: , customer: , digital_products_delivered: , disputes: , metadata: , payment_id: , refunds: , settlement_amount: , settlement_currency: , total_amount: , card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, discount_id: nil, error_code: nil, error_message: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::Payment for more details.

Parameters:

  • billing (Dodopayments::Models::BillingAddress) (defaults to: )

    Billing address details for payments

  • brand_id (String) (defaults to: )

    brand id this payment belongs to

  • business_id (String) (defaults to: )

    Identifier of the business associated with the payment

  • created_at (Time) (defaults to: )

    Timestamp when the payment was created

  • currency (Symbol, Dodopayments::Models::Currency) (defaults to: )

    Currency used for the payment

  • customer (Dodopayments::Models::CustomerLimitedDetails) (defaults to: )

    Details about the customer who made the payment

  • digital_products_delivered (Boolean) (defaults to: )

    brand id this payment belongs to

  • disputes (Array<Dodopayments::Models::Dispute>) (defaults to: )

    List of disputes associated with this payment

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

    Additional custom data associated with the payment

  • payment_id (String) (defaults to: )

    Unique identifier for the payment

  • refunds (Array<Dodopayments::Models::Payment::Refund>) (defaults to: )

    List of refunds issued for this payment

  • settlement_amount (Integer) (defaults to: )

    The amount that will be credited to your Dodo balance after currency conversion

  • settlement_currency (Symbol, Dodopayments::Models::Currency) (defaults to: )

    The currency in which the settlement_amount will be credited to your Dodo balanc

  • total_amount (Integer) (defaults to: )

    Total amount charged to the customer including tax, in smallest currency unit (e

  • card_issuing_country (Symbol, Dodopayments::Models::CountryCode, nil) (defaults to: nil)

    ISO2 country code of the card

  • card_last_four (String, nil) (defaults to: nil)

    The last four digits of the card

  • card_network (String, nil) (defaults to: nil)

    Card network like VISA, MASTERCARD etc.

  • card_type (String, nil) (defaults to: nil)

    The type of card DEBIT or CREDIT

  • checkout_session_id (String, nil) (defaults to: nil)

    If payment is made using a checkout session,

  • discount_id (String, nil) (defaults to: nil)

    The discount id if discount is applied

  • error_code (String, nil) (defaults to: nil)

    An error code if the payment failed

  • error_message (String, nil) (defaults to: nil)

    An error message if the payment failed

  • payment_link (String, nil) (defaults to: nil)

    Checkout URL

  • payment_method (String, nil) (defaults to: nil)

    Payment method used by customer (e.g. “card”, “bank_transfer”)

  • payment_method_type (String, nil) (defaults to: nil)

    Specific type of payment method (e.g. “visa”, “mastercard”)

  • product_cart (Array<Dodopayments::Models::Payment::ProductCart>, nil) (defaults to: nil)

    List of products purchased in a one-time payment

  • settlement_tax (Integer, nil) (defaults to: nil)

    This represents the portion of settlement_amount that corresponds to taxes colle

  • status (Symbol, Dodopayments::Models::IntentStatus, nil) (defaults to: nil)

    Current status of the payment intent

  • subscription_id (String, nil) (defaults to: nil)

    Identifier of the subscription if payment is part of a subscription

  • tax (Integer, nil) (defaults to: nil)

    Amount of tax collected in smallest currency unit (e.g. cents)

  • updated_at (Time, nil) (defaults to: nil)

    Timestamp when the payment was last updated



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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/dodopayments/models/payment.rb', line 269

class Refund < Dodopayments::Internal::Type::BaseModel
  # @!attribute business_id
  #   The unique identifier of the business issuing the refund.
  #
  #   @return [String]
  required :business_id, String

  # @!attribute created_at
  #   The timestamp of when the refund was created in UTC.
  #
  #   @return [Time]
  required :created_at, Time

  # @!attribute is_partial
  #   If true the refund is a partial refund
  #
  #   @return [Boolean]
  required :is_partial, Dodopayments::Internal::Type::Boolean

  # @!attribute payment_id
  #   The unique identifier of the payment associated with the refund.
  #
  #   @return [String]
  required :payment_id, String

  # @!attribute refund_id
  #   The unique identifier of the refund.
  #
  #   @return [String]
  required :refund_id, String

  # @!attribute status
  #   The current status of the refund.
  #
  #   @return [Symbol, Dodopayments::Models::RefundStatus]
  required :status, enum: -> { Dodopayments::RefundStatus }

  # @!attribute amount
  #   The refunded amount.
  #
  #   @return [Integer, nil]
  optional :amount, Integer, nil?: true

  # @!attribute currency
  #   The currency of the refund, represented as an ISO 4217 currency code.
  #
  #   @return [Symbol, Dodopayments::Models::Currency, nil]
  optional :currency, enum: -> { Dodopayments::Currency }, nil?: true

  # @!attribute reason
  #   The reason provided for the refund, if any. Optional.
  #
  #   @return [String, nil]
  optional :reason, String, nil?: true

  # @!method initialize(business_id:, created_at:, is_partial:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
  #   @param business_id [String] The unique identifier of the business issuing the refund.
  #
  #   @param created_at [Time] The timestamp of when the refund was created in UTC.
  #
  #   @param is_partial [Boolean] If true the refund is a partial refund
  #
  #   @param payment_id [String] The unique identifier of the payment associated with the refund.
  #
  #   @param refund_id [String] The unique identifier of the refund.
  #
  #   @param status [Symbol, Dodopayments::Models::RefundStatus] The current status of the refund.
  #
  #   @param amount [Integer, nil] The refunded amount.
  #
  #   @param currency [Symbol, Dodopayments::Models::Currency, nil] The currency of the refund, represented as an ISO 4217 currency code.
  #
  #   @param reason [String, nil] The reason provided for the refund, if any. Optional.
end

Instance Attribute Details

#amountInteger?

The refunded amount.

Returns:

  • (Integer, nil)


310
# File 'lib/dodopayments/models/payment.rb', line 310

optional :amount, Integer, nil?: true

#business_idString

The unique identifier of the business issuing the refund.

Returns:

  • (String)


274
# File 'lib/dodopayments/models/payment.rb', line 274

required :business_id, String

#created_atTime

The timestamp of when the refund was created in UTC.

Returns:

  • (Time)


280
# File 'lib/dodopayments/models/payment.rb', line 280

required :created_at, Time

#currencySymbol, ...

The currency of the refund, represented as an ISO 4217 currency code.

Returns:



316
# File 'lib/dodopayments/models/payment.rb', line 316

optional :currency, enum: -> { Dodopayments::Currency }, nil?: true

#is_partialBoolean

If true the refund is a partial refund

Returns:

  • (Boolean)


286
# File 'lib/dodopayments/models/payment.rb', line 286

required :is_partial, Dodopayments::Internal::Type::Boolean

#payment_idString

The unique identifier of the payment associated with the refund.

Returns:

  • (String)


292
# File 'lib/dodopayments/models/payment.rb', line 292

required :payment_id, String

#reasonString?

The reason provided for the refund, if any. Optional.

Returns:

  • (String, nil)


322
# File 'lib/dodopayments/models/payment.rb', line 322

optional :reason, String, nil?: true

#refund_idString

The unique identifier of the refund.

Returns:

  • (String)


298
# File 'lib/dodopayments/models/payment.rb', line 298

required :refund_id, String

#statusSymbol, Dodopayments::Models::RefundStatus

The current status of the refund.



304
# File 'lib/dodopayments/models/payment.rb', line 304

required :status, enum: -> { Dodopayments::RefundStatus }