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.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, sales_tax_amount: nil, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil, line_items: 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:, sales_tax_amount: nil, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil, line_items: nil) ⇒ CreatePaymentLink
Returns a new instance of CreatePaymentLink.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/moov/models/components/createpaymentlink.rb', line 47 def initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, sales_tax_amount: nil, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil, line_items: nil) @partner_account_id = partner_account_id @merchant_payment_method_id = merchant_payment_method_id @amount = amount @display = display @sales_tax_amount = sales_tax_amount @max_uses = max_uses @expires_on = expires_on @customer = customer @payment = payment @payout = payout @line_items = line_items end |
Instance Method Details
#==(other) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/moov/models/components/createpaymentlink.rb', line 62 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 @sales_tax_amount == other.sales_tax_amount 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 return false unless @line_items == other.line_items true end |