Class: CyberSourceMergedSpec::Client

Inherits:
Object
  • Object
show all
Includes:
CoreLibrary
Defined in:
lib/cyber_source_merged_spec/client.rb

Overview

cyber_source_merged_spec client class.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection: nil, adapter: :net_http_persistent, timeout: 60, max_retries: 0, retry_interval: 1, backoff_factor: 2, retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], retry_methods: %i[get put],, http_callback: nil, proxy_settings: nil, logging_configuration: nil, environment: Environment::PRODUCTION, config: nil) ⇒ Client

Returns a new instance of Client.



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/cyber_source_merged_spec/client.rb', line 310

def initialize(
  connection: nil, adapter: :net_http_persistent, timeout: 60,
  max_retries: 0, retry_interval: 1, backoff_factor: 2,
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
  retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
  logging_configuration: nil, environment: Environment::PRODUCTION,
  config: nil
)
  @config = if config.nil?
              Configuration.new(
                connection: connection, adapter: adapter, timeout: timeout,
                max_retries: max_retries, retry_interval: retry_interval,
                backoff_factor: backoff_factor,
                retry_statuses: retry_statuses,
                retry_methods: retry_methods, http_callback: http_callback,
                proxy_settings: proxy_settings,
                logging_configuration: logging_configuration,
                environment: environment
              )
            else
              config
            end
  user_agent_params = BaseController.user_agent_parameters

  @global_configuration = GlobalConfiguration.new(client_configuration: @config)
                                             .base_uri_executor(@config.method(:get_base_uri))
                                             .global_errors(BaseController::GLOBAL_ERRORS)
                                             .user_agent(BaseController.user_agent,
                                                         agent_parameters: user_agent_params)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



10
11
12
# File 'lib/cyber_source_merged_spec/client.rb', line 10

def config
  @config
end

Class Method Details

.from_env(**overrides) ⇒ Object

Creates a client directly from environment variables.



342
343
344
345
346
# File 'lib/cyber_source_merged_spec/client.rb', line 342

def self.from_env(**overrides)
  default_config = Configuration.build_default_config_from_env
  new_config = default_config.clone_with(**overrides)
  new(config: new_config)
end

Instance Method Details

#billing_agreementsBillingAgreementsController

Access to billing_agreements controller.

Returns:



54
55
56
# File 'lib/cyber_source_merged_spec/client.rb', line 54

def billing_agreements
  @billing_agreements ||= BillingAgreementsController.new @global_configuration
end

#bin_lookupBinLookupController

Access to bin_lookup controller.

Returns:



282
283
284
# File 'lib/cyber_source_merged_spec/client.rb', line 282

def bin_lookup
  @bin_lookup ||= BinLookupController.new @global_configuration
end

#captureCaptureController

Access to capture controller.

Returns:



24
25
26
# File 'lib/cyber_source_merged_spec/client.rb', line 24

def capture
  @capture ||= CaptureController.new @global_configuration
end

#chargeback_detailsChargebackDetailsController

Access to chargeback_details controller.

Returns:



234
235
236
# File 'lib/cyber_source_merged_spec/client.rb', line 234

def chargeback_details
  @chargeback_details ||= ChargebackDetailsController.new @global_configuration
end

#chargeback_summariesChargebackSummariesController

Access to chargeback_summaries controller.

Returns:



228
229
230
# File 'lib/cyber_source_merged_spec/client.rb', line 228

def chargeback_summaries
  @chargeback_summaries ||= ChargebackSummariesController.new @global_configuration
end

#conversion_detailsConversionDetailsController

Access to conversion_details controller.

Returns:



210
211
212
# File 'lib/cyber_source_merged_spec/client.rb', line 210

def conversion_details
  @conversion_details ||= ConversionDetailsController.new @global_configuration
end

#creditCreditController

Access to credit controller.

Returns:



42
43
44
# File 'lib/cyber_source_merged_spec/client.rb', line 42

def credit
  @credit ||= CreditController.new @global_configuration
end

#customerCustomerController

Access to customer controller.

Returns:



108
109
110
# File 'lib/cyber_source_merged_spec/client.rb', line 108

def customer
  @customer ||= CustomerController.new @global_configuration
end

#customer_payment_instrumentCustomerPaymentInstrumentController

Access to customer_payment_instrument controller.

Returns:



96
97
98
# File 'lib/cyber_source_merged_spec/client.rb', line 96

def customer_payment_instrument
  @customer_payment_instrument ||= CustomerPaymentInstrumentController.new @global_configuration
end

#customer_shipping_addressCustomerShippingAddressController

Access to customer_shipping_address controller.

Returns:



114
115
116
# File 'lib/cyber_source_merged_spec/client.rb', line 114

def customer_shipping_address
  @customer_shipping_address ||= CustomerShippingAddressController.new @global_configuration
end

#decision_managerDecisionManagerController

Access to decision_manager controller.

Returns:



126
127
128
# File 'lib/cyber_source_merged_spec/client.rb', line 126

def decision_manager
  @decision_manager ||= DecisionManagerController.new @global_configuration
end

