Sha256: 3b103d21cd064de297537587dd241898042b1913b95ebb4d1be18a29b254fd51

Contents?: true

Size: 821 Bytes

Versions: 7

Compression:

Stored size: 821 Bytes

Contents

module AdaptivePayments
  module ReceiverListAliases
    def self.included(base)
      base.instance_eval do
        alias_params :receiver_list, {
          :receivers => :receivers
        }

        alias_params :first_receiver, {
          :receiver_email  => :email,
          :receiver_amount => :amount,
          :payment_type    => :payment_type,
          :payment_subtype => :payment_subtype,
          :invoice_id      => :invoice_id,
          :receiver_phone  => :phone
        }

        alias_params :receiver_phone, {
          :receiver_phone_number       => :phone_number,
          :receiver_phone_country_code => :country_code,
          :receiver_phone_extension    => :extension
        }
      end
    end

    private

    def first_receiver
      receivers[0] ||= Receiver.new
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
creative-pp-adaptive-1.1.1 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb
pp-adaptive-1.0.0 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb
pp-adaptive-0.0.6 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb
pp-adaptive-0.0.5 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb
pp-adaptive-0.0.4 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb
pp-adaptive-0.0.3 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb
pp-adaptive-0.0.2 lib/pp-adaptive/types/aliases/receiver_list_aliases.rb