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

#exchange_rate_quoteObject



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

def exchange_rate_quote
  ExchangeRateQuoteGateway.new(self)
end

#merchantObject



85
86
87
# File 'lib/braintree/gateway.rb', line 85

def merchant
  MerchantGateway.new(self)
end

#merchant_accountObject



89
90
91
# File 'lib/braintree/gateway.rb', line 89

def 
  MerchantAccountGateway.new(self)
end

#oauthObject



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

def oauth
  OAuthGateway.new(self)
end

#payment_methodObject



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

def payment_method
  PaymentMethodGateway.new(self)
end

#payment_method_nonceObject



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

def payment_method_nonce
  PaymentMethodNonceGateway.new(self)
end

#paypal_accountObject



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

def 
  PayPalAccountGateway.new(self)
end

#planObject



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

def plan
  PlanGateway.new(self)
end

#sepa_direct_debit_accountObject



81
82
83
# File 'lib/braintree/gateway.rb', line 81

def 
  SepaDirectDebitAccountGateway.new(self)
end

#settlement_batch_summaryObject



93
94
95
# File 'lib/braintree/gateway.rb', line 93

def settlement_batch_summary
  SettlementBatchSummaryGateway.new(self)
end

#subscriptionObject



97
98
99
# File 'lib/braintree/gateway.rb', line 97

def subscription
  SubscriptionGateway.new(self)
end

#testingObject



109
110
111
# File 'lib/braintree/gateway.rb', line 109

def testing
  TestingGateway.new(self)
end

#transactionObject



101
102
103
# File 'lib/braintree/gateway.rb', line 101

def transaction
  TransactionGateway.new(self)
end

#transaction_line_itemObject



105
106
107
# File 'lib/braintree/gateway.rb', line 105

def transaction_line_item
  TransactionLineItemGateway.new(self)
end

#us_bank_accountObject



77
78
79
# File 'lib/braintree/gateway.rb', line 77

def 
  UsBankAccountGateway.new(self)
end

#us_bank_account_verificationObject



113
114
115
# File 'lib/braintree/gateway.rb', line 113

def 
  UsBankAccountVerificationGateway.new(self)
end

#verificationObject



117
118
119
# File 'lib/braintree/gateway.rb', line 117

def verification
  CreditCardVerificationGateway.new(self)
end

#webhook_notificationObject



121
122
123
# File 'lib/braintree/gateway.rb', line 121

def webhook_notification
  WebhookNotificationGateway.new(self)
end

#webhook_testingObject



125
126
127
# File 'lib/braintree/gateway.rb', line 125

def webhook_testing
  WebhookTestingGateway.new(self)
end