Class: Braintree::Gateway

Inherits:
Object
  • Object
show all
Defined in:
lib/braintree/gateway.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Gateway

Returns a new instance of Gateway.


5
6
7
8
9
10
11
12
13
14
15
# File 'lib/braintree/gateway.rb', line 5

def initialize(config)
  if config.is_a?(Hash)
    @config = Configuration.new config
  elsif config.is_a?(Braintree::Configuration)
    @config = config
  else
    raise ArgumentError, "config is an invalid type"
  end

  @graphql_client = GraphQLClient.new(@config)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config


3
4
5
# File 'lib/braintree/gateway.rb', line 3

def config
  @config
end

#graphql_clientObject (readonly)

Returns the value of attribute graphql_client


3
4
5
# File 'lib/braintree/gateway.rb', line 3

def graphql_client
  @graphql_client
end

Instance Method Details

#add_onObject


17
18
19
# File 'lib/braintree/gateway.rb', line 17

def add_on
  AddOnGateway.new(self)
end

#addressObject


21
22
23
# File 'lib/braintree/gateway.rb', line 21

def address
  AddressGateway.new(self)
end

#apple_payObject


25
26
27
# File 'lib/braintree/gateway.rb', line 25

def apple_pay
  ApplePayGateway.new(self)
end

#client_tokenObject


29
30
31
# File 'lib/braintree/gateway.rb', line 29

def client_token
  ClientTokenGateway.new(self)
end

#credit_cardObject


33
34
35
# File 'lib/braintree/gateway.rb', line 33

def credit_card
  CreditCardGateway.new(self)
end

#customerObject


37
38
39
# File 'lib/braintree/gateway.rb', line 37

def customer
  CustomerGateway.new(self)
end

#discountObject


41
42
43
# File 'lib/braintree/gateway.rb', line 41

def discount
  DiscountGateway.new(self)
end

#disputeObject


45
46
47
# File 'lib/braintree/gateway.rb', line 45

def dispute
  DisputeGateway.new(self)
end

#document_uploadObject


49
50
51
# File 'lib/braintree/gateway.rb', line 49

def document_upload
  DocumentUploadGateway.new(self)
end

#europe_bank_accountObject


91
92
93
# File 'lib/braintree/gateway.rb', line 91

def 
  EuropeBankAccountGateway.new(self)
end

#ideal_paymentObject

NEXT_MAJOR_VERSION Remove this class as legacy Ideal has been removed/disabled in the Braintree Gateway DEPRECATED If you're looking to accept iDEAL as a payment method contact [email protected] for a solution.


79
80
81
# File 'lib/braintree/gateway.rb', line 79

def ideal_payment
  IdealPaymentGateway.new(self)
end

#merchantObject


83
84
85
# File 'lib/braintree/gateway.rb', line 83

def merchant
  MerchantGateway.new(self)
end

#merchant_accountObject


87
88
89
# File 'lib/braintree/gateway.rb', line 87

def 
  MerchantAccountGateway.new(self)
end

#oauthObject


53
54
55
# File 'lib/braintree/gateway.rb', line 53

def oauth
  OAuthGateway.new(self)
end

#payment_methodObject


61
62
63
# File 'lib/braintree/gateway.rb', line 61

def payment_method
  PaymentMethodGateway.new(self)
end

#payment_method_nonceObject


65
66
67
# File 'lib/braintree/gateway.rb', line 65

def payment_method_nonce
  PaymentMethodNonceGateway.new(self)
end

#paypal_accountObject


69
70
71
# File 'lib/braintree/gateway.rb', line 69

def 
  PayPalAccountGateway.new(self)
end

#planObject


57
58
59
# File 'lib/braintree/gateway.rb', line 57

def plan
  PlanGateway.new(self)
end

#settlement_batch_summaryObject


95
96
97
# File 'lib/braintree/gateway.rb', line 95

def settlement_batch_summary
  SettlementBatchSummaryGateway.new(self)
end

#subscriptionObject


99
100
101
# File 'lib/braintree/gateway.rb', line 99

def subscription
  SubscriptionGateway.new(self)
end

#testingObject


115
116
117
# File 'lib/braintree/gateway.rb', line 115

def testing
  TestingGateway.new(self)
end

#transactionObject


107
108
109
# File 'lib/braintree/gateway.rb', line 107

def transaction
  TransactionGateway.new(self)
end

#transaction_line_itemObject


111
112
113
# File 'lib/braintree/gateway.rb', line 111

def transaction_line_item
  TransactionLineItemGateway.new(self)
end

#transparent_redirectObject


103
104
105
# File 'lib/braintree/gateway.rb', line 103

def transparent_redirect
  TransparentRedirectGateway.new(self)
end

#us_bank_accountObject


73
74
75
# File 'lib/braintree/gateway.rb', line 73

def 
  UsBankAccountGateway.new(self)
end

#us_bank_account_verificationObject


119
120
121
# File 'lib/braintree/gateway.rb', line 119

def 
  UsBankAccountVerificationGateway.new(self)
end

#verificationObject


123
124
125
# File 'lib/braintree/gateway.rb', line 123

def verification
  CreditCardVerificationGateway.new(self)
end

#webhook_notificationObject


127
128
129
# File 'lib/braintree/gateway.rb', line 127

def webhook_notification
  WebhookNotificationGateway.new(self)
end

#webhook_testingObject


131
132
133
# File 'lib/braintree/gateway.rb', line 131

def webhook_testing
  WebhookTestingGateway.new(self)
end