#download_dtdDownloadDtdController

Access to download_dtd controller.

Returns:



216
217
218
# File 'lib/cyber_source_merged_spec/client.rb', line 216

def download_dtd
  @download_dtd ||= DownloadDtdController.new @global_configuration
end

#download_xsdDownloadXsdController

Access to download_xsd controller.

Returns:



222
223
224
# File 'lib/cyber_source_merged_spec/client.rb', line 222

def download_xsd
  @download_xsd ||= DownloadXsdController.new @global_configuration
end

#instrument_identifierInstrumentIdentifierController

Access to instrument_identifier controller.

Returns:



90
91
92
# File 'lib/cyber_source_merged_spec/client.rb', line 90

def instrument_identifier
  @instrument_identifier ||= InstrumentIdentifierController.new @global_configuration
end

#interchange_clearing_level_detailsInterchangeClearingLevelDetailsController

Access to interchange_clearing_level_details controller.

Returns:



252
253
254
# File 'lib/cyber_source_merged_spec/client.rb', line 252

def interchange_clearing_level_details
  @interchange_clearing_level_details ||= InterchangeClearingLevelDetailsController.new @global_configuration
end

#invoice_settingsInvoiceSettingsController

Access to invoice_settings controller.

Returns:



264
265
266
# File 'lib/cyber_source_merged_spec/client.rb', line 264

def invoice_settings
  @invoice_settings ||= InvoiceSettingsController.new @global_configuration
end

#invoicesInvoicesController

Access to invoices controller.

Returns:



258
259
260
# File 'lib/cyber_source_merged_spec/client.rb', line 258

def invoices
  @invoices ||= InvoicesController.new @global_configuration
end

#merchant_defined_fieldsMerchantDefinedFieldsController

Access to merchant_defined_fields controller.

Returns:



306
307
308
# File 'lib/cyber_source_merged_spec/client.rb', line 306

def merchant_defined_fields
  @merchant_defined_fields ||= MerchantDefinedFieldsController.new @global_configuration
end

#microform_integrationMicroformIntegrationController

Access to microform_integration controller.

Returns:



120
121
122
# File 'lib/cyber_source_merged_spec/client.rb', line 120

def microform_integration
  @microform_integration ||= MicroformIntegrationController.new @global_configuration
end

#net_fundingsNetFundingsController

Access to net_fundings controller.

Returns:



186
187
188
# File 'lib/cyber_source_merged_spec/client.rb', line 186

def net_fundings
  @net_fundings ||= NetFundingsController.new @global_configuration
end

#network_tokensNetworkTokensController

Access to network_tokens controller.

Returns:



84
85
86
# File 'lib/cyber_source_merged_spec/client.rb', line 84

def network_tokens
  @network_tokens ||= NetworkTokensController.new @global_configuration
end

#notification_of_changesNotificationOfChangesController

Access to notification_of_changes controller.

Returns:



192
193
194
# File 'lib/cyber_source_merged_spec/client.rb', line 192

def notification_of_changes
  @notification_of_changes ||= NotificationOfChangesController.new @global_configuration
end

#ordersOrdersController

Access to orders controller.

Returns:



60
61
62
# File 'lib/cyber_source_merged_spec/client.rb', line 60

def orders
  @orders ||= OrdersController.new @global_configuration
end

#payer_authenticationPayerAuthenticationController

Access to payer_authentication controller.

Returns:



270
271
272
# File 'lib/cyber_source_merged_spec/client.rb', line 270

def payer_authentication
  @payer_authentication ||= PayerAuthenticationController.new @global_configuration
end

#payment_batch_summariesPaymentBatchSummariesController

Access to payment_batch_summaries controller.

Returns:



204
205
206
# File 'lib/cyber_source_merged_spec/client.rb', line 204

def payment_batch_summaries
  @payment_batch_summaries ||= PaymentBatchSummariesController.new @global_configuration
end

#payment_instrumentPaymentInstrumentController

Access to payment_instrument controller.

Returns:



102
103
104
# File 'lib/cyber_source_merged_spec/client.rb', line 102

def payment_instrument
  @payment_instrument ||= PaymentInstrumentController.new @global_configuration
end

#payment_tokensPaymentTokensController

Access to payment_tokens controller.

Returns:



66
67
68
# File 'lib/cyber_source_merged_spec/client.rb', line 66

def payment_tokens
  @payment_tokens ||= PaymentTokensController.new @global_configuration
end

#paymentsPaymentsController

Access to payments controller.

Returns:



18
19
20
# File 'lib/cyber_source_merged_spec/client.rb', line 18

def payments
  @payments ||= PaymentsController.new @global_configuration
end

#payoutsPayoutsController

Access to payouts controller.

Returns:



138
139
140
# File 'lib/cyber_source_merged_spec/client.rb', line 138

def payouts
  @payouts ||= PayoutsController.new @global_configuration
end

#plansPlansController

Access to plans controller.

Returns:



144
145
146
# File 'lib/cyber_source_merged_spec/client.rb', line 144

def plans
  @plans ||= PlansController.new @global_configuration
end

#pull_fundsPullFundsController

