Class: Inttegro::Checkout::PayRequest

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/checkout/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)

The finalized Order to pay.

Required in the API payload. Wire name: order_id.

Returns:

  • (String)


46
47
48
49
50
51
# File 'lib/inttegro/checkout/pay_request.rb', line 46

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_id, T.nilable(String), default: nil
  const :payment_method_data, T.nilable(Inttegro::Checkout::PayRequestPaymentMethodData), default: nil
  const :save_payment_method, T.nilable(T::Boolean), default: nil
end

#payment_method_data ⇒ Inttegro::Checkout::PayRequestPaymentMethodData? (readonly)

New payment method details supplied by the payer. Mutually exclusive with payment_method_id. Shipping details are not accepted here because checkout cannot change the Order's shipping address.

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



46
47
48
49
50
51
# File 'lib/inttegro/checkout/pay_request.rb', line 46

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_id, T.nilable(String), default: nil
  const :payment_method_data, T.nilable(Inttegro::Checkout::PayRequestPaymentMethodData), default: nil
  const :save_payment_method, T.nilable(T::Boolean), default: nil
end

#payment_method_id ⇒ String? (readonly)

A saved payment method owned by the Order's immutable customer. Mutually exclusive with payment_method_data.

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

Returns:

  • (String, nil)


46
47
48
49
50
51
# File 'lib/inttegro/checkout/pay_request.rb', line 46

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_id, T.nilable(String), default: nil
  const :payment_method_data, T.nilable(Inttegro::Checkout::PayRequestPaymentMethodData), default: nil
  const :save_payment_method, T.nilable(T::Boolean), default: nil
end

#save_payment_method ⇒ Boolean? (readonly)

Save a newly supplied payment method to the Order's customer. When true, payment_method_data.billing_details is required.

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

Returns:

  • (Boolean, nil)


46
47
48
49
50
51
# File 'lib/inttegro/checkout/pay_request.rb', line 46

class PayRequest < T::Struct
  const :order_id, String
  const :payment_method_id, T.nilable(String), default: nil
  const :payment_method_data, T.nilable(Inttegro::Checkout::PayRequestPaymentMethodData), default: nil
  const :save_payment_method, T.nilable(T::Boolean), default: nil
end