Class: GustoEmbedded::Client
- Inherits:
-
Object
- Object
- GustoEmbedded::Client
- Extended by:
- T::Sig
- Defined in:
- lib/gusto_embedded/client.rb
Instance Attribute Summary collapse
-
#ach_transactions ⇒ Object
Returns the value of attribute ach_transactions.
-
#bank_accounts ⇒ Object
Returns the value of attribute bank_accounts.
-
#companies ⇒ Object
Returns the value of attribute companies.
-
#companies_suspensions ⇒ Object
Returns the value of attribute companies_suspensions.
-
#company_attachment ⇒ Object
Returns the value of attribute company_attachment.
-
#company_attachments ⇒ Object
Returns the value of attribute company_attachments.
-
#company_benefits ⇒ Object
Returns the value of attribute company_benefits.
-
#company_forms ⇒ Object
Returns the value of attribute company_forms.
-
#contractor_documents ⇒ Object
Returns the value of attribute contractor_documents.
-
#contractor_forms ⇒ Object
Returns the value of attribute contractor_forms.
-
#contractor_payment_groups ⇒ Object
Returns the value of attribute contractor_payment_groups.
-
#contractor_payment_method ⇒ Object
Returns the value of attribute contractor_payment_method.
-
#contractor_payment_methods ⇒ Object
Returns the value of attribute contractor_payment_methods.
-
#contractor_payments ⇒ Object
Returns the value of attribute contractor_payments.
-
#contractors ⇒ Object
Returns the value of attribute contractors.
-
#departments ⇒ Object
Returns the value of attribute departments.
-
#earning_types ⇒ Object
Returns the value of attribute earning_types.
-
#employee_addresses ⇒ Object
Returns the value of attribute employee_addresses.
-
#employee_benefits ⇒ Object
Returns the value of attribute employee_benefits.
-
#employee_employments ⇒ Object
Returns the value of attribute employee_employments.
-
#employee_forms ⇒ Object
Returns the value of attribute employee_forms.
-
#employee_payment_method ⇒ Object
Returns the value of attribute employee_payment_method.
-
#employee_payment_methods ⇒ Object
Returns the value of attribute employee_payment_methods.
-
#employee_tax_setup ⇒ Object
Returns the value of attribute employee_tax_setup.
-
#employees ⇒ Object
Returns the value of attribute employees.
-
#events ⇒ Object
Returns the value of attribute events.
-
#external_payrolls ⇒ Object
Returns the value of attribute external_payrolls.
-
#federal_tax_details ⇒ Object
Returns the value of attribute federal_tax_details.
-
#flows ⇒ Object
Returns the value of attribute flows.
-
#garnishments ⇒ Object
Returns the value of attribute garnishments.
-
#generated_documents ⇒ Object
Returns the value of attribute generated_documents.
-
#historical_employees ⇒ Object
Returns the value of attribute historical_employees.
-
#holiday_pay_policies ⇒ Object
Returns the value of attribute holiday_pay_policies.
-
#i9_verification ⇒ Object
Returns the value of attribute i9_verification.
-
#industry_selection ⇒ Object
Returns the value of attribute industry_selection.
-
#introspection ⇒ Object
Returns the value of attribute introspection.
-
#invoices ⇒ Object
Returns the value of attribute invoices.
-
#jobs_and_compensations ⇒ Object
Returns the value of attribute jobs_and_compensations.
-
#locations ⇒ Object
Returns the value of attribute locations.
-
#notifications ⇒ Object
Returns the value of attribute notifications.
-
#pay_schedules ⇒ Object
Returns the value of attribute pay_schedules.
-
#payment_configs ⇒ Object
Returns the value of attribute payment_configs.
-
#payrolls ⇒ Object
Returns the value of attribute payrolls.
-
#recovery_cases ⇒ Object
Returns the value of attribute recovery_cases.
-
#reports ⇒ Object
Returns the value of attribute reports.
-
#signatories ⇒ Object
Returns the value of attribute signatories.
-
#tax_requirements ⇒ Object
Returns the value of attribute tax_requirements.
-
#time_off_policies ⇒ Object
Returns the value of attribute time_off_policies.
-
#webhooks ⇒ Object
Returns the value of attribute webhooks.
-
#wire_in_requests ⇒ Object
Returns the value of attribute wire_in_requests.
Instance Method Summary collapse
- #init_sdks ⇒ Object
-
#initialize(client: nil, security: nil, security_source: nil, server: nil, server_url: nil, url_params: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(client: nil, security: nil, security_source: nil, server: nil, server_url: nil, url_params: nil) ⇒ Client
Returns a new instance of Client.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/gusto_embedded/client.rb', line 28 def initialize(client: nil, security: nil, security_source: nil, server: nil, server_url: nil, url_params: nil) ## Instantiates the SDK configuring it with the provided parameters. # @param [T.nilable(Faraday::Request)] client The faraday HTTP client to use for all operations # @param [T.nilable(::GustoEmbedded::Shared::Security)] security: The security details required for authentication # @param [T.proc.returns(T.nilable(::GustoEmbedded::Shared::Security))] security_source: A function that returns security details required for authentication # @param [T.nilable(::Symbol)] server The server identifier to use for all operations # @param [T.nilable(::String)] server_url The server URL to use for all operations # @param [T.nilable(::Hash<::Symbol, ::String>)] url_params Parameters to optionally template the server URL with if client.nil? client = Faraday.new(request: { params_encoder: Faraday::FlatParamsEncoder }) do |f| f.request :multipart, {} # f.response :logger end end if !server_url.nil? if !url_params.nil? server_url = Utils.template_url(server_url, url_params) end end raise StandardError, "Invalid server \"#{server}\"" if !server.nil? && !SERVERS.key?(server) @sdk_configuration = SDKConfiguration.new( client, security, security_source, server_url, server ) init_sdks end |
Instance Attribute Details
#ach_transactions ⇒ Object
Returns the value of attribute ach_transactions.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def ach_transactions @ach_transactions end |
#bank_accounts ⇒ Object
Returns the value of attribute bank_accounts.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def bank_accounts @bank_accounts end |
#companies ⇒ Object
Returns the value of attribute companies.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def companies @companies end |
#companies_suspensions ⇒ Object
Returns the value of attribute companies_suspensions.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def companies_suspensions @companies_suspensions end |
#company_attachment ⇒ Object
Returns the value of attribute company_attachment.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def @company_attachment end |
#company_attachments ⇒ Object
Returns the value of attribute company_attachments.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def @company_attachments end |
#company_benefits ⇒ Object
Returns the value of attribute company_benefits.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def company_benefits @company_benefits end |
#company_forms ⇒ Object
Returns the value of attribute company_forms.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def company_forms @company_forms end |
#contractor_documents ⇒ Object
Returns the value of attribute contractor_documents.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractor_documents @contractor_documents end |
#contractor_forms ⇒ Object
Returns the value of attribute contractor_forms.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractor_forms @contractor_forms end |
#contractor_payment_groups ⇒ Object
Returns the value of attribute contractor_payment_groups.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractor_payment_groups @contractor_payment_groups end |
#contractor_payment_method ⇒ Object
Returns the value of attribute contractor_payment_method.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractor_payment_method @contractor_payment_method end |
#contractor_payment_methods ⇒ Object
Returns the value of attribute contractor_payment_methods.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractor_payment_methods @contractor_payment_methods end |
#contractor_payments ⇒ Object
Returns the value of attribute contractor_payments.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractor_payments @contractor_payments end |
#contractors ⇒ Object
Returns the value of attribute contractors.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def contractors @contractors end |
#departments ⇒ Object
Returns the value of attribute departments.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def departments @departments end |
#earning_types ⇒ Object
Returns the value of attribute earning_types.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def earning_types @earning_types end |
#employee_addresses ⇒ Object
Returns the value of attribute employee_addresses.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_addresses @employee_addresses end |
#employee_benefits ⇒ Object
Returns the value of attribute employee_benefits.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_benefits @employee_benefits end |
#employee_employments ⇒ Object
Returns the value of attribute employee_employments.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_employments @employee_employments end |
#employee_forms ⇒ Object
Returns the value of attribute employee_forms.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_forms @employee_forms end |
#employee_payment_method ⇒ Object
Returns the value of attribute employee_payment_method.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_payment_method @employee_payment_method end |
#employee_payment_methods ⇒ Object
Returns the value of attribute employee_payment_methods.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_payment_methods @employee_payment_methods end |
#employee_tax_setup ⇒ Object
Returns the value of attribute employee_tax_setup.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employee_tax_setup @employee_tax_setup end |
#employees ⇒ Object
Returns the value of attribute employees.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def employees @employees end |
#events ⇒ Object
Returns the value of attribute events.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def events @events end |
#external_payrolls ⇒ Object
Returns the value of attribute external_payrolls.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def external_payrolls @external_payrolls end |
#federal_tax_details ⇒ Object
Returns the value of attribute federal_tax_details.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def federal_tax_details @federal_tax_details end |
#flows ⇒ Object
Returns the value of attribute flows.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def flows @flows end |
#garnishments ⇒ Object
Returns the value of attribute garnishments.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def garnishments @garnishments end |
#generated_documents ⇒ Object
Returns the value of attribute generated_documents.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def generated_documents @generated_documents end |
#historical_employees ⇒ Object
Returns the value of attribute historical_employees.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def historical_employees @historical_employees end |
#holiday_pay_policies ⇒ Object
Returns the value of attribute holiday_pay_policies.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def holiday_pay_policies @holiday_pay_policies end |
#i9_verification ⇒ Object
Returns the value of attribute i9_verification.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def i9_verification @i9_verification end |
#industry_selection ⇒ Object
Returns the value of attribute industry_selection.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def industry_selection @industry_selection end |
#introspection ⇒ Object
Returns the value of attribute introspection.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def introspection @introspection end |
#invoices ⇒ Object
Returns the value of attribute invoices.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def invoices @invoices end |
#jobs_and_compensations ⇒ Object
Returns the value of attribute jobs_and_compensations.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def jobs_and_compensations @jobs_and_compensations end |
#locations ⇒ Object
Returns the value of attribute locations.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def locations @locations end |
#notifications ⇒ Object
Returns the value of attribute notifications.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def notifications @notifications end |
#pay_schedules ⇒ Object
Returns the value of attribute pay_schedules.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def pay_schedules @pay_schedules end |
#payment_configs ⇒ Object
Returns the value of attribute payment_configs.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def payment_configs @payment_configs end |
#payrolls ⇒ Object
Returns the value of attribute payrolls.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def payrolls @payrolls end |
#recovery_cases ⇒ Object
Returns the value of attribute recovery_cases.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def recovery_cases @recovery_cases end |
#reports ⇒ Object
Returns the value of attribute reports.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def reports @reports end |
#signatories ⇒ Object
Returns the value of attribute signatories.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def signatories @signatories end |
#tax_requirements ⇒ Object
Returns the value of attribute tax_requirements.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def tax_requirements @tax_requirements end |
#time_off_policies ⇒ Object
Returns the value of attribute time_off_policies.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def time_off_policies @time_off_policies end |
#webhooks ⇒ Object
Returns the value of attribute webhooks.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def webhooks @webhooks end |
#wire_in_requests ⇒ Object
Returns the value of attribute wire_in_requests.
16 17 18 |
# File 'lib/gusto_embedded/client.rb', line 16 def wire_in_requests @wire_in_requests end |
Instance Method Details
#init_sdks ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/gusto_embedded/client.rb', line 64 def init_sdks @introspection = Introspection.new(@sdk_configuration) @companies = Companies.new(@sdk_configuration) @invoices = Invoices.new(@sdk_configuration) @company_attachments = CompanyAttachments.new(@sdk_configuration) @company_attachment = CompanyAttachment.new(@sdk_configuration) @federal_tax_details = FederalTaxDetails.new(@sdk_configuration) @industry_selection = IndustrySelection.new(@sdk_configuration) @signatories = Signatories.new(@sdk_configuration) @flows = Flows.new(@sdk_configuration) @locations = Locations.new(@sdk_configuration) @bank_accounts = BankAccounts.new(@sdk_configuration) @external_payrolls = ExternalPayrolls.new(@sdk_configuration) @payment_configs = PaymentConfigs.new(@sdk_configuration) @pay_schedules = PaySchedules.new(@sdk_configuration) @employees = Employees.new(@sdk_configuration) @historical_employees = HistoricalEmployees.new(@sdk_configuration) @departments = Departments.new(@sdk_configuration) @employee_employments = EmployeeEmployments.new(@sdk_configuration) @employee_addresses = EmployeeAddresses.new(@sdk_configuration) @employee_tax_setup = EmployeeTaxSetup.new(@sdk_configuration) @employee_payment_method = EmployeePaymentMethod.new(@sdk_configuration) @employee_payment_methods = EmployeePaymentMethods.new(@sdk_configuration) @jobs_and_compensations = JobsAndCompensations.new(@sdk_configuration) @earning_types = EarningTypes.new(@sdk_configuration) @contractors = Contractors.new(@sdk_configuration) @contractor_payment_methods = ContractorPaymentMethods.new(@sdk_configuration) @contractor_payment_method = ContractorPaymentMethod.new(@sdk_configuration) @webhooks = Webhooks.new(@sdk_configuration) @contractor_forms = ContractorForms.new(@sdk_configuration) @contractor_documents = ContractorDocuments.new(@sdk_configuration) @employee_forms = EmployeeForms.new(@sdk_configuration) @payrolls = Payrolls.new(@sdk_configuration) @time_off_policies = TimeOffPolicies.new(@sdk_configuration) @contractor_payments = ContractorPayments.new(@sdk_configuration) @contractor_payment_groups = ContractorPaymentGroups.new(@sdk_configuration) @company_forms = CompanyForms.new(@sdk_configuration) @generated_documents = GeneratedDocuments.new(@sdk_configuration) @reports = Reports.new(@sdk_configuration) @company_benefits = CompanyBenefits.new(@sdk_configuration) @employee_benefits = EmployeeBenefits.new(@sdk_configuration) @garnishments = Garnishments.new(@sdk_configuration) @i9_verification = I9Verification.new(@sdk_configuration) @tax_requirements = TaxRequirements.new(@sdk_configuration) @companies_suspensions = CompaniesSuspensions.new(@sdk_configuration) @holiday_pay_policies = HolidayPayPolicies.new(@sdk_configuration) @notifications = Notifications.new(@sdk_configuration) @events = Events.new(@sdk_configuration) @recovery_cases = RecoveryCases.new(@sdk_configuration) @ach_transactions = AchTransactions.new(@sdk_configuration) @wire_in_requests = WireInRequests.new(@sdk_configuration) end |