Access to pull_funds controller.

Returns:



132
133
134
# File 'lib/cyber_source_merged_spec/client.rb', line 132

def pull_funds
  @pull_funds ||= PullFundsController.new @global_configuration
end

#purchase_and_refund_detailsPurchaseAndRefundDetailsController

Access to purchase_and_refund_details controller.

Returns:



198
199
200
# File 'lib/cyber_source_merged_spec/client.rb', line 198

def purchase_and_refund_details
  @purchase_and_refund_details ||= PurchaseAndRefundDetailsController.new @global_configuration
end

#refundRefundController

Access to refund controller.

Returns:



36
37
38
# File 'lib/cyber_source_merged_spec/client.rb', line 36

def refund
  @refund ||= RefundController.new @global_configuration
end

#report_definitionsReportDefinitionsController

Access to report_definitions controller.

Returns:



168
169
170
# File 'lib/cyber_source_merged_spec/client.rb', line 168

def report_definitions
  @report_definitions ||= ReportDefinitionsController.new @global_configuration
end

#report_downloadsReportDownloadsController

Access to report_downloads controller.

Returns:



174
175
176
# File 'lib/cyber_source_merged_spec/client.rb', line 174

def report_downloads
  @report_downloads ||= ReportDownloadsController.new @global_configuration
end

#report_subscriptionsReportSubscriptionsController

Access to report_subscriptions controller.

Returns:



180
181
182
# File 'lib/cyber_source_merged_spec/client.rb', line 180

def report_subscriptions
  @report_subscriptions ||= ReportSubscriptionsController.new @global_configuration
end

#reportsReportsController

Access to reports controller.

Returns:



162
163
164
# File 'lib/cyber_source_merged_spec/client.rb', line 162

def reports
  @reports ||= ReportsController.new @global_configuration
end

#retrieval_detailsRetrievalDetailsController

Access to retrieval_details controller.

Returns:



246
247
248
# File 'lib/cyber_source_merged_spec/client.rb', line 246

def retrieval_details
  @retrieval_details ||= RetrievalDetailsController.new @global_configuration
end

#retrieval_summariesRetrievalSummariesController

Access to retrieval_summaries controller.

Returns:



240
241
242
# File 'lib/cyber_source_merged_spec/client.rb', line 240

def retrieval_summaries
  @retrieval_summaries ||= RetrievalSummariesController.new @global_configuration
end

#reversalReversalController

Access to reversal controller.

Returns:



30
31
32
# File 'lib/cyber_source_merged_spec/client.rb', line 30

def reversal
  @reversal ||= ReversalController.new @global_configuration
end

#search_transactionsSearchTransactionsController

Access to search_transactions controller.

Returns:



294
295
296
# File 'lib/cyber_source_merged_spec/client.rb', line 294

def search_transactions
  @search_transactions ||= SearchTransactionsController.new @global_configuration
end

#secure_file_shareSecureFileShareController

Access to secure_file_share controller.

Returns:



300
301
302
# File 'lib/cyber_source_merged_spec/client.rb', line 300

def secure_file_share
  @secure_file_share ||= SecureFileShareController.new @global_configuration
end

#subscriptionsSubscriptionsController

Access to subscriptions controller.

Returns:



150
151
152
# File 'lib/cyber_source_merged_spec/client.rb', line 150

def subscriptions
  @subscriptions ||= SubscriptionsController.new @global_configuration
end

#subscriptions_follow_onsSubscriptionsFollowOnsController

Access to subscriptions_follow_ons controller.

Returns:



156
157
158
# File 'lib/cyber_source_merged_spec/client.rb', line 156

def subscriptions_follow_ons
  @subscriptions_follow_ons ||= SubscriptionsFollowOnsController.new @global_configuration
end

#tokenizeTokenizeController

Access to tokenize controller.

Returns:



78
79
80
# File 'lib/cyber_source_merged_spec/client.rb', line 78

def tokenize
  @tokenize ||= TokenizeController.new @global_configuration
end

#transaction_batchesTransactionBatchesController

Access to transaction_batches controller.

Returns:



72
73
74
# File 'lib/cyber_source_merged_spec/client.rb', line 72

def transaction_batches
  @transaction_batches ||= TransactionBatchesController.new @global_configuration
end

#transaction_detailsTransactionDetailsController

Access to transaction_details controller.

Returns:



288
289
290
# File 'lib/cyber_source_merged_spec/client.rb', line 288

def transaction_details
  @transaction_details ||= TransactionDetailsController.new @global_configuration
end

#user_agent_detailObject



12
13
14
# File 'lib/cyber_source_merged_spec/client.rb', line 12

def user_agent_detail
  config.user_agent_detail
end

#verificationVerificationController

Access to verification controller.

Returns:



276
277
278
# File 'lib/cyber_source_merged_spec/client.rb', line 276

def verification
  @verification ||= VerificationController.new @global_configuration
end

#voidVoidController

Access to void controller.

Returns:



48
49
50
# File 'lib/cyber_source_merged_spec/client.rb', line 48

def void
  @void ||= VoidController.new @global_configuration
end