Class: Moov::Models::Components::CreatePaymentLink
- Inherits:
-
Object
- Object
- Moov::Models::Components::CreatePaymentLink
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/createpaymentlink.rb
Overview
Request to create a new payment link.
A payment link must include either ‘payment` or `payout` details, but not both. For payout payment links, `maxUses` will automatically be set to 1, as these are intended for a one-time disbursement to a specific recipient.
Note: The ‘payout` option is currently under development and is not yet available for general use.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil) ⇒ CreatePaymentLink
constructor
A new instance of CreatePaymentLink.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil) ⇒ CreatePaymentLink
Returns a new instance of CreatePaymentLink.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/moov/models/components/createpaymentlink.rb', line 44 def initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil) @partner_account_id = partner_account_id @merchant_payment_method_id = merchant_payment_method_id @amount = amount @display = display @max_uses = max_uses @expires_on = expires_on @customer = customer @payment = payment @payout = payout end |
Instance Method Details
#==(other) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/moov/models/components/createpaymentlink.rb', line 57 def ==(other) return false unless other.is_a? self.class return false unless @partner_account_id == other.partner_account_id return false unless @merchant_payment_method_id == other.merchant_payment_method_id return false unless @amount == other.amount return false unless @display == other.display return false unless @max_uses == other.max_uses return false unless @expires_on == other.expires_on return false unless @customer == other.customer return false unless @payment == other.payment return false unless @payout == other.payout true end |