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.
-
#children_policies ⇒ Object
readonly
Returns the value of attribute children_policies.
-
#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.
-
#operating_policies ⇒ Object
readonly
Returns the value of attribute operating_policies.
-
#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.
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 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/inttegro/client.rb', line 127 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) @children_policies = T.let(Resources::ChildrenPolicies.new(@http), Resources::ChildrenPolicies) @operating_policies = T.let(Resources::OperatingPolicies.new(@http), Resources::OperatingPolicies) end |
Instance Attribute Details
#apps ⇒ Object (readonly)
Returns the value of attribute apps.
95 96 97 |
# File 'lib/inttegro/client.rb', line 95 def apps @apps end |
#balance_transactions ⇒ Object (readonly)
Returns the value of attribute balance_transactions.
65 66 67 |
# File 'lib/inttegro/client.rb', line 65 def balance_transactions @balance_transactions end |
#balances ⇒ Object (readonly)
Returns the value of attribute balances.
92 93 94 |
# File 'lib/inttegro/client.rb', line 92 def balances @balances end |
#broadcasts ⇒ Object (readonly)
Returns the value of attribute broadcasts.
50 51 52 |
# File 'lib/inttegro/client.rb', line 50 def broadcasts @broadcasts end |
#children_policies ⇒ Object (readonly)
Returns the value of attribute children_policies.
107 108 109 |
# File 'lib/inttegro/client.rb', line 107 def children_policies @children_policies end |
#chimes ⇒ Object (readonly)
Returns the value of attribute chimes.
44 45 46 |
# File 'lib/inttegro/client.rb', line 44 def chimes @chimes end |
#customers ⇒ Object (readonly)
Returns the value of attribute customers.
80 81 82 |
# File 'lib/inttegro/client.rb', line 80 def customers @customers end |
#file_links ⇒ Object (readonly)
Returns the value of attribute file_links.
77 78 79 |
# File 'lib/inttegro/client.rb', line 77 def file_links @file_links end |
#file_references ⇒ Object (readonly)
Returns the value of attribute file_references.
71 72 73 |
# File 'lib/inttegro/client.rb', line 71 def file_references @file_references end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
74 75 76 |
# File 'lib/inttegro/client.rb', line 74 def files @files end |
#financial_accounts ⇒ Object (readonly)
Returns the value of attribute financial_accounts.
68 69 70 |
# File 'lib/inttegro/client.rb', line 68 def financial_accounts @financial_accounts end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
98 99 100 |
# File 'lib/inttegro/client.rb', line 98 def keys @keys end |
#message_templates ⇒ Object (readonly)
Returns the value of attribute message_templates.
53 54 55 |
# File 'lib/inttegro/client.rb', line 53 def @message_templates end |
#operating_policies ⇒ Object (readonly)
Returns the value of attribute operating_policies.
110 111 112 |
# File 'lib/inttegro/client.rb', line 110 def @operating_policies end |
#orders ⇒ Object (readonly)
Returns the value of attribute orders.
38 39 40 |
# File 'lib/inttegro/client.rb', line 38 def orders @orders end |
#otp ⇒ Object (readonly)
Returns the value of attribute otp.
41 42 43 |
# File 'lib/inttegro/client.rb', line 41 def otp @otp end |
#payment_methods ⇒ Object (readonly)
Returns the value of attribute payment_methods.
56 57 58 |
# File 'lib/inttegro/client.rb', line 56 def payment_methods @payment_methods end |
#payouts ⇒ Object (readonly)
Returns the value of attribute payouts.
59 60 61 |
# File 'lib/inttegro/client.rb', line 59 def payouts @payouts end |
#prices ⇒ Object (readonly)
Returns the value of attribute prices.
86 87 88 |
# File 'lib/inttegro/client.rb', line 86 def prices @prices end |
#products ⇒ Object (readonly)
Returns the value of attribute products.
83 84 85 |
# File 'lib/inttegro/client.rb', line 83 def products @products end |
#purchase_intents ⇒ Object (readonly)
Returns the value of attribute purchase_intents.
89 90 91 |
# File 'lib/inttegro/client.rb', line 89 def purchase_intents @purchase_intents end |
#refunds ⇒ Object (readonly)
Returns the value of attribute refunds.
62 63 64 |
# File 'lib/inttegro/client.rb', line 62 def refunds @refunds end |
#schedules ⇒ Object (readonly)
Returns the value of attribute schedules.
47 48 49 |
# File 'lib/inttegro/client.rb', line 47 def schedules @schedules end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
101 102 103 |
# File 'lib/inttegro/client.rb', line 101 def spec @spec end |
#upload_requests ⇒ Object (readonly)
Returns the value of attribute upload_requests.
104 105 106 |
# File 'lib/inttegro/client.rb', line 104 def upload_requests @upload_requests end |