Class: Inttegro::Order::PayRequest

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/order/pay_request.rb

Overview

Typed representation of the pay request object in the Inttegro API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#order_id ⇒ String (readonly)

Unique identifier of the order to pay

Required in the API payload. Wire name: order_id.

Returns:

  • (String)


44
45
46
47
48
49
# File 'lib/inttegro/order/pay_request.rb', line 44

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_data, T.nilable(Inttegro::PaymentMethod::Data), default: nil
  const :payment_method_id, T.nilable(String), default: nil
  const :paid_out_of_band, T.nilable(T::Boolean), default: nil
end

Set to true if payment was received outside Inttegro (cash, bank transfer, check). Marks the payment as paid offline. Mutually exclusive with payment_method_id and payment_method_data. Defaults to false.

Optional in the API payload; omitted values default to nil. Wire name: paid_out_of_band.

Returns:

  • (Boolean, nil)


44
45
46
47
48
49
# File 'lib/inttegro/order/pay_request.rb', line 44

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_data, T.nilable(Inttegro::PaymentMethod::Data), default: nil
  const :payment_method_id, T.nilable(String), default: nil
  const :paid_out_of_band, T.nilable(T::Boolean), default: nil
end

#payment_method_data ⇒ Inttegro::PaymentMethod::Data? (readonly)

Payment instrument details for tokenization

Optional in the API payload; omitted values default to nil. Wire name: payment_method_data.



44
45
46
47
48
49
# File 'lib/inttegro/order/pay_request.rb', line 44

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_data, T.nilable(Inttegro::PaymentMethod::Data), default: nil
  const :payment_method_id, T.nilable(String), default: nil
  const :paid_out_of_band, T.nilable(T::Boolean), default: nil
end

#payment_method_id ⇒ String? (readonly)

ID of a saved payment method to use for this payment

Optional in the API payload; omitted values default to nil. Wire name: payment_method_id.

Returns:

  • (String, nil)


44
45
46
47
48
49
# File 'lib/inttegro/order/pay_request.rb', line 44

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_data, T.nilable(Inttegro::PaymentMethod::Data), default: nil
  const :payment_method_id, T.nilable(String), default: nil
  const :paid_out_of_band, T.nilable(T::Boolean), default: nil
end