Class: Braintree::Gateway
- Inherits:
-
Object
- Object
- Braintree::Gateway
- Defined in:
- lib/braintree/gateway.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#graphql_client ⇒ Object
readonly
Returns the value of attribute graphql_client.
Instance Method Summary collapse
- #add_on ⇒ Object
- #address ⇒ Object
- #apple_pay ⇒ Object
- #client_token ⇒ Object
- #credit_card ⇒ Object
- #customer ⇒ Object
- #discount ⇒ Object
- #dispute ⇒ Object
- #document_upload ⇒ Object
- #exchange_rate_quote ⇒ Object
-
#initialize(config) ⇒ Gateway
constructor
A new instance of Gateway.
- #merchant ⇒ Object
- #merchant_account ⇒ Object
- #oauth ⇒ Object
- #payment_method ⇒ Object
- #payment_method_nonce ⇒ Object
- #paypal_account ⇒ Object
- #plan ⇒ Object
- #sepa_direct_debit_account ⇒ Object
- #settlement_batch_summary ⇒ Object
- #subscription ⇒ Object
- #testing ⇒ Object
- #transaction ⇒ Object
- #transaction_line_item ⇒ Object
- #us_bank_account ⇒ Object
- #us_bank_account_verification ⇒ Object
- #verification ⇒ Object
- #webhook_notification ⇒ Object
- #webhook_testing ⇒ Object
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
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/braintree/gateway.rb', line 3 def config @config end |
#graphql_client ⇒ Object (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_on ⇒ Object
17 18 19 |
# File 'lib/braintree/gateway.rb', line 17 def add_on AddOnGateway.new(self) end |
#address ⇒ Object
21 22 23 |
# File 'lib/braintree/gateway.rb', line 21 def address AddressGateway.new(self) end |
#apple_pay ⇒ Object
25 26 27 |
# File 'lib/braintree/gateway.rb', line 25 def apple_pay ApplePayGateway.new(self) end |
#client_token ⇒ Object
29 30 31 |
# File 'lib/braintree/gateway.rb', line 29 def client_token ClientTokenGateway.new(self) end |
#credit_card ⇒ Object
33 34 35 |
# File 'lib/braintree/gateway.rb', line 33 def credit_card CreditCardGateway.new(self) end |
#customer ⇒ Object
37 38 39 |
# File 'lib/braintree/gateway.rb', line 37 def customer CustomerGateway.new(self) end |
#discount ⇒ Object
41 42 43 |
# File 'lib/braintree/gateway.rb', line 41 def discount DiscountGateway.new(self) end |
#dispute ⇒ Object
45 46 47 |
# File 'lib/braintree/gateway.rb', line 45 def dispute DisputeGateway.new(self) end |
#document_upload ⇒ Object
49 50 51 |
# File 'lib/braintree/gateway.rb', line 49 def document_upload DocumentUploadGateway.new(self) end |
#exchange_rate_quote ⇒ Object
53 54 55 |
# File 'lib/braintree/gateway.rb', line 53 def exchange_rate_quote ExchangeRateQuoteGateway.new(self) end |
#merchant ⇒ Object
85 86 87 |
# File 'lib/braintree/gateway.rb', line 85 def merchant MerchantGateway.new(self) end |
#merchant_account ⇒ Object
89 90 91 |
# File 'lib/braintree/gateway.rb', line 89 def merchant_account MerchantAccountGateway.new(self) end |
#oauth ⇒ Object
57 58 59 |
# File 'lib/braintree/gateway.rb', line 57 def oauth OAuthGateway.new(self) end |
#payment_method ⇒ Object
65 66 67 |
# File 'lib/braintree/gateway.rb', line 65 def payment_method PaymentMethodGateway.new(self) end |
#payment_method_nonce ⇒ Object
69 70 71 |
# File 'lib/braintree/gateway.rb', line 69 def payment_method_nonce PaymentMethodNonceGateway.new(self) end |
#paypal_account ⇒ Object
73 74 75 |
# File 'lib/braintree/gateway.rb', line 73 def paypal_account PayPalAccountGateway.new(self) end |
#plan ⇒ Object
61 62 63 |
# File 'lib/braintree/gateway.rb', line 61 def plan PlanGateway.new(self) end |
#sepa_direct_debit_account ⇒ Object
81 82 83 |
# File 'lib/braintree/gateway.rb', line 81 def sepa_direct_debit_account SepaDirectDebitAccountGateway.new(self) end |
#settlement_batch_summary ⇒ Object
93 94 95 |
# File 'lib/braintree/gateway.rb', line 93 def settlement_batch_summary SettlementBatchSummaryGateway.new(self) end |
#subscription ⇒ Object
97 98 99 |
# File 'lib/braintree/gateway.rb', line 97 def subscription SubscriptionGateway.new(self) end |
#testing ⇒ Object
109 110 111 |
# File 'lib/braintree/gateway.rb', line 109 def testing TestingGateway.new(self) end |
#transaction ⇒ Object
101 102 103 |
# File 'lib/braintree/gateway.rb', line 101 def transaction TransactionGateway.new(self) end |
#transaction_line_item ⇒ Object
105 106 107 |
# File 'lib/braintree/gateway.rb', line 105 def transaction_line_item TransactionLineItemGateway.new(self) end |
#us_bank_account ⇒ Object
77 78 79 |
# File 'lib/braintree/gateway.rb', line 77 def us_bank_account UsBankAccountGateway.new(self) end |
#us_bank_account_verification ⇒ Object
113 114 115 |
# File 'lib/braintree/gateway.rb', line 113 def us_bank_account_verification UsBankAccountVerificationGateway.new(self) end |
#verification ⇒ Object
117 118 119 |
# File 'lib/braintree/gateway.rb', line 117 def verification CreditCardVerificationGateway.new(self) end |
#webhook_notification ⇒ Object
121 122 123 |
# File 'lib/braintree/gateway.rb', line 121 def webhook_notification WebhookNotificationGateway.new(self) end |
#webhook_testing ⇒ Object
125 126 127 |
# File 'lib/braintree/gateway.rb', line 125 def webhook_testing WebhookTestingGateway.new(self) end |