Class: Inttegro::Client
- Inherits:
-
Object
- Object
- Inttegro::Client
- Extended by:
- T::Sig
- Defined in:
- lib/inttegro/client.rb
Overview
Main entry point for interacting with the Inttegro API.
Instance Attribute Summary collapse
-
#apps ⇒ Object
readonly
Returns the value of attribute apps.
-
#balance_transactions ⇒ Object
readonly
Returns the value of attribute balance_transactions.
-
#balances ⇒ Object
readonly
Returns the value of attribute balances.
-
#broadcasts ⇒ Object
readonly
Returns the value of attribute broadcasts.
-
#chimes ⇒ Object
readonly
Returns the value of attribute chimes.
-
#customers ⇒ Object
readonly
Returns the value of attribute customers.
-
#file_links ⇒ Object
readonly
Returns the value of attribute file_links.
-
#file_references ⇒ Object
readonly
Returns the value of attribute file_references.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#financial_accounts ⇒ Object
readonly
Returns the value of attribute financial_accounts.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#message_templates ⇒ Object
readonly
Returns the value of attribute message_templates.
-
#orders ⇒ Object
readonly
Returns the value of attribute orders.
-
#otp ⇒ Object
readonly
Returns the value of attribute otp.
-
#payment_methods ⇒ Object
readonly
Returns the value of attribute payment_methods.
-
#payouts ⇒ Object
readonly
Returns the value of attribute payouts.
-
#prices ⇒ Object
readonly
Returns the value of attribute prices.
-
#products ⇒ Object
readonly
Returns the value of attribute products.
-
#purchase_intents ⇒ Object
readonly
Returns the value of attribute purchase_intents.
-
#refunds ⇒ Object
readonly
Returns the value of attribute refunds.
-
#schedules ⇒ Object
readonly
Returns the value of attribute schedules.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#upload_requests ⇒ Object
readonly
Returns the value of attribute upload_requests.
Instance Method Summary collapse
-
#initialize(token_value = nil, api_key: nil, token: nil, base_url: DEFAULT_BASE_URL, read_timeout: 30, open_timeout: 10, adapter: nil, telemetry_enabled: true, tracer_provider: nil, error_reporter: nil, error_reporting_policy: :unexpected) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(token_value = nil, api_key: nil, token: nil, base_url: DEFAULT_BASE_URL, read_timeout: 30, open_timeout: 10, adapter: nil, telemetry_enabled: true, tracer_provider: nil, error_reporter: nil, error_reporting_policy: :unexpected) ⇒ Client
Returns a new instance of Client.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/inttegro/client.rb', line 119 def initialize( token_value = nil, api_key: nil, token: nil, base_url: DEFAULT_BASE_URL, read_timeout: 30, open_timeout: 10, adapter: nil, telemetry_enabled: true, tracer_provider: nil, error_reporter: nil, error_reporting_policy: :unexpected ) provided_token = token || token_value api_key ||= provided_token @http = T.let(HTTPClient.new( api_key: api_key, base_url: base_url, read_timeout: read_timeout, open_timeout: open_timeout, adapter: adapter, telemetry_enabled: telemetry_enabled, tracer_provider: tracer_provider, error_reporter: error_reporter, error_reporting_policy: error_reporting_policy ), HTTPClient) @orders = T.let(Resources::Orders.new(@http), Resources::Orders) @otp = T.let(Resources::Otp.new(@http), Resources::Otp) @chimes = T.let(Resources::Chimes.new(@http), Resources::Chimes) @schedules = T.let(Resources::Schedules.new(@http), Resources::Schedules) @broadcasts = T.let(Resources::Broadcasts.new(@http), Resources::Broadcasts) @message_templates = T.let(Resources::MessageTemplates.new(@http), Resources::MessageTemplates) @payment_methods = T.let(Resources::PaymentMethods.new(@http), Resources::PaymentMethods) @payouts = T.let(Resources::Payouts.new(@http), Resources::Payouts) @refunds = T.let(Resources::Refunds.new(@http), Resources::Refunds) @balance_transactions = T.let(Resources::BalanceTransactions.new(@http), Resources::BalanceTransactions) @financial_accounts = T.let(Resources::FinancialAccounts.new(@http), Resources::FinancialAccounts) @file_references = T.let(Resources::FileReferences.new(@http), Resources::FileReferences) @files = T.let(Resources::Files.new(@http), Resources::Files) @file_links = T.let(Resources::FileLinks.new(@http), Resources::FileLinks) @customers = T.let(Resources::Customers.new(@http), Resources::Customers) @products = T.let(Resources::Products.new(@http), Resources::Products) @prices = T.let(Resources::Prices.new(@http), Resources::Prices) @purchase_intents = T.let(Resources::PurchaseIntents.new(@http), Resources::PurchaseIntents) @balances = T.let(Resources::Balances.new(@http), Resources::Balances) @apps = T.let(Resources::Apps.new(@http), Resources::Apps) @keys = T.let(Resources::Keys.new(@http), Resources::Keys) @spec = T.let(Resources::Spec.new(@http), Resources::Spec) @upload_requests = T.let(Resources::UploadRequests.new(@http), Resources::UploadRequests) end |
Instance Attribute Details
#apps ⇒ Object (readonly)
Returns the value of attribute apps.
93 94 95 |
# File 'lib/inttegro/client.rb', line 93 def apps @apps end |
#balance_transactions ⇒ Object (readonly)
Returns the value of attribute balance_transactions.
63 64 65 |
# File 'lib/inttegro/client.rb', line 63 def balance_transactions @balance_transactions end |
#balances ⇒ Object (readonly)
Returns the value of attribute balances.
90 91 92 |
# File 'lib/inttegro/client.rb', line 90 def balances @balances end |
#broadcasts ⇒ Object (readonly)
Returns the value of attribute broadcasts.
48 49 50 |
# File 'lib/inttegro/client.rb', line 48 def broadcasts @broadcasts end |
#chimes ⇒ Object (readonly)
Returns the value of attribute chimes.
42 43 44 |
# File 'lib/inttegro/client.rb', line 42 def chimes @chimes end |
#customers ⇒ Object (readonly)
Returns the value of attribute customers.
78 79 80 |
# File 'lib/inttegro/client.rb', line 78 def customers @customers end |
#file_links ⇒ Object (readonly)
Returns the value of attribute file_links.
75 76 77 |
# File 'lib/inttegro/client.rb', line 75 def file_links @file_links end |
#file_references ⇒ Object (readonly)
Returns the value of attribute file_references.
69 70 71 |
# File 'lib/inttegro/client.rb', line 69 def file_references @file_references end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
72 73 74 |
# File 'lib/inttegro/client.rb', line 72 def files @files end |
#financial_accounts ⇒ Object (readonly)
Returns the value of attribute financial_accounts.
66 67 68 |
# File 'lib/inttegro/client.rb', line 66 def financial_accounts @financial_accounts end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
96 97 98 |
# File 'lib/inttegro/client.rb', line 96 def keys @keys end |
#message_templates ⇒ Object (readonly)
Returns the value of attribute message_templates.
51 52 53 |
# File 'lib/inttegro/client.rb', line 51 def @message_templates end |
#orders ⇒ Object (readonly)
Returns the value of attribute orders.
36 37 38 |
# File 'lib/inttegro/client.rb', line 36 def orders @orders end |
#otp ⇒ Object (readonly)
Returns the value of attribute otp.
39 40 41 |
# File 'lib/inttegro/client.rb', line 39 def otp @otp end |
#payment_methods ⇒ Object (readonly)
Returns the value of attribute payment_methods.
54 55 56 |
# File 'lib/inttegro/client.rb', line 54 def payment_methods @payment_methods end |
#payouts ⇒ Object (readonly)
Returns the value of attribute payouts.
57 58 59 |
# File 'lib/inttegro/client.rb', line 57 def payouts @payouts end |
#prices ⇒ Object (readonly)
Returns the value of attribute prices.
84 85 86 |
# File 'lib/inttegro/client.rb', line 84 def prices @prices end |
#products ⇒ Object (readonly)
Returns the value of attribute products.
81 82 83 |
# File 'lib/inttegro/client.rb', line 81 def products @products end |
#purchase_intents ⇒ Object (readonly)
Returns the value of attribute purchase_intents.
87 88 89 |
# File 'lib/inttegro/client.rb', line 87 def purchase_intents @purchase_intents end |
#refunds ⇒ Object (readonly)
Returns the value of attribute refunds.
60 61 62 |
# File 'lib/inttegro/client.rb', line 60 def refunds @refunds end |
#schedules ⇒ Object (readonly)
Returns the value of attribute schedules.
45 46 47 |
# File 'lib/inttegro/client.rb', line 45 def schedules @schedules end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
99 100 101 |
# File 'lib/inttegro/client.rb', line 99 def spec @spec end |
#upload_requests ⇒ Object (readonly)
Returns the value of attribute upload_requests.
102 103 104 |
# File 'lib/inttegro/client.rb', line 102 def upload_requests @upload_requests end |