Method: Braintree::ApplePayCard#initialize
- Defined in:
- lib/braintree/apple_pay_card.rb
#initialize(gateway, attributes) ⇒ ApplePayCard
Returns a new instance of ApplePayCard.
47 48 49 50 51 52 |
# File 'lib/braintree/apple_pay_card.rb', line 47 def initialize(gateway, attributes) @gateway = gateway set_instance_variables_from_hash(attributes) @billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) } end |